[java-idp-plugin-webauthn] branch main updated: Fix tests, remove any registered credentials before each test
Phil Smart
philip.smart at jisc.ac.uk
Fri Aug 9 16:21:26 UTC 2024
This is an automated email from the git hooks/post-receive script.
philsmart pushed a commit to branch main
in repository java-idp-plugin-webauthn.
View the commit online:
http://git.shibboleth.net/view/?p=java-idp-plugin-webauthn.git;a=commit;h=b77063eb3746d5ca4d900e463a7ec39ff37dc52a
The following commit(s) were added to refs/heads/main by this push:
new b77063e Fix tests, remove any registered credentials before each test
b77063e is described below
commit b77063eb3746d5ca4d900e463a7ec39ff37dc52a
Author: Phil Smart <philip.smart at jisc.ac.uk>
AuthorDate: Fri Aug 9 17:21:24 2024 +0100
Fix tests, remove any registered credentials before each test
---
.../idp/plugin/authn/webauthn/flow/AbstractWebAuthnFlowTest.java | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/webauthn-impl/src/test/java/net/shibboleth/idp/plugin/authn/webauthn/flow/AbstractWebAuthnFlowTest.java b/webauthn-impl/src/test/java/net/shibboleth/idp/plugin/authn/webauthn/flow/AbstractWebAuthnFlowTest.java
index ff7a477..51b43b0 100644
--- a/webauthn-impl/src/test/java/net/shibboleth/idp/plugin/authn/webauthn/flow/AbstractWebAuthnFlowTest.java
+++ b/webauthn-impl/src/test/java/net/shibboleth/idp/plugin/authn/webauthn/flow/AbstractWebAuthnFlowTest.java
@@ -27,6 +27,7 @@ import java.util.HashMap;
import java.util.Map;
import java.util.Optional;
import java.util.Random;
+import java.util.Set;
import java.util.TreeSet;
import javax.annotation.Nonnull;
@@ -164,6 +165,13 @@ public class AbstractWebAuthnFlowTest extends AbstractFlowTest {
} catch (final Exception e) {
fail("Can not initialise mock authenticator");
}
+ // remove any exist credentials from repo
+ final Set<CredentialRegistration> registrations = credentialRepo.getAllRegistrations();
+ for (final CredentialRegistration reg : registrations) {
+ credentialRepo.removeRegistrationByUsernameAndCredentialId(reg.getUsername(),
+ reg.getCredential().getCredentialId());
+ }
+
}
/**
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the commits
mailing list