Skip to content

V3 Identity Map test #106

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Conversation

aulme
Copy link
Contributor

@aulme aulme commented Jun 13, 2025

No description provided.

@aulme aulme force-pushed the aul-UID2-4666-v3-identity-map-e2e-test branch from b38eca3 to 548b1e6 Compare June 17, 2025 01:51
@aulme aulme force-pushed the aul-UID2-4666-v3-identity-map-e2e-test branch from 548b1e6 to a829112 Compare June 17, 2025 02:06
@aulme aulme requested a review from gmsdelmundo June 17, 2025 03:37

// Need to use the manual mapping for error cases - SDK won't allow creating input with bad emails
public JsonNode v3IdentityMap(String payload) throws Exception {
V2Envelope envelope = v2CreateEnvelope(payload, getClientApiSecret());
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we can get rid of all the getClientApiKey() or getClientApiSecret() calls and use the consts directly

return;
}

// We need all properties to be there for Identity Map V3, so default all to empty
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't need all properties to be present


// Previous UID is there for 90 days after rotation only, then it's null.
// If it's there, it should have the correct size
assertThat(mappedDii.getPreviousRawUid()).satisfiesAnyOf(
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't want to do an assertion based on the dii's last updated?


// Sanity check that refresh from is a date not too far in the past.
// If it is, either there is an Operator issue or salt rotation hasn't been running for a long time.
assertThat(mappedDii.getRefreshFrom()).isAfter(Instant.now().minus(Duration.ofDays(10)));
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we want to let the test pass if refresh from is in the past at all?

"suite.operator.TestData#identityMapV3BatchBadEmailArgs",
"suite.operator.TestData#identityMapV3BatchBadPhoneArgs"
})
public void testV3IdentityMapUnmapped(String label, Operator operator, String operatorName, String payload, String section) throws Exception {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe rename section to identityType?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants