cf-webmock

module
v0.0.0-...-6bf93e3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 22, 2019 License: Apache-2.0

README

cf-webmock

Mocking library with a generic interface to mock sequential web requests. Provides DSL-ish wrappers for bosh and uaa apis.

Usage

Initialize mock server

BeforeEach(func() {
	boshDirector = mockbosh.New()
})

Setup mocks before interactions

boshDirector.VerifyAndMock(
  mockbosh.Manifest(deploymentName(instanceID)).NotFound(),
  mockbosh.Tasks(deploymentName(instanceID)).RespondsWithNoTasks(),
  mockbosh.Deploy().WithManifest(manifestForFirstDeployment).RedirectsToTask(taskID),
)

Verify after test runs

AfterEach(func() {
  boshDirector.VerifyMocks()
})

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL