use of de.otto.synapse.helper.s3.S3Helper in project BridgeServer2 by Sage-Bionetworks.
the class UploadCertificateServiceTest method getPublicKeyAsPemThrowsException.
@Test(expectedExceptions = BridgeServiceException.class)
public void getPublicKeyAsPemThrowsException() throws Exception {
S3Helper mockS3CmsHelper = mock(S3Helper.class);
svc.setS3CmsHelper(mockS3CmsHelper);
when(mockS3CmsHelper.readS3FileAsString(any(), any())).thenThrow(new IOException());
svc.getPublicKeyAsPem(TEST_APP_ID);
}
use of de.otto.synapse.helper.s3.S3Helper in project BridgeServer2 by Sage-Bionetworks.
the class UploadCertificateServiceTest method getPublicKeyAsPem.
@Test
public void getPublicKeyAsPem() throws Exception {
S3Helper mockS3CmsHelper = mock(S3Helper.class);
svc.setS3CmsHelper(mockS3CmsHelper);
svc.getPublicKeyAsPem(TEST_APP_ID);
verify(mockS3CmsHelper).readS3FileAsString(BridgeConfigFactory.getConfig().getProperty("upload.cms.cert.bucket"), TEST_APP_ID + ".pem");
}
use of de.otto.synapse.helper.s3.S3Helper in project synapse by otto-de.
the class InMemCompactionAcceptanceTest method setup.
@Before
public void setup() throws IOException {
deleteSnapshotFilesFromTemp();
s3Helper = new S3Helper(s3Client);
s3Helper.createBucket(INTEGRATION_TEST_BUCKET);
s3Helper.deleteAllObjectsInBucket(INTEGRATION_TEST_BUCKET);
}
use of de.otto.synapse.helper.s3.S3Helper in project synapse by otto-de.
the class KinesisCompactionAcceptanceTest method setup.
@Before
public void setup() throws IOException {
deleteSnapshotFilesFromTemp();
s3Helper = new S3Helper(s3Client);
s3Helper.createBucket(INTEGRATION_TEST_BUCKET);
s3Helper.deleteAllObjectsInBucket(INTEGRATION_TEST_BUCKET);
}
use of de.otto.synapse.helper.s3.S3Helper in project BridgeServer2 by Sage-Bionetworks.
the class SpringConfig method s3Helper.
@Bean(name = "s3Helper")
@Resource(name = "s3Client")
public S3Helper s3Helper(AmazonS3Client s3Client) {
S3Helper s3Helper = new S3Helper();
s3Helper.setS3Client(s3Client);
return s3Helper;
}
Aggregations