Exemple #1
0
			})
		})

		Context("when the file's artifact source cannot be found in the repository", func() {
			It("returns an UnknownArtifactSourceError", func() {
				Ω(fetchErr).Should(Equal(UnknownArtifactSourceError{"some"}))
			})
		})
	})

	Describe("MergedConfigSource", func() {
		var (
			fakeConfigSourceA *fakes.FakeTaskConfigSource
			fakeConfigSourceB *fakes.FakeTaskConfigSource

			configSource TaskConfigSource

			fetchedConfig atc.TaskConfig
			fetchErr      error
		)

		BeforeEach(func() {
			fakeConfigSourceA = new(fakes.FakeTaskConfigSource)
			fakeConfigSourceB = new(fakes.FakeTaskConfigSource)

			configSource = MergedConfigSource{
				A: fakeConfigSourceA,
				B: fakeConfigSourceB,
			}
		})
Exemple #2
0
		factory = NewGardenFactory(fakeWorkerClient, fakeTracker, func() string {
			return "a-random-guid"
		})

		stdoutBuf = gbytes.NewBuffer()
		stderrBuf = gbytes.NewBuffer()
	})

	Describe("Task", func() {
		var (
			taskDelegate *fakes.FakeTaskDelegate
			privileged   Privileged
			tags         []string
			configSource *fakes.FakeTaskConfigSource

			inStep *fakes.FakeStep
			repo   *SourceRepository

			step    Step
			process ifrit.Process
		)

		BeforeEach(func() {
			taskDelegate = new(fakes.FakeTaskDelegate)
			taskDelegate.StdoutReturns(stdoutBuf)
			taskDelegate.StderrReturns(stderrBuf)

			privileged = false
			tags = []string{"step", "tags"}
			configSource = new(fakes.FakeTaskConfigSource)