Search in sources :

Example 6 with BuildCacheService

use of org.gradle.caching.BuildCacheService 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 BuildCacheService

use of org.gradle.caching.BuildCacheService 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)

Aggregations

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