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

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