github.com/chenbh/concourse/v6@v6.4.2/fly/commands/internal/setpipelinehelpers/atc_config_test.go (about) 1 package setpipelinehelpers_test 2 3 import ( 4 "fmt" 5 "os" 6 7 . "github.com/chenbh/concourse/v6/fly/commands/internal/setpipelinehelpers" 8 9 . "github.com/onsi/ginkgo" 10 . "github.com/onsi/gomega" 11 ) 12 13 var _ = Describe("ATC Config", func() { 14 Describe("Apply configuration interaction", func() { 15 var atcConfig ATCConfig 16 BeforeEach(func() { 17 atcConfig = ATCConfig{ 18 SkipInteraction: true, 19 } 20 }) 21 22 Context("when the skip interaction flag has been set to true", func() { 23 It("returns true", func() { 24 Expect(atcConfig.ApplyConfigInteraction()).To(BeTrue()) 25 }) 26 }) 27 }) 28 29 }) 30 31 var _ = Describe("UnpausePipelineCommand", func() { 32 It("uses the right target and pipeline name", func() { 33 atcConfig := ATCConfig{ 34 TargetName: "my-target", 35 PipelineName: "my-pipeline", 36 } 37 expected := fmt.Sprintf("%s -t my-target unpause-pipeline -p my-pipeline", os.Args[0]) 38 Expect(atcConfig.UnpausePipelineCommand()).To(Equal(expected)) 39 }) 40 })