Skip to content
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

Consolidate the Attestation exceptions to retryable or AttestationFailure #327

Merged
merged 4 commits into from
Oct 21, 2024

Conversation

thomasm-ttd
Copy link
Contributor

No description provided.

@@ -285,6 +285,9 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.2.5</version>
<configuration>
<argLine>-XX:+EnableDynamicAgentLoading</argLine>
Copy link
Contributor

Choose a reason for hiding this comment

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

What is this for?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It removes the warning when the tests start that come from mockito.

assertEquals(expectedExceptionMessage, result.getMessage());
}

@Test
public void Download_Attest401_AttestCalledTwice() throws CloudStorageException, IOException, InterruptedException, AttestationResponseHandlerException {
public void Download_Attest401_getOptOut_NotCalled() throws CloudStorageException, IOException, AttestationResponseHandlerException {
Copy link
Contributor

Choose a reason for hiding this comment

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

What change is this test update related to?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I removed the code that calls attest a second time after the first one returns a 401 as that code is not used in production (we log if it is called), and if it returns a 401, calling a second time will get the same response. That test then failed as it checks for 2 calls. Renamed the test as the thing it should be checking is that we don't call getOptOut after getting a 401

@thomasm-ttd thomasm-ttd merged commit 1f7fbe7 into main Oct 21, 2024
@thomasm-ttd thomasm-ttd deleted the tjm-UID2-4246-only-shutdown-on-401 branch October 21, 2024 00:07
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