aboutsummaryrefslogtreecommitdiffstats
path: root/vespa-athenz/src/test/java/com
diff options
context:
space:
mode:
authorMorten Tokle <mortent@yahooinc.com>2023-02-23 11:46:38 +0100
committerAndreas Eriksen <andreer@yahooinc.com>2023-03-02 15:07:40 +0100
commit337fbe0cef34d6a5c6e12a593b7eea6ec9ad459e (patch)
tree20699c474d56d76425fdebdd51c6e95c619542a2 /vespa-athenz/src/test/java/com
parent1fadc5ad740f4d6dc4d6a01ad2cd17c660802669 (diff)
Set ztsUrl/sisUrl in identity document
Diffstat (limited to 'vespa-athenz/src/test/java/com')
-rw-r--r--vespa-athenz/src/test/java/com/yahoo/vespa/athenz/identityprovider/api/EntityBindingsMapperTest.java1
-rw-r--r--vespa-athenz/src/test/java/com/yahoo/vespa/athenz/identityprovider/client/IdentityDocumentSignerTest.java7
2 files changed, 5 insertions, 3 deletions
diff --git a/vespa-athenz/src/test/java/com/yahoo/vespa/athenz/identityprovider/api/EntityBindingsMapperTest.java b/vespa-athenz/src/test/java/com/yahoo/vespa/athenz/identityprovider/api/EntityBindingsMapperTest.java
index f8c119190a6..2a68f6fd231 100644
--- a/vespa-athenz/src/test/java/com/yahoo/vespa/athenz/identityprovider/api/EntityBindingsMapperTest.java
+++ b/vespa-athenz/src/test/java/com/yahoo/vespa/athenz/identityprovider/api/EntityBindingsMapperTest.java
@@ -30,6 +30,7 @@ class EntityBindingsMapperTest {
"ip-addresses": [],
"identity-type": "node",
"cluster-type": "admin",
+ "zts-url": "https://zts.url/",
"unknown-string": "string-value",
"unknown-object": { "member-in-unknown-object": 123 }
}
diff --git a/vespa-athenz/src/test/java/com/yahoo/vespa/athenz/identityprovider/client/IdentityDocumentSignerTest.java b/vespa-athenz/src/test/java/com/yahoo/vespa/athenz/identityprovider/client/IdentityDocumentSignerTest.java
index 0b8ff4277f1..36c640f3839 100644
--- a/vespa-athenz/src/test/java/com/yahoo/vespa/athenz/identityprovider/client/IdentityDocumentSignerTest.java
+++ b/vespa-athenz/src/test/java/com/yahoo/vespa/athenz/identityprovider/client/IdentityDocumentSignerTest.java
@@ -36,6 +36,7 @@ public class IdentityDocumentSignerTest {
private static final Instant createdAt = Instant.EPOCH;
private static final HashSet<String> ipAddresses = new HashSet<>(Arrays.asList("1.2.3.4", "::1"));
private static final ClusterType clusterType = ClusterType.CONTAINER;
+ private static final String ztsUrl = "https://foo";
@Test
void generates_and_validates_signature() {
@@ -46,7 +47,7 @@ public class IdentityDocumentSignerTest {
SignedIdentityDocument signedIdentityDocument = new SignedIdentityDocument(
signature, KEY_VERSION, id, providerService, DEFAULT_DOCUMENT_VERSION, configserverHostname,
- instanceHostname, createdAt, ipAddresses, identityType, clusterType);
+ instanceHostname, createdAt, ipAddresses, identityType, clusterType, ztsUrl);
assertTrue(signer.hasValidSignature(signedIdentityDocument, keyPair.getPublic()));
}
@@ -60,10 +61,10 @@ public class IdentityDocumentSignerTest {
var docWithoutClusterType = new SignedIdentityDocument(
signature, KEY_VERSION, id, providerService, DEFAULT_DOCUMENT_VERSION, configserverHostname,
- instanceHostname, createdAt, ipAddresses, identityType, null);
+ instanceHostname, createdAt, ipAddresses, identityType, null, ztsUrl);
var docWithClusterType = new SignedIdentityDocument(
signature, KEY_VERSION, id, providerService, DEFAULT_DOCUMENT_VERSION, configserverHostname,
- instanceHostname, createdAt, ipAddresses, identityType, clusterType);
+ instanceHostname, createdAt, ipAddresses, identityType, clusterType, ztsUrl);
assertTrue(signer.hasValidSignature(docWithoutClusterType, keyPair.getPublic()));
assertEquals(docWithClusterType.signature(), docWithoutClusterType.signature());