本文整理汇总了Golang中github.com/concourse/atc/worker/fakes.FakeWorker.CreateContainerArgsForCall方法的典型用法代码示例。如果您正苦于以下问题:Golang FakeWorker.CreateContainerArgsForCall方法的具体用法?Golang FakeWorker.CreateContainerArgsForCall怎么用?Golang FakeWorker.CreateContainerArgsForCall使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类github.com/concourse/atc/worker/fakes.FakeWorker
的用法示例。
在下文中一共展示了FakeWorker.CreateContainerArgsForCall方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Golang代码示例。
示例1:
It("chose the worker satisfying the resource type and tags", func() {
Expect(workerClient.SatisfyingArgsForCall(0)).To(Equal(worker.WorkerSpec{
ResourceType: "type1",
Tags: []string{"resource", "tags"},
}))
})
It("located it on the correct worker", func() {
Expect(cacheIdentifier.FindOnCallCount()).To(Equal(1))
_, baggageclaimClient := cacheIdentifier.FindOnArgsForCall(0)
Expect(baggageclaimClient).To(Equal(fakeBaggageclaimClient))
})
It("creates the container with the cache volume", func() {
_, id, spec := satisfyingWorker.CreateContainerArgsForCall(0)
Expect(id).To(Equal(session.ID))
resourceSpec := spec.(worker.ResourceTypeContainerSpec)
Expect(resourceSpec.Type).To(Equal(string(initType)))
Expect(resourceSpec.Env).To(Equal([]string{"a=1", "b=2"}))
Expect(resourceSpec.Ephemeral).To(Equal(true))
Expect(resourceSpec.Tags).To(ConsistOf("resource", "tags"))
Expect(resourceSpec.Cache).To(Equal(worker.VolumeMount{
Volume: foundVolume,
MountPath: "/tmp/build/get",
}))
})
It("saves the volume information to the database", func() {