Esempio n. 1
0
 def test_generate_configuration_override_defaults_generic(self):
     ssl = False
     config = Configuration(self.generic_host, self.port, ssl=ssl)
     c = generate_config(config.host, config.port, ssl=config.ssl)
     c.write_to_file(self.test_file_path)
     config_from_file = get_config(self.test_file_path)
     self.assertEqual(config.to_dict(), config_from_file.to_dict())
Esempio n. 2
0
 def test_generate_configuration_with_defaults_neptune(self):
     config = Configuration(self.neptune_host, self.port)
     c = generate_config(config.host, config.port, auth_mode=config.auth_mode, ssl=config.ssl,
                         load_from_s3_arn=config.load_from_s3_arn, aws_region=config.aws_region)
     c.write_to_file(self.test_file_path)
     config_from_file = get_config(self.test_file_path)
     self.assertEqual(config.to_dict(), config_from_file.to_dict())
Esempio n. 3
0
 def test_generate_configuration_with_defaults(self):
     config = Configuration(self.host, self.port)
     c = generate_config(config.host, config.port, config.auth_mode, config.ssl,
                         config.iam_credentials_provider_type,
                         config.load_from_s3_arn, config.aws_region)
     c.write_to_file(self.test_file_path)
     config_from_file = get_config(self.test_file_path)
     self.assertEqual(config.to_dict(), config_from_file.to_dict())
Esempio n. 4
0
    def test_generate_configuration_override_defaults_neptune(self):
        auth_mode = AuthModeEnum.IAM
        ssl = False
        loader_arn = 'foo'
        aws_region = 'us-west-2'
        config = Configuration(self.neptune_host, self.port, auth_mode=auth_mode, load_from_s3_arn=loader_arn, ssl=ssl,
                               aws_region=aws_region)

        c = generate_config(config.host, config.port, auth_mode=config.auth_mode, ssl=config.ssl,
                            load_from_s3_arn=config.load_from_s3_arn, aws_region=config.aws_region)
        c.write_to_file(self.test_file_path)
        config_from_file = get_config(self.test_file_path)
        self.assertEqual(config.to_dict(), config_from_file.to_dict())
Esempio n. 5
0
    def test_generate_configuration_override_defaults(self):
        auth_mode = AuthModeEnum.IAM
        credentials_provider = IAMAuthCredentialsProvider.ENV
        ssl = False
        loader_arn = 'foo'
        aws_region = 'us-west-2'
        config = Configuration(self.host, self.port, auth_mode, credentials_provider, loader_arn, ssl, aws_region)

        c = generate_config(config.host, config.port, config.auth_mode, config.ssl,
                            config.iam_credentials_provider_type,
                            config.load_from_s3_arn, config.aws_region)
        c.write_to_file(self.test_file_path)
        config_from_file = get_config(self.test_file_path)
        self.assertEqual(config.to_dict(), config_from_file.to_dict())