use of org.gradle.caching.BuildCacheService 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);
}
use of org.gradle.caching.BuildCacheService 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);
}
use of org.gradle.caching.BuildCacheService 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);
}
use of org.gradle.caching.BuildCacheService in project gradle by gradle.
the class BuildCacheControllerFactory method createBuildCacheService.
private static <T extends BuildCache> DescribedBuildCacheService createBuildCacheService(final T configuration, BuildCacheServiceRole role, Path buildIdentityPath, BuildCacheConfigurationInternal buildCacheConfiguration, Instantiator instantiator) {
Class<? extends BuildCacheServiceFactory<T>> castFactoryType = Cast.uncheckedCast(buildCacheConfiguration.getBuildCacheServiceFactoryType(configuration.getClass()));
BuildCacheServiceFactory<T> factory = instantiator.newInstance(castFactoryType);
Describer describer = new Describer();
BuildCacheService service = factory.createBuildCacheService(configuration, describer);
ImmutableSortedMap<String, String> config = ImmutableSortedMap.copyOf(describer.configParams);
BuildCacheDescription description = new BuildCacheDescription(configuration, describer.type, config);
logConfig(buildIdentityPath, role, description);
return new DescribedBuildCacheService(service, description);
}
use of org.gradle.caching.BuildCacheService 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);
}
Aggregations