Skip to content

Commit

Permalink
Change test Serializable for Bytes
Browse files Browse the repository at this point in the history
  • Loading branch information
ngocnhan-tran1996 committed Dec 14, 2024
1 parent 8c37f0e commit ed53912
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@
import org.springframework.security.saml2.provider.service.authentication.TestSaml2RedirectAuthenticationRequests;
import org.springframework.security.web.authentication.WebAuthenticationDetails;
import org.springframework.security.web.authentication.preauth.PreAuthenticatedAuthenticationToken;
import org.springframework.security.web.webauthn.api.Bytes;
import org.springframework.security.web.webauthn.api.PublicKeyCredentialUserEntity;
import org.springframework.security.web.webauthn.api.TestPublicKeyCredentialUserEntity;

Expand Down Expand Up @@ -323,13 +324,12 @@ class SpringSecurityCoreVersionSerializableTests {
token.setDetails(details);
return token;
});
generatorByClassName.put(PublicKeyCredentialUserEntity.class,
(r) -> TestPublicKeyCredentialUserEntity.userEntity().build());
generatorByClassName.put(Bytes.class, (r) -> Bytes.random());
}

@ParameterizedTest
@MethodSource("getClassesToSerialize")
@Disabled("This method should only be used to serialize the classes once")
@Disabled("This method should only be used to serialize the classes once")
void serializeCurrentVersionClasses(Class<?> clazz) throws Exception {
Files.createDirectories(currentVersionFolder);
Path filePath = Paths.get(currentVersionFolder.toAbsolutePath() + "/" + clazz.getName() + ".serialized");
Expand Down

0 comments on commit ed53912

Please sign in to comment.