mirror of
https://github.com/Threnklyn/jira.git
synced 2026-05-19 04:33:28 +02:00
30 lines
967 B
Bash
Executable File
30 lines
967 B
Bash
Executable File
#!/bin/bash
|
|
eval "$(curl -q -s https://raw.githubusercontent.com/coryb/osht/master/osht.sh)"
|
|
cd $(dirname $0)
|
|
jira=../jira
|
|
|
|
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": "http://localhost:8080/rest/api/latest/user?username=gojira"'
|
|
|
|
|