Ejemplo n.º 1
0
 public Factory(ICredential awsCred, ICredential doCred, ICredential azureCred, ICredential gcpCred)
 {
     AWSBucket   = BucketClientFactory.CreateClient(CloudServiceProvider.AWS, awsCred);
     DOBucket    = BucketClientFactory.CreateClient(CloudServiceProvider.DigitalOcean, doCred);
     AzureBucket = BucketClientFactory.CreateClient(CloudServiceProvider.Azure, azureCred);
     GCPBucket   = BucketClientFactory.CreateClient(CloudServiceProvider.GCP, gcpCred);
 }
Ejemplo n.º 2
0
        public IntegrationTest(ITestOutputHelper output)
        {
            _output = output;
            dynamic config = ConfigurationLoader.LoadConfiguration("secrets.json");

            //AWS
            dynamic aws       = config.aws;
            string  awsId     = aws.id;
            string  awsKey    = aws.key;
            string  awsRegion = aws.region;

            awsClient       = BucketClientFactory.CreateClient(CloudServiceProvider.AWS, new AWSCredential(awsId, awsKey, awsRegion));
            awsTargetBucket = aws.bucket;

            //DO
            dynamic DO       = config.DO;
            string  doId     = DO.id;
            string  doKey    = DO.key;
            string  doRegion = DO.region;

            doClient       = BucketClientFactory.CreateClient(CloudServiceProvider.DigitalOcean, new DigitalOceanCredential(doId, doKey, doRegion));
            doTargetBucket = DO.bucket;

            //Azure
            dynamic azure    = config.azure;
            string  azureId  = azure.id;
            string  azurekey = azure.key;

            azureClient       = BucketClientFactory.CreateClient(CloudServiceProvider.Azure, new AzureCredential(azureId, azurekey));
            azureTargetBucket = azure.bucket;
        }