Update integration test as per review comments
@@ -148,6 +148,17 @@ job-2: concourse.check %s main some-pipeline/branch:master job-2
Context("when a team name is specified alongwith pipeline name", func() {
JustBeforeEach(func() {
+ config = atc.Config{
+ Jobs: atc.JobConfigs{
+ {
+ Name: "job-1",
+ },
+ {
+ Name: "job-2",
+ },
+ },
+ }
+
atcServer.AppendHandlers(
ghttp.CombineHandlers(
ghttp.VerifyRequest("GET", "/api/v1/teams/other-team"),
@@ -166,22 +177,7 @@ job-2: concourse.check %s main some-pipeline/branch:master job-2
)
})
- Context("when there are no groups", func() {
- BeforeEach(func() {
- config = atc.Config{
- Jobs: atc.JobConfigs{
- {
- Name: "job-1",
- },
- {
- Name: "job-2",
- },
- },
- }
-
- })
-
- It("prints the config as yaml to stdout, and uses the pipeline name as header", func() {
+ It("prints the config as yaml to stdout, and uses the pipeline name and the specified team as header", func() {
flyCmd := exec.Command(flyPath, "-t", targetName, "checklist", "-p", "some-pipeline/branch:master", "--team", "other-team")
sess, err := gexec.Start(flyCmd, GinkgoWriter, GinkgoWriter)
@@ -200,4 +196,3 @@ job-2: concourse.check %s other-team some-pipeline/branch:master job-2
})
})
})
-})
