Commit f0b7c788b02259de1301038d1ce301ea54bb62a3
1 parent
2aa1b90ab9
Exists in
master
and in
2 other branches
Response code should be 200
Showing 1 changed file with 1 additions and 1 deletions
keycloak_test.groovy
View file @
f0b7c78
... | ... | @@ -38,7 +38,7 @@ |
38 | 38 | testName = "KEA_keycloak_success" |
39 | 39 | String token = sh(label: "KEA_keycloak_token", script: "curl -s -X POST $KEYCLOAK_URL -H 'Content-Type: application/x-www-form-urlencoded' -d 'username=$USER' -d 'password=$PASSWORD' -d 'grant_type=password' -d 'client_id=KEA' | sed 's/.*access_token\":\"//g' | sed 's/\".*//g'", returnStdout: true) |
40 | 40 | responseCode = sh(label: testName, script: "curl -m 10 -sLI -w '%{http_code}' -H 'Authorization: Bearer $token' -H 'Accept: application/json, text/plain, */*' $url -o /dev/null", returnStdout: true) |
41 | - if ( responseCode != '401' ) { | |
41 | + if ( responseCode != '200' ) { | |
42 | 42 | error("$testName: Returned status code = $responseCode when calling $url") |
43 | 43 | } |
44 | 44 | } catch (ignored) { |