mirror of
https://github.com/Threnklyn/jira.git
synced 2026-05-24 06:48:26 +02:00
d237e86cda
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.
33 lines
1.0 KiB
Bash
Executable File
33 lines
1.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
|
|
|
|
SKIP test -n "$JIRACLOUD" # using Jira Cloud at go-jira.atlassian.net
|
|
|
|
PLAN 7
|
|
|
|
###############################################################################
|
|
## Verify logout works, we expect when we call the session api
|
|
## that we will get a 401 and prompt user for password
|
|
################################################################################
|
|
RUNS $jira logout
|
|
|
|
NRUNS $jira req /rest/auth/1/session </dev/null
|
|
ODIFF <<EOF
|
|
Jira Password [gojira]:
|
|
EOF
|
|
|
|
###############################################################################
|
|
## Verify login works (password read from stdin) and verify that the
|
|
## sesion api no longer prompts
|
|
###############################################################################
|
|
echo "gojira123" | RUNS $jira login
|
|
|
|
RUNS $jira req /rest/auth/1/session </dev/null
|
|
GREP '"name": "gojira"'
|
|
GREP "\"self\": \"$ENDPOINT/rest/api/latest/user?username=gojira\""
|
|
|
|
|