Search in sources :

Example 6 with AwsS3BuildCache

use of ch.myniva.gradle.caching.s3.AwsS3BuildCache in project gradle-s3-build-cache by myniva.

the class AwsS3BuildCacheServiceFactoryTest method testAddAWSSessionCredentials.

@Test
public void testAddAWSSessionCredentials() throws Exception {
    AwsS3BuildCache conf = new AwsS3BuildCache();
    conf.setBucket("my-bucket");
    conf.setRegion("us-west-1");
    conf.setAwsAccessKeyId("any aws access key");
    conf.setAwsSecretKey("any secret key");
    conf.setSessionToken("any session token");
    BuildCacheService service = subject.createBuildCacheService(conf, buildCacheDescriber);
    assertNotNull(service);
}
Also used : BuildCacheService(org.gradle.caching.BuildCacheService) AwsS3BuildCache(ch.myniva.gradle.caching.s3.AwsS3BuildCache) Test(org.junit.Test)

Example 7 with AwsS3BuildCache

use of ch.myniva.gradle.caching.s3.AwsS3BuildCache in project gradle-s3-build-cache by myniva.

the class AwsS3BuildCacheServiceFactoryTest method testPath.

@Test
public void testPath() {
    AwsS3BuildCache conf = new AwsS3BuildCache();
    conf.setRegion("us-west-1");
    conf.setBucket("my-bucket");
    conf.setPath("cache");
    BuildCacheService service = subject.createBuildCacheService(conf, buildCacheDescriber);
    assertNotNull(service);
}
Also used : BuildCacheService(org.gradle.caching.BuildCacheService) AwsS3BuildCache(ch.myniva.gradle.caching.s3.AwsS3BuildCache) Test(org.junit.Test)

Example 8 with AwsS3BuildCache

use of ch.myniva.gradle.caching.s3.AwsS3BuildCache in project gradle-s3-build-cache by myniva.

the class AwsS3BuildCacheServiceFactoryTest method testIllegalConfigWithoutBucket.

@Test(expected = IllegalStateException.class)
public void testIllegalConfigWithoutBucket() throws Exception {
    AwsS3BuildCache conf = new AwsS3BuildCache();
    conf.setRegion("us-west-1");
    subject.createBuildCacheService(conf, buildCacheDescriber);
}
Also used : AwsS3BuildCache(ch.myniva.gradle.caching.s3.AwsS3BuildCache) Test(org.junit.Test)

Aggregations

AwsS3BuildCache (ch.myniva.gradle.caching.s3.AwsS3BuildCache)8 Test (org.junit.Test)8 BuildCacheService (org.gradle.caching.BuildCacheService)6 HashMap (java.util.HashMap)2