Exemplo n.º 1
0
 def test_file_minio_(self):
     os.environ.clear()
     provider = MinioClientConfigProvider(filename=CONFIG_JSON_SAMPLE)
     creds = provider.retrieve()
     self.assertEqual(creds.access_key, "accessKey")
     self.assertEqual(creds.secret_key, "secret")
     self.assertEqual(creds.session_token, None)
Exemplo n.º 2
0
 def test_file_minio_env_alias(self):
     os.environ.clear()
     os.environ["MINIO_ALIAS"] = "play"
     provider = MinioClientConfigProvider(filename=CONFIG_JSON_SAMPLE)
     creds = provider.retrieve()
     eq_(creds.access_key, "Q3AM3UQ867SPQQA43P2F")
     eq_(creds.secret_key, "zuf+tfteSlswRu7BJ86wekitnifILbZam1KYY3TG")
     eq_(creds.session_token, None)
Exemplo n.º 3
0
 def test_credentials_get(self):
     provider = MinioClientConfigProvider(
         filename=CONFIG_JSON_SAMPLE,
         alias="play",
     )
     creds = provider.retrieve()
     eq_(creds.access_key, "Q3AM3UQ867SPQQA43P2F")
     eq_(creds.secret_key, "zuf+tfteSlswRu7BJ86wekitnifILbZam1KYY3TG")
     eq_(creds.session_token, None)
Exemplo n.º 4
0
 def test_file_minio_arg_alias(self):
     os.environ.clear()
     provider = MinioClientConfigProvider(
         filename=CONFIG_JSON_SAMPLE,
         alias="play",
     )
     creds = provider.retrieve()
     self.assertEqual(creds.access_key, "Q3AM3UQ867SPQQA43P2F")
     self.assertEqual(creds.secret_key,
                      "zuf+tfteSlswRu7BJ86wekitnifILbZam1KYY3TG")
     self.assertEqual(creds.session_token, None)