コード例 #1
0
ファイル: db_provider_test.go プロジェクト: ACPK/atc
	})

	Context("when we call to get a container info by identifier", func() {
		It("calls through to the db object", func() {
			provider.FindContainerForIdentifier(Identifier{
				Name:         "some-name",
				PipelineName: "some-pipeline",
				BuildID:      1234,
				Type:         db.ContainerTypePut,
				CheckType:    "some-check-type",
				CheckSource:  atc.Source{"some": "source"},
				WorkerName:   "some-worker-name",
				StepLocation: 1,
			})

			Expect(fakeDB.FindContainerByIdentifierCallCount()).To(Equal(1))

			Expect(fakeDB.FindContainerByIdentifierArgsForCall(0)).To(Equal(db.ContainerIdentifier{
				Name:         "some-name",
				PipelineName: "some-pipeline",
				BuildID:      1234,
				Type:         db.ContainerTypePut,
				CheckType:    "some-check-type",
				CheckSource:  atc.Source{"some": "source"},
				WorkerName:   "some-worker-name",
				StepLocation: 1,
			}))
		})
	})
})