Ω(taskDelegate.InitializingArgsForCall(0)).Should(Equal(fetchedConfig)) }) }) It("looked up the container via the session ID", func() { Ω(fakeWorkerClient.LookupContainerArgsForCall(0)).Should(Equal(identifier)) }) It("gets the config from the input artifact soruce", func() { Ω(configSource.FetchConfigCallCount()).Should(Equal(1)) Ω(configSource.FetchConfigArgsForCall(0)).Should(Equal(repo)) }) It("creates a container with the config's image and the session ID as the handle", func() { Ω(fakeWorkerClient.CreateContainerCallCount()).Should(Equal(1)) createdIdentifier, spec := fakeWorkerClient.CreateContainerArgsForCall(0) Ω(createdIdentifier).Should(Equal(identifier)) taskSpec := spec.(worker.TaskContainerSpec) Ω(taskSpec.Platform).Should(Equal("some-platform")) Ω(taskSpec.Tags).Should(ConsistOf("config", "step", "tags")) Ω(taskSpec.Image).Should(Equal("some-image")) Ω(taskSpec.Privileged).Should(BeFalse()) }) It("ensures artifacts root exists by streaming in an empty payload", func() { Ω(fakeContainer.StreamInCallCount()).Should(Equal(1)) spec := fakeContainer.StreamInArgsForCall(0) Ω(spec.Path).Should(Equal("/tmp/build/a-random-guid"))