github.com/pf-qiu/concourse/v6@v6.7.3-0.20201207032516-1f455d73275f/topgun/runtime/build_artifact_transfer_test.go (about)

     1  package topgun_test
     2  
     3  import (
     4  	. "github.com/pf-qiu/concourse/v6/topgun/common"
     5  	_ "github.com/lib/pq"
     6  	. "github.com/onsi/ginkgo"
     7  	. "github.com/onsi/gomega"
     8  	"github.com/onsi/gomega/gbytes"
     9  )
    10  
    11  var _ = Describe("Passing artifacts between build steps", func() {
    12  	BeforeEach(func() {
    13  		Deploy(
    14  			"deployments/concourse.yml",
    15  			"-o", "operations/add-other-worker.yml",
    16  			"-o", "operations/distinct-worker-tags.yml",
    17  		)
    18  	})
    19  
    20  	It("transfers bits between workers", func() {
    21  		By("setting pipeline that creates containers for check, get, task, put")
    22  		Fly.Run("set-pipeline", "-n", "-c", "pipelines/build-artifact-transfer.yml", "-p", "build-artifacts")
    23  
    24  		By("unpausing the pipeline")
    25  		Fly.Run("unpause-pipeline", "-p", "build-artifacts")
    26  
    27  		By("triggering job")
    28  		sess := Fly.Start("trigger-job", "-w", "-j", "build-artifacts/transfer-time")
    29  		<-sess.Exited
    30  		Expect(sess).To(gbytes.Say("./something/version"))
    31  		Expect(sess.ExitCode()).To(Equal(0))
    32  	})
    33  })