Ejemplo n.º 1
0
 public static ICloudFrontManager CreateCloudFrontManager()
 {
     return(new CloudFrontManager(CakeHelper.CreateEnvironment(), new DebugLog()));
 }
Ejemplo n.º 2
0
        public async Task Test_Invalidation()
        {
            //Sync Directory
            ICakeEnvironment env = CakeHelper.CreateEnvironment();

            DirectoryPath path = new DirectoryPath("./Files/").MakeAbsolute(env.WorkingDirectory);

            System.IO.File.WriteAllText(path.FullPath + "/Test.txt", Guid.NewGuid().ToString());



            SyncSettings settings = env.CreateSyncSettings();

            settings.BucketName = "cake-aws-s3";
            settings.KeyPrefix  = "cloudfront.tests/utils/";

            IS3Manager     s3   = CakeHelper.CreateS3Manager();
            IList <string> keys = await s3.SyncUpload(path, settings);

            keys.ShouldNotBeEmpty();



            //Invalidate Keys
            ICloudFrontManager cloud        = CakeHelper.CreateCloudFrontManager();
            string             invalidation = await cloud.CreateInvalidation("E212F1OAIR275D", keys, "", CakeHelper.CreateEnvironment().CreateCloudFrontSettings());

            invalidation.ShouldNotBeNullOrEmpty();
        }
Ejemplo n.º 3
0
 public static IS3Manager CreateS3Manager()
 {
     return(new S3Manager(new FileSystem(), CakeHelper.CreateEnvironment(), new DebugLog()));
 }