diff --git a/Makefile b/Makefile index 1cf62f1..b180a62 100644 --- a/Makefile +++ b/Makefile @@ -18,3 +18,5 @@ sec: @trivy fs xkcd-server @govulncheck ./... +e2e: + ./e2e.sh \ No newline at end of file diff --git a/e2e.sh b/e2e.sh index 89136ec..b12eeb3 100755 --- a/e2e.sh +++ b/e2e.sh @@ -1,11 +1,11 @@ make -./xkcd-server & sleep 5 +./xkcd-server & sleep 7 -response=$(curl -d '{"username":"admin", "password":"admin"}' "http://localhost:8080/login") +response=$(curl --no-progress-meter -d '{"username":"admin", "password":"admin"}' "http://localhost:8080/login") -curl -X POST --header "Authorization:"$response "http://localhost:8080/update" +curl -X POST --header "Authorization:""$response" "http://localhost:8080/update" echo "" -curl -X GET --header "Authorization:"$response "http://localhost:8080/pics?search='apple,doctor'" +curl -X GET --header "Authorization:""$response" "http://localhost:8080/pics?search='apple,doctor'"