Exemplo n.º 1
0
				Ω(savedEvent).Should(Equal(event.Log{
					Origin: event.Origin{
						Type:     event.OriginTypeGet,
						Name:     "some-input",
						Source:   event.OriginSourceStderr,
						Location: location,
					},
					Payload: "some stderr",
				}))
			})
		})
	})

	Describe("ExecutionDelegate", func() {
		var (
			taskPlan          atc.TaskPlan
			executionDelegate exec.TaskDelegate
		)

		BeforeEach(func() {
			taskPlan = atc.TaskPlan{
				Name:       "some-task",
				Privileged: true,
				ConfigPath: "/etc/concourse/config.yml",
			}

			executionDelegate = delegate.ExecutionDelegate(logger, taskPlan, location)
		})

		Describe("Initializing", func() {
			var taskConfig atc.TaskConfig
				Expect(savedBuildID).To(Equal(buildID))
				Expect(savedEvent).To(Equal(event.Log{
					Origin: event.Origin{
						Source: event.OriginSourceStderr,
						ID:     originID,
					},
					Payload: "some stderr",
				}))

			})
		})
	})

	Describe("ExecutionDelegate", func() {
		var (
			taskPlan          atc.TaskPlan
			executionDelegate exec.TaskDelegate
		)

		BeforeEach(func() {
			taskPlan = atc.TaskPlan{
				Name:       "some-task",
				Privileged: true,
				ConfigPath: "/etc/concourse/config.yml",
			}

			executionDelegate = delegate.ExecutionDelegate(logger, taskPlan, originID)
		})

		Describe("Initializing", func() {
			var taskConfig atc.TaskConfig