Closed wplu closed 4 years ago
old hardcoded jwt was used:
test_use_petstore_jwt { in := { ... "jwt": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJub3RfcGV0c3RvcmUuY29tIn0.iEsWURIWWbd4LV4UAyU7SPufo9pD5qcGLnCmqxxQExo",
generate jwt from claims for use in tests:
"jwt": sealtest_jwt_encode_sign({ "iss": "not_petstore.swagger.io", "sub": "wiley-e-coyote@acme.com", "groups": ["everyone", "test"], }),
tests pass:
# wlu@rm-ml-wlu: make demo ... data.petstore.all.test_use_petstore_jwt: PASS (910.2µs) data.petstore.all.test_use_petstore_jwt_negative: PASS (552µs) ... ### petstore example passed REGO OPA tests
DEMO:
old hardcoded jwt was used:
generate jwt from claims for use in tests:
tests pass: