test: extend assertion for warnings creating token with custom ID
All checks were successful
continuous-integration/drone/push Build is passing

With Vault 1.11 a second warning is raised. We accept "at least one"
for now.
This commit is contained in:
Stefan Kalscheuer 2022-06-23 18:29:23 +02:00
parent 69287f7196
commit ecf18881b9
Signed by: stefan
GPG Key ID: 3887EC2A53B55430

View File

@ -908,7 +908,8 @@ class HTTPVaultConnectorIT {
assertFalse(res.getAuth().isOrphan(), "Root token should not be orphan");
// Starting with Vault 1.0 a warning "custom ID uses weaker SHA1.." is given.
assertEquals(1, res.getWarnings().size(), "Token creation did not return expected warning");
// Starting with Vault 1.11 a second warning "Endpoint ignored unrecognized parameters" is given.
assertFalse(res.getWarnings().isEmpty(), "Token creation did not return expected warning");
// Create token with attributes.
Token token2 = Token.builder()