public void PicksUpBranchNameFromEnvironment()
        {
            environment.SetEnvironmentVariable(CodeBuild.HeadRefEnvironmentName, "refs/heads/master");
            var cb = new CodeBuild(environment, log);

            cb.GetCurrentBranch(false).ShouldBe("refs/heads/master");
        }
Exemple #2
0
 public void PicksUpBranchNameFromEnvironment()
 {
     environment.SetEnvironmentVariable(CodeBuild.EnvironmentVariableName, "refs/heads/master");
     buildServer.GetCurrentBranch(false).ShouldBe("refs/heads/master");
 }
 public void PicksUpBranchNameFromEnvironmentFromSourceVersion()
 {
     environment.SetEnvironmentVariable(CodeBuild.SourceVersionEnvironmentVariableName, $"refs/heads/{MainBranch}");
     buildServer.GetCurrentBranch(false).ShouldBe($"refs/heads/{MainBranch}");
 }