Created
November 2, 2017 09:49
-
-
Save jarifibrahim/731354140990928f1c0d4fe32d64110f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Verify testing setup is working | |
status_code=$(curl -s -o /dev/null -I -w "%{http_code}" http://localhost:8088/) | |
if [ $status_code != "200" ] | |
then | |
echo "Vertical setup not working" | |
exit | |
else | |
echo "Vertical setup working" | |
fi | |
# Retrieve user login token using api/login/generate and save it to token variable | |
export f8_AUTH_TOKEN=$(curl http://localhost:8080/api/login/generate -s | python -c "import json,sys; print(json.load(sys.stdin)[0]['token']['access_token'])") | |
userid="testuser" | |
# Space names are for format testDB_DayOfTheYEAR_CurrentTime | |
space_name_var="testDB_$(date +%j_%T)" | |
sut="http://localhost:8080" | |
pyresttest null UI_automation_test_setup.yaml --vars="{'token':'$f8_AUTH_TOKEN', 'userid':'$userid', 'space_name_var':'$space_name_var', 'sut':'$sut'}" --absolute-url # --print-bodies true --log debug --interactive true |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment