コード例 #1
0
		)

		BeforeEach(func() {
			filename = "some-filename"
		})

		JustBeforeEach(func() {
			result, fetchErr = containerDelegate.FetchContainerResultFile(logger, expectedGuid, filename)
		})

		Context("when fetching the file stream from the container succeeds", func() {
			var fileStream *gbytes.Buffer

			BeforeEach(func() {
				fileStream = gbytes.NewBuffer()
				executorClient.GetFilesReturns(fileStream, nil)
			})

			Context("and the payload is a reasonable size", func() {
				BeforeEach(func() {
					test_helper.WriteTar(
						fileStream,
						[]test_helper.ArchiveFile{{
							Name: "some-file",
							Body: "some result",
							Mode: 0600,
						}},
					)
				})

				It("succeeds", func() {