Skip to content

Commit

Permalink
fix(auth-testing): fix ObjectMapper configuration in test
Browse files Browse the repository at this point in the history
  • Loading branch information
JoergSiebahn committed Feb 10, 2025
1 parent d1fc668 commit f194800
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.datatype.jdk8.Jdk8Module;
import java.util.Objects;
import org.junit.jupiter.api.extension.AfterAllCallback;
import org.junit.jupiter.api.extension.BeforeAllCallback;
Expand Down Expand Up @@ -88,7 +89,8 @@ private void initEnabledTestAuth() {
this.authConfig = new AuthConfig().setKeys(singletonList(createKeyLocation()));

try {
String authKeysConfig = new ObjectMapper().writeValueAsString(authConfig);
String authKeysConfig =
new ObjectMapper().registerModule(new Jdk8Module()).writeValueAsString(authConfig);
setValueForAuthKeysEnv(authKeysConfig);
} catch (JsonProcessingException e) {
fail("Failed to create the config keys: " + e.getMessage());
Expand Down

0 comments on commit f194800

Please sign in to comment.