io-tests: more consistent output
This brings the messages for passing/non-passing of individual tests closer together, making it easier to compare successful and failing test runs.
This commit is contained in:
committed by
Steve Chávez
parent
30d5a81156
commit
8fe9e94e24
+10
-10
@@ -74,7 +74,7 @@ readSecretFromFile(){
|
|||||||
then
|
then
|
||||||
ok "authentication with $2 secret read from a file"
|
ok "authentication with $2 secret read from a file"
|
||||||
else
|
else
|
||||||
ko "failed to authenticate using JWT for $2 secret: $httpStatus"
|
ko "authentication with $2 secret read from a file: $httpStatus"
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
ko "failed to read $2 secret from a file"
|
ko "failed to read $2 secret from a file"
|
||||||
@@ -95,7 +95,7 @@ readDbUriFromFile(){
|
|||||||
then
|
then
|
||||||
ok "connection with $2 dburi read from a file"
|
ok "connection with $2 dburi read from a file"
|
||||||
else
|
else
|
||||||
ko "failed to read $2 dburi from a file"
|
ko "connection with $2 dburi read from a file"
|
||||||
fi
|
fi
|
||||||
pgrStop
|
pgrStop
|
||||||
}
|
}
|
||||||
@@ -113,9 +113,9 @@ reqWithRoleClaimKey(){
|
|||||||
httpStatus="$( authorsStatus "$authorsJwt" )"
|
httpStatus="$( authorsStatus "$authorsJwt" )"
|
||||||
if test "$httpStatus" -eq $3
|
if test "$httpStatus" -eq $3
|
||||||
then
|
then
|
||||||
ok "request with \"$1\" role-claim-key for $2 jwt gave $3"
|
ok "request with \"$1\" role-claim-key for $2 jwt: $httpStatus"
|
||||||
else
|
else
|
||||||
ko "request with \"$1\" role-claim-key for $2 jwt gave $httpStatus"
|
ko "request with \"$1\" role-claim-key for $2 jwt: $httpStatus"
|
||||||
fi
|
fi
|
||||||
pgrStop
|
pgrStop
|
||||||
}
|
}
|
||||||
@@ -131,9 +131,9 @@ invalidRoleClaimKey(){
|
|||||||
done
|
done
|
||||||
if pgrStarted
|
if pgrStarted
|
||||||
then
|
then
|
||||||
ko "invalid jspath \"$1\" accepted"
|
ko "invalid jspath \"$1\": accepted"
|
||||||
else
|
else
|
||||||
ok "invalid jspath \"$1\" rejected"
|
ok "invalid jspath \"$1\": rejected"
|
||||||
fi
|
fi
|
||||||
pgrStop
|
pgrStop
|
||||||
}
|
}
|
||||||
@@ -152,12 +152,12 @@ ensureIatClaimWorks(){
|
|||||||
httpStatus="$( authorsStatus $iatJwt )"
|
httpStatus="$( authorsStatus $iatJwt )"
|
||||||
if test "$httpStatus" -ne 200
|
if test "$httpStatus" -ne 200
|
||||||
then
|
then
|
||||||
ko "iat claim rejected with $httpStatus"
|
ko "iat claim rejected: $httpStatus"
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
sleep .5;\
|
sleep .5;\
|
||||||
done
|
done
|
||||||
ok "accepted iat claim"
|
ok "iat claim accepted"
|
||||||
pgrStop
|
pgrStop
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -174,9 +174,9 @@ ensureAppSettings(){
|
|||||||
response=$(curl -s "http://localhost:$pgrPort/rpc/get_guc_value?name=app.settings.external_api_secret")
|
response=$(curl -s "http://localhost:$pgrPort/rpc/get_guc_value?name=app.settings.external_api_secret")
|
||||||
if test "$response" = "\"0123456789abcdef\""
|
if test "$response" = "\"0123456789abcdef\""
|
||||||
then
|
then
|
||||||
ok "GET /rpc/get_guc_value response is $response"
|
ok "GET /rpc/get_guc_value: $response"
|
||||||
else
|
else
|
||||||
ko "GET /rpc/get_guc_value response was $response"
|
ko "GET /rpc/get_guc_value: $response"
|
||||||
fi
|
fi
|
||||||
pgrStop
|
pgrStop
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user