Use Token.builder() in unit tests
This commit is contained in:
parent
b134b5a605
commit
04d530a5ed
@ -1035,7 +1035,7 @@ public class HTTPVaultConnectorTest {
|
|||||||
assumeTrue(connector.isAuthorized());
|
assumeTrue(connector.isAuthorized());
|
||||||
|
|
||||||
/* Create token */
|
/* Create token */
|
||||||
Token token = new TokenBuilder()
|
Token token = Token.builder()
|
||||||
.withId("test-id")
|
.withId("test-id")
|
||||||
.withDisplayName("test name")
|
.withDisplayName("test name")
|
||||||
.build();
|
.build();
|
||||||
@ -1061,7 +1061,7 @@ public class HTTPVaultConnectorTest {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Create token with attributes */
|
/* Create token with attributes */
|
||||||
token = new TokenBuilder()
|
token = Token.builder()
|
||||||
.withId("test-id2")
|
.withId("test-id2")
|
||||||
.withDisplayName("test name 2")
|
.withDisplayName("test name 2")
|
||||||
.withPolicies(Collections.singletonList("testpolicy"))
|
.withPolicies(Collections.singletonList("testpolicy"))
|
||||||
@ -1081,7 +1081,7 @@ public class HTTPVaultConnectorTest {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Overwrite token should fail as of Vault 0.8.0 */
|
/* Overwrite token should fail as of Vault 0.8.0 */
|
||||||
token = new TokenBuilder()
|
token = Token.builder()
|
||||||
.withId("test-id2")
|
.withId("test-id2")
|
||||||
.withDisplayName("test name 3")
|
.withDisplayName("test name 3")
|
||||||
.withPolicies(Arrays.asList("pol1", "pol2"))
|
.withPolicies(Arrays.asList("pol1", "pol2"))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user