本文整理汇总了Golang中github.com/concourse/atc/exec/fakes.FakeStep类的典型用法代码示例。如果您正苦于以下问题:Golang FakeStep类的具体用法?Golang FakeStep怎么用?Golang FakeStep使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了FakeStep类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Golang代码示例。
示例1:
execEngine = engine.NewExecEngine(fakeFactory, fakeDelegateFactory, fakeDB)
fakeDelegate = new(fakes.FakeBuildDelegate)
fakeDelegateFactory.DelegateReturns(fakeDelegate)
buildModel = db.Build{ID: 84}
})
Describe("Resume", func() {
Context("get with nil location", func() {
var (
getStepFactory *execfakes.FakeStepFactory
getStep *execfakes.FakeStep
fakeDelegate *fakes.FakeBuildDelegate
fakeGetDelegate *execfakes.FakeGetDelegate
plan atc.Plan
)
BeforeEach(func() {
getStepFactory = new(execfakes.FakeStepFactory)
getStep = new(execfakes.FakeStep)
getStep.ResultStub = successResult(true)
getStepFactory.UsingReturns(getStep)
fakeFactory.GetReturns(getStepFactory)
fakeDelegate = new(fakes.FakeBuildDelegate)
fakeDelegateFactory.DelegateReturns(fakeDelegate)
示例2:
*x = result
return true
default:
return false
}
}
}
var _ = Describe("Conditional", func() {
var (
inStep *fakes.FakeStep
repo *SourceRepository
fakeStepFactory *fakes.FakeStepFactory
conditional Conditional
outStep *fakes.FakeStep
step Step
process ifrit.Process
)
BeforeEach(func() {
inStep = new(fakes.FakeStep)
repo = NewSourceRepository()
fakeStepFactory = new(fakes.FakeStepFactory)
outStep = new(fakes.FakeStep)
outStep.ResultStub = successResult(true)
示例3:
var (
fakeDelegate *fakes.FakeBuildDelegate
fakeInputDelegate *execfakes.FakeGetDelegate
fakeExecutionDelegate *execfakes.FakeTaskDelegate
fakeOutputDelegate *execfakes.FakePutDelegate
buildModel db.Build
inputPlan *atc.GetPlan
outputPlan *atc.ConditionalPlan
privileged bool
taskConfig *atc.TaskConfig
taskConfigPath string
build engine.Build
logger *lagertest.TestLogger
inputStepFactory *execfakes.FakeStepFactory
inputStep *execfakes.FakeStep
taskStepFactory *execfakes.FakeStepFactory
taskStep *execfakes.FakeStep
outputStepFactory *execfakes.FakeStepFactory
outputStep *execfakes.FakeStep
dependentStepFactory *execfakes.FakeStepFactory
dependentStep *execfakes.FakeStep
)
示例4:
execEngine = engine.NewExecEngine(fakeFactory, fakeDelegateFactory, fakeDB)
fakeDelegate = new(fakes.FakeBuildDelegate)
fakeDelegateFactory.DelegateReturns(fakeDelegate)
buildModel = db.Build{ID: 84}
})
Context("running hooked composes", func() {
var (
taskStepFactory *execfakes.FakeStepFactory
taskStep *execfakes.FakeStep
inputStepFactory *execfakes.FakeStepFactory
inputStep *execfakes.FakeStep
outputStepFactory *execfakes.FakeStepFactory
outputStep *execfakes.FakeStep
dependentStepFactory *execfakes.FakeStepFactory
dependentStep *execfakes.FakeStep
)
BeforeEach(func() {
taskStepFactory = new(execfakes.FakeStepFactory)
taskStep = new(execfakes.FakeStep)
taskStep.ResultStub = successResult(true)
taskStepFactory.UsingReturns(taskStep)
fakeFactory.TaskReturns(taskStepFactory)
inputStepFactory = new(execfakes.FakeStepFactory)
示例5:
"github.com/concourse/atc/exec/fakes"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
"github.com/tedsuo/ifrit"
)
var _ = Describe("Timeout Step", func() {
var (
fakeStepFactoryStep *fakes.FakeStepFactory
runStep *fakes.FakeStep
timeout StepFactory
step Step
startStep chan error
process ifrit.Process
timeoutDuration atc.Duration
)
BeforeEach(func() {
startStep = make(chan error, 1)
fakeStepFactoryStep = new(fakes.FakeStepFactory)
runStep = new(fakes.FakeStep)
fakeStepFactoryStep.UsingReturns(runStep)
})
示例6:
fakeWorkerClient = new(wfakes.FakeClient)
factory = NewGardenFactory(fakeWorkerClient, fakeTracker, func() string { return "" })
stdoutBuf = gbytes.NewBuffer()
stderrBuf = gbytes.NewBuffer()
})
Describe("DependentGet", func() {
var (
getDelegate *fakes.FakeGetDelegate
resourceConfig atc.ResourceConfig
params atc.Params
version atc.Version
tags []string
inStep *fakes.FakeStep
repo *SourceRepository
step Step
process ifrit.Process
)
BeforeEach(func() {
getDelegate = new(fakes.FakeGetDelegate)
getDelegate.StdoutReturns(stdoutBuf)
getDelegate.StderrReturns(stderrBuf)
resourceConfig = atc.ResourceConfig{
Name: "some-resource",
Type: "some-resource-type",
示例7:
. "github.com/onsi/gomega"
"github.com/tedsuo/ifrit"
)
var _ = Describe("Compose", func() {
var (
fakeStepFactoryA *fakes.FakeStepFactory
fakeStepFactoryB *fakes.FakeStepFactory
compose StepFactory
inStep *fakes.FakeStep
repo *SourceRepository
outStepA *fakes.FakeStep
outStepB *fakes.FakeStep
startA chan error
finishA chan error
startB chan error
finishB chan error
step Step
process ifrit.Process
)
BeforeEach(func() {
fakeStepFactoryA = new(fakes.FakeStepFactory)
fakeStepFactoryB = new(fakes.FakeStepFactory)
示例8:
import (
"os"
. "github.com/concourse/atc/exec"
"github.com/concourse/atc/exec/fakes"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
)
var _ = Describe("Identity", func() {
var (
inStep *fakes.FakeStep
repo *SourceRepository
identity Identity
step Step
)
BeforeEach(func() {
identity = Identity{}
inStep = new(fakes.FakeStep)
repo = NewSourceRepository()
})
JustBeforeEach(func() {
step = identity.Using(inStep, repo)
})
示例9:
// which defaults to returning whatever the previous step was from using. For
// this reason, the input step gets returned as the next step of type identity
// step, which returns nil when ran.
var _ = Describe("Hooked Compose", func() {
var (
fakeStepFactoryStep *fakes.FakeStepFactory
fakeStepFactoryNextStep *fakes.FakeStepFactory
hookedCompose StepFactory
inStep *fakes.FakeStep
repo *SourceRepository
outStep *fakes.FakeStep
nextStep *fakes.FakeStep
startStep chan error
finishStep chan error
startNextStep chan error
finishNextStep chan error
step Step
process ifrit.Process
)
BeforeEach(func() {
fakeStepFactoryStep = new(fakes.FakeStepFactory)
fakeStepFactoryNextStep = new(fakes.FakeStepFactory)
示例10:
var (
fakeDelegate *fakes.FakeBuildDelegate
fakeInputDelegate *execfakes.FakeGetDelegate
fakeExecutionDelegate *execfakes.FakeTaskDelegate
fakeOutputDelegate *execfakes.FakePutDelegate
buildModel db.Build
expectedMetadata engine.StepMetadata
inputPlan *atc.GetPlan
outputPlan atc.Plan
privileged bool
taskConfig *atc.TaskConfig
build engine.Build
taskConfigPath string
logger *lagertest.TestLogger
inputStepFactory *execfakes.FakeStepFactory
inputStep *execfakes.FakeStep
taskStepFactory *execfakes.FakeStepFactory
taskStep *execfakes.FakeStep
outputStepFactory *execfakes.FakeStepFactory
outputStep *execfakes.FakeStep
dependentStepFactory *execfakes.FakeStepFactory
dependentStep *execfakes.FakeStep
)
示例11:
fakeDelegateFactory = new(fakes.FakeBuildDelegateFactory)
fakeDB = new(fakes.FakeEngineDB)
execEngine = engine.NewExecEngine(fakeFactory, fakeDelegateFactory, fakeDB)
fakeDelegate = new(fakes.FakeBuildDelegate)
fakeDelegateFactory.DelegateReturns(fakeDelegate)
buildModel = db.Build{ID: 84}
})
Context("running try steps", func() {
var (
taskStepFactory *execfakes.FakeStepFactory
taskStep *execfakes.FakeStep
inputStepFactory *execfakes.FakeStepFactory
inputStep *execfakes.FakeStep
)
BeforeEach(func() {
taskStepFactory = new(execfakes.FakeStepFactory)
taskStep = new(execfakes.FakeStep)
taskStep.ResultStub = successResult(true)
taskStepFactory.UsingReturns(taskStep)
fakeFactory.TaskReturns(taskStepFactory)
inputStepFactory = new(execfakes.FakeStepFactory)
inputStep = new(execfakes.FakeStep)
inputStep.ResultStub = successResult(true)
inputStepFactory.UsingReturns(inputStep)
示例12:
}
expectedMetadata = engine.StepMetadata{
BuildID: 84,
BuildName: "42",
JobName: "some-job",
PipelineName: "some-pipeline",
ExternalURL: "http://example.com",
}
})
Context("running try steps", func() {
var (
taskStepFactory *execfakes.FakeStepFactory
taskStep *execfakes.FakeStep
inputStepFactory *execfakes.FakeStepFactory
inputStep *execfakes.FakeStep
)
BeforeEach(func() {
taskStepFactory = new(execfakes.FakeStepFactory)
taskStep = new(execfakes.FakeStep)
taskStep.ResultStub = successResult(true)
taskStepFactory.UsingReturns(taskStep)
fakeFactory.TaskReturns(taskStepFactory)
inputStepFactory = new(execfakes.FakeStepFactory)
inputStep = new(execfakes.FakeStep)
inputStep.ResultStub = successResult(true)
inputStepFactory.UsingReturns(inputStep)
示例13:
import (
"errors"
. "github.com/concourse/atc/exec"
"github.com/concourse/atc/exec/fakes"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
)
var _ = Describe("Try Step", func() {
var (
fakeStepFactoryStep *fakes.FakeStepFactory
runStep *fakes.FakeStep
try StepFactory
step Step
)
BeforeEach(func() {
fakeStepFactoryStep = new(fakes.FakeStepFactory)
runStep = new(fakes.FakeStep)
fakeStepFactoryStep.UsingReturns(runStep)
try = Try(fakeStepFactoryStep)
step = try.Using(nil, nil)
})
Describe("Result", func() {
Context("when compared against Success", func() {
示例14:
expectedMetadata = engine.StepMetadata{
BuildID: 84,
BuildName: "42",
JobName: "some-job",
PipelineName: "some-pipeline",
}
})
Context("running hooked composes", func() {
var (
taskStepFactory *execfakes.FakeStepFactory
taskStep *execfakes.FakeStep
inputStepFactory *execfakes.FakeStepFactory
inputStep *execfakes.FakeStep
outputStepFactory *execfakes.FakeStepFactory
outputStep *execfakes.FakeStep
dependentStepFactory *execfakes.FakeStepFactory
dependentStep *execfakes.FakeStep
)
BeforeEach(func() {
taskStepFactory = new(execfakes.FakeStepFactory)
taskStep = new(execfakes.FakeStep)
taskStep.ResultStub = successResult(true)
taskStepFactory.UsingReturns(taskStep)
fakeFactory.TaskReturns(taskStepFactory)
inputStepFactory = new(execfakes.FakeStepFactory)
示例15:
. "github.com/onsi/gomega"
"github.com/tedsuo/ifrit"
"github.com/concourse/atc/exec"
"github.com/concourse/atc/exec/fakes"
)
var _ = Describe("Ensure Step", func() {
var (
stepFactory *fakes.FakeStepFactory
hookFactory *fakes.FakeStepFactory
step *fakes.FakeStep
hook *fakes.FakeStep
previousStep *fakes.FakeStep
repo *exec.SourceRepository
ensureFactory exec.StepFactory
ensureStep exec.Step
)
BeforeEach(func() {
stepFactory = &fakes.FakeStepFactory{}
hookFactory = &fakes.FakeStepFactory{}
step = &fakes.FakeStep{}
hook = &fakes.FakeStep{}
previousStep = &fakes.FakeStep{}