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

			inStep = new(fakes.FakeStep)
			repo = NewSourceRepository()
		})

		JustBeforeEach(func() {
			step = factory.Task(sourceName, identifier, taskDelegate, privileged, tags, configSource).Using(inStep, repo)
			process = ifrit.Invoke(step)
		})

		Context("when the container does not yet exist", func() {
			BeforeEach(func() {
				fakeWorkerClient.LookupContainerReturns(nil, errors.New("nope"))
			})

			Context("when the getting the config works", func() {
				var fetchedConfig atc.TaskConfig

				BeforeEach(func() {
					fetchedConfig = atc.TaskConfig{
						Platform: "some-platform",
						Tags:     []string{"config", "tags"},
						Image:    "some-image",
						Params:   map[string]string{"SOME": "params"},
						Run: atc.TaskRunConfig{
							Path: "ls",
							Args: []string{"some", "args"},
						},