add duplicate test case to img_res_fetch_test & go fmt
@@ -60,8 +60,6 @@ var _ = Describe("Image", func() {
fetchedVersion atc.Version
fetchErr error
teamID int
-
-
)
BeforeEach(func() {
fakeResourceFetcher = new(workerfakes.FakeFetcher)
@@ -174,6 +172,16 @@ var _ = Describe("Image", func() {
It("does not check for versions of the custom type", func() {
Expect(fakeWorker.FindOrCreateContainerCallCount()).To(Equal(1))
})
+
+ It("ran 'check' with the right config", func() {
+ Expect(fakeCheckResource.CheckCallCount()).To(Equal(1))
+ _, checkProcessSpec, checkImageContainer := fakeCheckResource.CheckArgsForCall(0)
+ Expect(checkProcessSpec).To(Equal(runtime.ProcessSpec{
+ Path: "/opt/resource/check",
+ }))
+ Expect(checkImageContainer).To(Equal(fakeContainer))
+ })
+
})
Context("and the custom type does not have a version", func() {
@@ -271,7 +279,6 @@ var _ = Describe("Image", func() {
fakeUsedResourceCache *dbfakes.FakeUsedResourceCache
someStdoutWriter io.Writer
someStderrWriter io.Writer
-
)
BeforeEach(func() {
