Search in sources :

Example 1 with AwsS3BuildCache

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

the class AwsS3BuildCacheServiceFactoryTest method testNullHeaderValue.

@Test
public void testNullHeaderValue() {
    AwsS3BuildCache conf = new AwsS3BuildCache();
    conf.setRegion("us-west-1");
    conf.setBucket("my-bucket");
    Map<String, String> headers = new HashMap<String, String>() {

        {
            put("x-foo", null);
        }
    };
    conf.setHeaders(headers);
    BuildCacheService service = subject.createBuildCacheService(conf, buildCacheDescriber);
    assertNotNull(service);
}
Also used : BuildCacheService(org.gradle.caching.BuildCacheService) HashMap(java.util.HashMap) AwsS3BuildCache(ch.myniva.gradle.caching.s3.AwsS3BuildCache) Test(org.junit.Test)

Example 2 with AwsS3BuildCache

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

the class AwsS3BuildCacheServiceFactoryTest method testWhat.

@Test
public void testWhat() {
    AwsS3BuildCache conf = new AwsS3BuildCache();
    conf.setRegion("us-west-1");
    conf.setBucket("my-bucket");
    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 3 with AwsS3BuildCache

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

the class AwsS3BuildCacheServiceFactoryTest method testNullHeaders.

@Test
public void testNullHeaders() {
    AwsS3BuildCache conf = new AwsS3BuildCache();
    conf.setRegion("us-west-1");
    conf.setBucket("my-bucket");
    conf.setHeaders(null);
    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 4 with AwsS3BuildCache

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

the class AwsS3BuildCacheServiceFactoryTest method testIllegalConfigWithoutRegion.

@Test(expected = IllegalStateException.class)
public void testIllegalConfigWithoutRegion() throws Exception {
    AwsS3BuildCache conf = new AwsS3BuildCache();
    conf.setBucket("my-bucket");
    subject.createBuildCacheService(conf, buildCacheDescriber);
}
Also used : AwsS3BuildCache(ch.myniva.gradle.caching.s3.AwsS3BuildCache) Test(org.junit.Test)

Example 5 with AwsS3BuildCache

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

the class AwsS3BuildCacheServiceFactoryTest method testNullHeaderName.

@Test
public void testNullHeaderName() {
    AwsS3BuildCache conf = new AwsS3BuildCache();
    conf.setRegion("us-west-1");
    conf.setBucket("my-bucket");
    Map<String, String> headers = new HashMap<String, String>() {

        {
            put(null, "foo");
        }
    };
    conf.setHeaders(headers);
    BuildCacheService service = subject.createBuildCacheService(conf, buildCacheDescriber);
    assertNotNull(service);
}
Also used : BuildCacheService(org.gradle.caching.BuildCacheService) HashMap(java.util.HashMap) 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