Skip to content

Commit

Permalink
Retire AttachmentControllerV3
Browse files Browse the repository at this point in the history
  • Loading branch information
jon-signal committed Oct 17, 2024
1 parent 865e3c5 commit eb80305
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 79 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,6 @@
import org.whispersystems.textsecuregcm.controllers.ArchiveController;
import org.whispersystems.textsecuregcm.controllers.ArtController;
import org.whispersystems.textsecuregcm.controllers.AttachmentControllerV2;
import org.whispersystems.textsecuregcm.controllers.AttachmentControllerV3;
import org.whispersystems.textsecuregcm.controllers.AttachmentControllerV4;
import org.whispersystems.textsecuregcm.controllers.CallLinkController;
import org.whispersystems.textsecuregcm.controllers.CallRoutingController;
Expand Down Expand Up @@ -1101,7 +1100,6 @@ protected void configureServer(final ServerBuilder<?> serverBuilder) {
config.getAwsAttachmentsConfiguration().credentials().accessKeyId().value(),
config.getAwsAttachmentsConfiguration().credentials().secretAccessKey().value(),
config.getAwsAttachmentsConfiguration().region(), config.getAwsAttachmentsConfiguration().bucket()),
new AttachmentControllerV3(rateLimiters, gcsAttachmentGenerator),
new AttachmentControllerV4(rateLimiters, gcsAttachmentGenerator, tusAttachmentGenerator,
experimentEnrollmentManager),
new ArchiveController(backupAuthManager, backupManager),
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,6 @@ class AttachmentControllerTest {
.setTestContainerFactory(new GrizzlyWebTestContainerFactory())
.addResource(new AttachmentControllerV2(RATE_LIMITERS, "accessKey", "accessSecret", "us-east-1",
"attachmentv2-bucket"))
.addResource(new AttachmentControllerV3(RATE_LIMITERS, gcsAttachmentGenerator))
.addProvider(new AttachmentControllerV4(RATE_LIMITERS,
gcsAttachmentGenerator,
new TusAttachmentGenerator(new TusConfiguration(new SecretBytes(TUS_SECRET), TUS_URL)),
Expand Down Expand Up @@ -132,16 +131,6 @@ void testV4GcsForm() {
assertValidCdn2Response(descriptor);
}

@Test
void testV3Form() {
AttachmentDescriptorV3 descriptor = resources.getJerseyTest()
.target("/v3/attachments/form/upload")
.request()
.header("Authorization", AuthHelper.getAuthHeader(AuthHelper.VALID_UUID, AuthHelper.VALID_PASSWORD))
.get(AttachmentDescriptorV3.class);
assertValidCdn2Response(descriptor);
}

private static void assertValidCdn2Response(final AttachmentDescriptorV3 descriptor) {
assertThat(descriptor.key()).isNotBlank();
assertThat(descriptor.cdn()).isEqualTo(2);
Expand Down

0 comments on commit eb80305

Please sign in to comment.