From 8011935a3ba2b8b805cc1ef51b6b3b7e4ef6f72f Mon Sep 17 00:00:00 2001 From: Ehren Kret Date: Fri, 17 Sep 2021 11:35:40 -0500 Subject: [PATCH] Fix compilation issues created by constructor changes --- .../textsecuregcm/WhisperServerService.java | 4 ++- .../controllers/ProfileControllerTest.java | 34 +++++++++++++------ 2 files changed, 26 insertions(+), 12 deletions(-) diff --git a/service/src/main/java/org/whispersystems/textsecuregcm/WhisperServerService.java b/service/src/main/java/org/whispersystems/textsecuregcm/WhisperServerService.java index 84f6ee5bc..f02fa0e62 100644 --- a/service/src/main/java/org/whispersystems/textsecuregcm/WhisperServerService.java +++ b/service/src/main/java/org/whispersystems/textsecuregcm/WhisperServerService.java @@ -248,6 +248,8 @@ public class WhisperServerService extends Application( @@ -96,26 +108,26 @@ class ProfileControllerTest { .setMapper(SystemMapper.getMapper()) .setTestContainerFactory(new GrizzlyWebTestContainerFactory()) .addResource(new ProfileController( + clock, rateLimiters, accountsManager, profilesManager, usernamesManager, dynamicConfigurationManager, - (acceptableLanguages, accountBadges) -> { - try { - return List.of( - new Badge("TEST1", "other", new URL("https://example.com/badge/1"), "Test Badge", "This badge is in unit tests.") - ); - } catch (MalformedURLException e) { - throw new AssertionError(e); - } - }, + (acceptableLanguages, accountBadges) -> List.of( + new Badge("TEST", "other", makeURL("https://example.com/badge/test"), "Test Badge", "This badge is in unit tests.") + ), + new BadgesConfiguration(List.of( + new BadgeConfiguration("TEST", makeURL("https://example.com/badge/test"), "other"), + new BadgeConfiguration("TEST1", makeURL("https://example.com/badge/1"), "testing"), + new BadgeConfiguration("TEST2", makeURL("https://example.com/badge/2"), "testing"), + new BadgeConfiguration("TEST3", makeURL("https://example.com/badge/3"), "testing") + ), List.of("TEST1")), s3client, postPolicyGenerator, policySigner, "profilesBucket", - zkProfileOperations, - true)) + zkProfileOperations)) .build(); @BeforeEach