mirror of
https://github.com/Threnklyn/jira.git
synced 2026-05-19 04:33:28 +02:00
8994b42f71
The following two files contain characters which aren't valid in source files within a Go module: t/.password-store/GoJira/api-token:gojira@corybennett.org.gpg t/.password-store/GoJira/api-token:mothra@corybennett.org.gpg The directory only contains test scripts, so it doesn't need to be included in the module. The simplest way to do that is to start the directory with an underscore. Fixes #228.
81 lines
3.0 KiB
Bash
Executable File
81 lines
3.0 KiB
Bash
Executable File
#!/bin/bash
|
|
eval "$(curl -q -s https://raw.githubusercontent.com/coryb/osht/master/osht.sh)"
|
|
cd $(dirname $0)
|
|
jira="../jira"
|
|
. env.sh
|
|
|
|
PLAN 16
|
|
|
|
# reset login
|
|
RUNS $jira logout
|
|
RUNS $jira login
|
|
|
|
# cleanup from previous failed test executions
|
|
($jira ls --project BASIC | awk -F: '{print $1}' | while read issue; do ../jira done $issue; done) | sed 's/^/# CLEANUP: /g'
|
|
|
|
###############################################################################
|
|
## Create an issue
|
|
###############################################################################
|
|
RUNS $jira create --project BASIC -o summary=summary -o description=description --noedit --saveFile issue.props
|
|
issue=$(awk '/issue/{print $2}' issue.props)
|
|
|
|
DIFF <<EOF
|
|
OK $issue $ENDPOINT/browse/$issue
|
|
EOF
|
|
|
|
###############################################################################
|
|
## Testing the example custom commands, print-project
|
|
###############################################################################
|
|
|
|
RUNS $jira print-project
|
|
DIFF <<EOF
|
|
BASIC
|
|
EOF
|
|
|
|
###############################################################################
|
|
## Testing the example custom commands, jira-path
|
|
###############################################################################
|
|
|
|
RUNS $jira jira-path
|
|
DIFF <<EOF
|
|
../jira
|
|
EOF
|
|
|
|
###############################################################################
|
|
## Testing the example custom commands, env
|
|
###############################################################################
|
|
|
|
RUNS $jira env
|
|
GREP ^JIRA_PROJECT=BASIC
|
|
|
|
###############################################################################
|
|
## Testing the example custom commands, argtest
|
|
###############################################################################
|
|
|
|
RUNS $jira argtest TEST
|
|
DIFF <<EOF
|
|
TEST
|
|
EOF
|
|
|
|
###############################################################################
|
|
## Testing the example custom commands, opttest
|
|
###############################################################################
|
|
|
|
RUNS $jira opttest --OPT TEST
|
|
DIFF <<EOF
|
|
TEST
|
|
EOF
|
|
|
|
###############################################################################
|
|
## Use the "mine" alias to list issues assigned to self
|
|
###############################################################################
|
|
|
|
RUNS $jira mine
|
|
DIFF <<EOF
|
|
+----------------+------------------------------------------+--------------+--------------+--------------+------------+--------------+--------------+
|
|
| Issue | Summary | Type | Priority | Status | Age | Reporter | Assignee |
|
|
+----------------+------------------------------------------+--------------+--------------+--------------+------------+--------------+--------------+
|
|
| $(printf %-14s $issue) | summary | Bug | Medium | To Do | a minute | gojira | gojira |
|
|
+----------------+------------------------------------------+--------------+--------------+--------------+------------+--------------+--------------+
|
|
EOF
|