use of com.amazonaws.services.schemaregistry.deserializers.GlueSchemaRegistryDeserializationFacade in project flink by apache.
the class GlueSchemaRegistryInputStreamDeserializerTest method testAwsCredentialsProviderFromConfig.
@Test
public void testAwsCredentialsProviderFromConfig() throws Exception {
Map<String, Object> config = new HashMap<>(configs);
config.put(AWS_ACCESS_KEY_ID, "ak");
config.put(AWS_SECRET_ACCESS_KEY, "sk");
GlueSchemaRegistryInputStreamDeserializer glueSchemaRegistryInputStreamDeserializer = new GlueSchemaRegistryInputStreamDeserializer(config);
GlueSchemaRegistryDeserializationFacade facade = getField("glueSchemaRegistryDeserializationFacade", glueSchemaRegistryInputStreamDeserializer);
AwsCredentialsProvider credentialsProvider = facade.getCredentialsProvider();
assertThat(credentialsProvider.resolveCredentials().accessKeyId()).isEqualTo("ak");
assertThat(credentialsProvider.resolveCredentials().secretAccessKey()).isEqualTo("sk");
}
use of com.amazonaws.services.schemaregistry.deserializers.GlueSchemaRegistryDeserializationFacade in project flink by apache.
the class GlueSchemaRegistryInputStreamDeserializerTest method testDefaultAwsCredentialsProvider.
@Test
public void testDefaultAwsCredentialsProvider() throws Exception {
GlueSchemaRegistryInputStreamDeserializer glueSchemaRegistryInputStreamDeserializer = new GlueSchemaRegistryInputStreamDeserializer(configs);
GlueSchemaRegistryDeserializationFacade facade = getField("glueSchemaRegistryDeserializationFacade", glueSchemaRegistryInputStreamDeserializer);
AwsCredentialsProvider credentialsProvider = facade.getCredentialsProvider();
assertThat(credentialsProvider).isInstanceOf(DefaultCredentialsProvider.class);
}
use of com.amazonaws.services.schemaregistry.deserializers.GlueSchemaRegistryDeserializationFacade in project flink by apache.
the class GlueSchemaRegistryJsonSchemaCoderTest method testDefaultAwsCredentialsProvider.
@Test
public void testDefaultAwsCredentialsProvider() throws Exception {
GlueSchemaRegistryJsonSchemaCoder coder = new GlueSchemaRegistryJsonSchemaCoder("test", getBaseConfig());
GlueSchemaRegistryDeserializationFacade facade = getField("glueSchemaRegistryDeserializationFacade", coder);
AwsCredentialsProvider credentialsProvider = facade.getCredentialsProvider();
assertThat(credentialsProvider).isInstanceOf(DefaultCredentialsProvider.class);
}
use of com.amazonaws.services.schemaregistry.deserializers.GlueSchemaRegistryDeserializationFacade in project flink by apache.
the class GlueSchemaRegistryJsonSchemaCoderTest method testAwsCredentialsProviderFromConfig.
@Test
public void testAwsCredentialsProviderFromConfig() throws Exception {
Map<String, Object> config = new HashMap<>(getBaseConfig());
config.put(AWS_ACCESS_KEY_ID, "ak");
config.put(AWS_SECRET_ACCESS_KEY, "sk");
GlueSchemaRegistryJsonSchemaCoder coder = new GlueSchemaRegistryJsonSchemaCoder("test", config);
GlueSchemaRegistryDeserializationFacade facade = getField("glueSchemaRegistryDeserializationFacade", coder);
AwsCredentialsProvider credentialsProvider = facade.getCredentialsProvider();
assertThat(credentialsProvider.resolveCredentials().accessKeyId()).isEqualTo("ak");
assertThat(credentialsProvider.resolveCredentials().secretAccessKey()).isEqualTo("sk");
}
Aggregations