public void CloneFileTest() { //To make code coverate 100% var cn = new GitCloner(); cn.SetGitCmd("echo"); var wf = new WorkflowGeneric(); wf.GetContext().SourceDir = "."; wf.GetContext().WipDir = "."; wf.GetContext().VcsMode = "git"; wf.SetCloner(cn); wf.CloneFiles(); }
public void YamlTransformTest() { Environment.SetEnvironmentVariable("IASC_GSUTIL_PATH", "echo"); var cn = new GitCloner(); cn.SetGitCmd("echo"); var wf = new WorkflowGeneric(); wf.GetContext().SourceDir = "."; wf.GetContext().WipDir = "."; var result = wf.Load(yaml1); UtilsHelm.SetCmd("echo"); wf.SetCopier(CreateGenericCopier()); wf.SetCloner(cn); wf.Transform(); UtilsHelm.ResetHelmCmd(); }
public void YamlLoadFileTest() { var path = "dummy.yaml"; File.WriteAllText(path, yaml1); var cn = new GitCloner(); cn.SetGitCmd("echo"); var wf = new WorkflowGeneric(); wf.GetContext().SourceDir = "."; wf.GetContext().WipDir = "."; wf.SetCloner(cn); wf.SetCopier(CreateGenericCopier()); var result = wf.LoadFile(path); UtilsHelm.SetCmd("echo"); wf.Transform(); UtilsHelm.ResetHelmCmd(); }