本文整理汇总了Golang中github.com/concourse/atc/exec/fakes.FakeStep类的典型用法代码示例。如果您正苦于以下问题:Golang FakeStep类的具体用法?Golang FakeStep怎么用?Golang FakeStep使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了FakeStep类的17个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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)
开发者ID:utako,项目名称:atc,代码行数:29,代码来源:exec_engine_locations_test.go
示例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)
开发者ID:savaki,项目名称:atc,代码行数:31,代码来源:conditional_test.go
示例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
)
开发者ID:utako,项目名称:atc,代码行数:31,代码来源:exec_engine_test.go
示例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)
开发者ID:utako,项目名称:atc,代码行数:31,代码来源:exec_engine_hooks_test.go
示例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)
})
开发者ID:savaki,项目名称:atc,代码行数:29,代码来源:timeout_step_test.go
示例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",
开发者ID:savaki,项目名称:atc,代码行数:31,代码来源:dependent_get_step_test.go
示例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)
开发者ID:utako,项目名称:atc,代码行数:30,代码来源:compose_test.go
示例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)
})
开发者ID:utako,项目名称:atc,代码行数:30,代码来源:identity_test.go
示例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)
开发者ID:savaki,项目名称:atc,代码行数:30,代码来源:hooked_compose_step_test.go
示例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
)
开发者ID:ACPK,项目名称:atc,代码行数:31,代码来源:exec_engine_test.go
示例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)
开发者ID:savaki,项目名称:atc,代码行数:31,代码来源:exec_engine_try_test.go
示例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)
开发者ID:pcfdev-forks,项目名称:atc,代码行数:31,代码来源:exec_engine_try_test.go
示例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() {
开发者ID:pcfdev-forks,项目名称:atc,代码行数:31,代码来源:try_step_test.go
示例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)
开发者ID:ACPK,项目名称:atc,代码行数:31,代码来源:exec_engine_hooks_test.go
示例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{}
开发者ID:ACPK,项目名称:atc,代码行数:32,代码来源:ensure_test.go
示例16:
"github.com/concourse/atc/exec/fakes"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
"github.com/tedsuo/ifrit"
)
var _ = Describe("Aggregate", func() {
var (
fakeStepA *fakes.FakeStepFactory
fakeStepB *fakes.FakeStepFactory
aggregate StepFactory
inStep *fakes.FakeStep
repo *SourceRepository
outStepA *fakes.FakeStep
outStepB *fakes.FakeStep
step Step
process ifrit.Process
)
BeforeEach(func() {
fakeStepA = new(fakes.FakeStepFactory)
fakeStepB = new(fakes.FakeStepFactory)
aggregate = Aggregate{
fakeStepA,
fakeStepB,
开发者ID:savaki,项目名称:atc,代码行数:30,代码来源:aggregate_test.go
示例17:
. "github.com/concourse/atc/exec"
"github.com/tedsuo/ifrit"
"github.com/concourse/atc/exec/fakes"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
)
var _ = Describe("Retry Step", func() {
var (
attempt1Factory *fakes.FakeStepFactory
attempt1Step *fakes.FakeStep
attempt2Factory *fakes.FakeStepFactory
attempt2Step *fakes.FakeStep
attempt3Factory *fakes.FakeStepFactory
attempt3Step *fakes.FakeStep
stepFactory StepFactory
step Step
)
BeforeEach(func() {
attempt1Factory = new(fakes.FakeStepFactory)
attempt1Step = new(fakes.FakeStep)
attempt1Factory.UsingReturns(attempt1Step)
attempt2Factory = new(fakes.FakeStepFactory)
attempt2Step = new(fakes.FakeStep)
attempt2Factory.UsingReturns(attempt2Step)
开发者ID:pcfdev-forks,项目名称:atc,代码行数:31,代码来源:retry_test.go
注:本文中的github.com/concourse/atc/exec/fakes.FakeStep类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论