Skip to content
This repository has been archived by the owner on Feb 28, 2020. It is now read-only.

Commit

Permalink
fix(unsupported services): added tests to check for unwanted behavior…
Browse files Browse the repository at this point in the history
… when given unsupported service payloads from custom bluemix string (#431)
  • Loading branch information
dingwilson authored Jan 21, 2018
1 parent 1ae501e commit b3e1870
Show file tree
Hide file tree
Showing 3 changed files with 539 additions and 0 deletions.
24 changes: 24 additions & 0 deletions test/lib/common_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -485,6 +485,30 @@ exports.itDidNotCreateServiceFiles = function () {
})
}

exports.itDidNotCreateService = function (service) {
it(`service configuration file does not contain ${service}`, function () {
assert.noFileContent(exports.configMappingsFile, service)
})

it(`cloudfoundry manifest does not contain ${service}`, function () {
assert.noFileContent([
[exports.cloudFoundryManifestFile, `- ${service}`]
])
})

it(`bluemix pipeline does not contain ${service} create-service command`, function () {
assert.noFileContent(exports.bluemixPipelineFile, `cf create-service "${service}"`)
})

it(`does not create ${service} boilerplate`, function () {
assert.noFile(`${exports.servicesSourceDir}/Service${service}.swift`)
})

it(`application does not initialize ${service}`, function () {
assert.noFileContent(exports.applicationSourceFile, `try initializeService${service}(cloudEnv: cloudEnv)`)
})
}

exports.itCreatedServiceConfigFiles = function () {
it('created service configuration files', function () {
assert.file(exports.configMappingsFile)
Expand Down
Loading

0 comments on commit b3e1870

Please sign in to comment.