Exemplo n.º 1
0
        public void LoadYaml_Test()
        {
            string pathToManifest = @"C:\test\manifest.yaml";

            if (File.Exists(pathToManifest))
            {
                LoadYaml task = new LoadYaml();
                task.BuildEngine         = new FakeBuildEngine();
                task.CFConfigurationFile = pathToManifest;
                Assert.IsTrue(task.Execute());
            }
            else
            {
                throw new Exception("Manifest file not found, test not executed");
            }
        }
Exemplo n.º 2
0
        public void LoadYaml_Test()
        {
            string tempFile = Path.GetTempFileName();

            File.WriteAllText(tempFile, @"app-dir: C:/test/
applications:
  C:/test/:
    name: testapp
    url: test1.1.2.3.4.xip.io;test2.1.2.3.4.xip.io
autoscale:
  cpu:
    max: 80
    min: 20
  enabled: no
  instances:
    max: 2
    min: 1
disk: 1024
instances: 1
memory: 1024
name: testapp
placement-zone: default
services:
  service1:
    plan: free
    type: mysql
sso-enabled: no
stack: win2012r2
");

            LoadYaml task = new LoadYaml();

            task.CFConfigurationFile = tempFile;
            task.BuildEngine         = new FakeBuildEngine();

            Assert.IsTrue(task.Execute());
            File.Delete(tempFile);
        }
        public void LoadYaml_Test()
        {
            string tempFile = Path.GetTempFileName();

            File.WriteAllText(tempFile, @"app-dir: C:/test/
            applications:
              C:/test/:
            name: testapp
            url: test1.1.2.3.4.xip.io;test2.1.2.3.4.xip.io
            autoscale:
              cpu:
            max: 80
            min: 20
              enabled: no
              instances:
            max: 2
            min: 1
            disk: 1024
            instances: 1
            memory: 1024
            name: testapp
            placement-zone: default
            services:
              service1:
            plan: free
            type: mysql
            sso-enabled: no
            stack: win2012r2
            ");

            LoadYaml task = new LoadYaml();
            task.CFConfigurationFile = tempFile;
            task.BuildEngine = new FakeBuildEngine();

            Assert.IsTrue(task.Execute());
            File.Delete(tempFile);
        }