github.com/chenbh/concourse/v6@v6.4.2/atc/resource/tracker_metadata_test.go (about) 1 package resource_test 2 3 import ( 4 . "github.com/chenbh/concourse/v6/atc/resource" 5 . "github.com/onsi/ginkgo" 6 . "github.com/onsi/gomega" 7 ) 8 9 var _ = Describe("TrackerMetadata", func() { 10 It("Env", func() { 11 Expect(TrackerMetadata{ 12 ExternalURL: "https://www.example.com", 13 PipelineName: "some-pipeline-name", 14 ResourceName: "some-resource-name", 15 }.Env()).To(Equal([]string{ 16 "ATC_EXTERNAL_URL=https://www.example.com", 17 "RESOURCE_PIPELINE_NAME=some-pipeline-name", 18 "RESOURCE_NAME=some-resource-name", 19 })) 20 }) 21 22 It("does not include fields that are not set", func() { 23 Expect(TrackerMetadata{ 24 PipelineName: "some-pipeline-name", 25 }.Env()).To(Equal([]string{ 26 "RESOURCE_PIPELINE_NAME=some-pipeline-name", 27 })) 28 }) 29 })