Skip to content

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 2 times, most recently 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?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We don't expose that to clients so can't get it in e2e test and I don't want to start going to S3 and parsing salt files from e2e tests.


// 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?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Some grace period is useful to ensure the test isn't flaky, but 10 days is probably too much. I'll set it to 1h.

"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?

@aulme aulme force-pushed the aul-UID2-4666-v3-identity-map-e2e-test branch from a829112 to c0b6854 Compare June 24, 2025 07:31
@aulme aulme merged commit ed83ef8 into main Jun 30, 2025
4 checks passed
@aulme aulme deleted the aul-UID2-4666-v3-identity-map-e2e-test branch June 30, 2025 07:35
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.

3 participants