2017-11-01 06:47:48 +00:00
|
|
|
Promise = require 'bluebird'
|
|
|
|
_ = require 'lodash'
|
|
|
|
|
2019-06-19 17:23:19 +00:00
|
|
|
{ stub } = require 'sinon'
|
|
|
|
chai = require './lib/chai-config'
|
|
|
|
chai.use(require('chai-events'))
|
|
|
|
{ expect } = chai
|
2017-11-01 06:47:48 +00:00
|
|
|
|
|
|
|
prepare = require './lib/prepare'
|
|
|
|
DeviceState = require '../src/device-state'
|
2018-12-20 11:47:17 +00:00
|
|
|
{ DB } = require('../src/db')
|
2018-12-24 10:45:03 +00:00
|
|
|
{ Config } = require('../src/config')
|
2018-09-18 14:36:59 +00:00
|
|
|
{ Service } = require '../src/compose/service'
|
2019-07-01 19:26:42 +00:00
|
|
|
{ Network } = require '../src/compose/network'
|
2019-07-08 10:20:56 +00:00
|
|
|
{ Volume } = require '../src/compose/volume'
|
2017-11-01 06:47:48 +00:00
|
|
|
|
|
|
|
appDBFormatNormalised = {
|
|
|
|
appId: 1234
|
|
|
|
commit: 'bar'
|
|
|
|
releaseId: 2
|
|
|
|
name: 'app'
|
2018-05-18 12:27:41 +00:00
|
|
|
source: 'https://api.resin.io'
|
2017-11-01 06:47:48 +00:00
|
|
|
services: JSON.stringify([
|
|
|
|
{
|
|
|
|
appId: 1234
|
|
|
|
serviceName: 'serv'
|
|
|
|
imageId: 12345
|
|
|
|
environment: { FOO: 'var2' }
|
|
|
|
labels: {}
|
|
|
|
image: 'foo/bar:latest'
|
|
|
|
releaseId: 2
|
|
|
|
serviceId: 4
|
|
|
|
commit: 'bar'
|
|
|
|
}
|
|
|
|
])
|
|
|
|
networks: '{}'
|
|
|
|
volumes: '{}'
|
|
|
|
}
|
|
|
|
|
|
|
|
appStateFormat = {
|
|
|
|
appId: 1234
|
|
|
|
commit: 'bar'
|
|
|
|
releaseId: 2
|
|
|
|
name: 'app'
|
2018-05-18 12:27:41 +00:00
|
|
|
# This technically is not part of the appStateFormat, but in general
|
|
|
|
# usage is added before calling normaliseAppForDB
|
|
|
|
source: 'https://api.resin.io'
|
2017-11-01 06:47:48 +00:00
|
|
|
services: {
|
|
|
|
'4': {
|
|
|
|
appId: 1234
|
|
|
|
serviceName: 'serv'
|
|
|
|
imageId: 12345
|
|
|
|
environment: { FOO: 'var2' }
|
|
|
|
labels: {}
|
|
|
|
image: 'foo/bar:latest'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
appStateFormatNeedsServiceCreate = {
|
|
|
|
appId: 1234
|
|
|
|
commit: 'bar'
|
|
|
|
releaseId: 2
|
|
|
|
name: 'app'
|
|
|
|
services: [
|
|
|
|
{
|
|
|
|
appId: 1234
|
|
|
|
environment: {
|
|
|
|
FOO: 'var2'
|
|
|
|
}
|
|
|
|
imageId: 12345
|
|
|
|
serviceId: 4
|
|
|
|
releaseId: 2
|
|
|
|
serviceName: 'serv'
|
|
|
|
image: 'foo/bar:latest'
|
|
|
|
}
|
|
|
|
]
|
|
|
|
networks: {}
|
|
|
|
volumes: {}
|
|
|
|
}
|
|
|
|
|
|
|
|
dependentStateFormat = {
|
|
|
|
appId: 1234
|
|
|
|
image: 'foo/bar'
|
|
|
|
commit: 'bar'
|
|
|
|
releaseId: 3
|
|
|
|
name: 'app'
|
|
|
|
config: { RESIN_FOO: 'var' }
|
|
|
|
environment: { FOO: 'var2' }
|
|
|
|
parentApp: 256
|
|
|
|
imageId: 45
|
|
|
|
}
|
|
|
|
|
|
|
|
dependentStateFormatNormalised = {
|
|
|
|
appId: 1234
|
|
|
|
image: 'foo/bar:latest'
|
|
|
|
commit: 'bar'
|
|
|
|
releaseId: 3
|
|
|
|
name: 'app'
|
|
|
|
config: { RESIN_FOO: 'var' }
|
|
|
|
environment: { FOO: 'var2' }
|
|
|
|
parentApp: 256
|
|
|
|
imageId: 45
|
|
|
|
}
|
|
|
|
|
2018-09-18 14:36:59 +00:00
|
|
|
currentState = targetState = availableImages = null
|
|
|
|
|
2017-11-01 06:47:48 +00:00
|
|
|
dependentDBFormat = {
|
|
|
|
appId: 1234
|
|
|
|
image: 'foo/bar:latest'
|
|
|
|
commit: 'bar'
|
|
|
|
releaseId: 3
|
|
|
|
name: 'app'
|
|
|
|
config: JSON.stringify({ RESIN_FOO: 'var' })
|
|
|
|
environment: JSON.stringify({ FOO: 'var2' })
|
|
|
|
parentApp: 256
|
|
|
|
imageId: 45
|
|
|
|
}
|
|
|
|
|
|
|
|
describe 'ApplicationManager', ->
|
|
|
|
before ->
|
|
|
|
prepare()
|
|
|
|
@db = new DB()
|
|
|
|
@config = new Config({ @db })
|
|
|
|
eventTracker = {
|
|
|
|
track: console.log
|
|
|
|
}
|
2019-04-25 12:48:27 +00:00
|
|
|
@logger = {
|
|
|
|
clearOutOfDateDBLogs: ->
|
|
|
|
}
|
|
|
|
@deviceState = new DeviceState({ @db, @config, eventTracker, @logger })
|
2017-11-01 06:47:48 +00:00
|
|
|
@applications = @deviceState.applications
|
|
|
|
stub(@applications.images, 'inspectByName').callsFake (imageName) ->
|
|
|
|
Promise.resolve({
|
|
|
|
Config: {
|
|
|
|
Cmd: [ 'someCommand' ]
|
|
|
|
Entrypoint: [ 'theEntrypoint' ]
|
|
|
|
Env: []
|
|
|
|
Labels: {}
|
|
|
|
Volumes: []
|
|
|
|
}
|
|
|
|
})
|
|
|
|
stub(@applications.docker, 'getNetworkGateway').returns(Promise.resolve('172.17.0.1'))
|
2019-07-12 15:36:40 +00:00
|
|
|
stub(@applications.docker, 'listContainers').returns(Promise.resolve([]))
|
2018-09-18 14:36:59 +00:00
|
|
|
stub(Service, 'extendEnvVars').callsFake (env) ->
|
|
|
|
env['ADDITIONAL_ENV_VAR'] = 'foo'
|
|
|
|
return env
|
2017-11-01 06:47:48 +00:00
|
|
|
@normaliseCurrent = (current) ->
|
2019-07-01 19:26:42 +00:00
|
|
|
Promise.map current.local.apps, (app) =>
|
2017-11-01 06:47:48 +00:00
|
|
|
Promise.map app.services, (service) ->
|
2018-09-18 14:36:59 +00:00
|
|
|
Service.fromComposeObject(service, { appName: 'test' })
|
2019-07-01 19:26:42 +00:00
|
|
|
.then (normalisedServices) =>
|
2018-09-18 14:36:59 +00:00
|
|
|
appCloned = _.cloneDeep(app)
|
2017-11-01 06:47:48 +00:00
|
|
|
appCloned.services = normalisedServices
|
2019-07-01 19:26:42 +00:00
|
|
|
appCloned.networks = _.mapValues appCloned.networks, (config, name) =>
|
|
|
|
Network.fromComposeObject(
|
|
|
|
name,
|
|
|
|
app.appId,
|
|
|
|
config
|
2019-07-02 08:33:15 +00:00
|
|
|
{ docker: @applications.docker, @logger }
|
2019-07-01 19:26:42 +00:00
|
|
|
)
|
2017-11-01 06:47:48 +00:00
|
|
|
return appCloned
|
|
|
|
.then (normalisedApps) ->
|
2018-09-18 14:36:59 +00:00
|
|
|
currentCloned = _.cloneDeep(current)
|
2019-07-08 10:20:56 +00:00
|
|
|
currentCloned.local.apps = _.keyBy(normalisedApps, 'appId')
|
2017-11-01 06:47:48 +00:00
|
|
|
return currentCloned
|
|
|
|
|
|
|
|
@normaliseTarget = (target, available) =>
|
|
|
|
Promise.map target.local.apps, (app) =>
|
|
|
|
@applications.normaliseAppForDB(app)
|
|
|
|
.then (normalisedApp) =>
|
|
|
|
@applications.normaliseAndExtendAppFromDB(normalisedApp)
|
|
|
|
.then (apps) ->
|
|
|
|
targetCloned = _.cloneDeep(target)
|
|
|
|
# We mock what createTargetService does when an image is available
|
|
|
|
targetCloned.local.apps = _.map apps, (app) ->
|
|
|
|
app.services = _.map app.services, (service) ->
|
2018-09-18 14:36:59 +00:00
|
|
|
img = _.find(available, (i) -> i.name == service.config.image)
|
2017-11-01 06:47:48 +00:00
|
|
|
if img?
|
2018-09-18 14:36:59 +00:00
|
|
|
service.config.image = img.dockerImageId
|
2017-11-01 06:47:48 +00:00
|
|
|
return service
|
|
|
|
return app
|
2019-07-08 10:20:56 +00:00
|
|
|
targetCloned.local.apps = _.keyBy(targetCloned.local.apps, 'appId')
|
2017-11-01 06:47:48 +00:00
|
|
|
return targetCloned
|
|
|
|
@db.init()
|
|
|
|
.then =>
|
|
|
|
@config.init()
|
|
|
|
|
2018-09-18 14:36:59 +00:00
|
|
|
beforeEach ->
|
|
|
|
{ currentState, targetState, availableImages } = require './lib/application-manager-test-states'
|
|
|
|
|
2017-11-01 06:47:48 +00:00
|
|
|
after ->
|
|
|
|
@applications.images.inspectByName.restore()
|
|
|
|
@applications.docker.getNetworkGateway.restore()
|
2019-07-12 15:36:40 +00:00
|
|
|
@applications.docker.listContainers.restore()
|
2018-09-18 14:36:59 +00:00
|
|
|
Service.extendEnvVars.restore()
|
2017-11-01 06:47:48 +00:00
|
|
|
|
|
|
|
it 'infers a start step when all that changes is a running state', ->
|
|
|
|
Promise.join(
|
|
|
|
@normaliseCurrent(currentState[0])
|
|
|
|
@normaliseTarget(targetState[0], availableImages[0])
|
|
|
|
(current, target) =>
|
2019-07-12 15:36:40 +00:00
|
|
|
steps = @applications._inferNextSteps(false, availableImages[0], [], true, current, target, false, {}, {})
|
2017-11-01 06:47:48 +00:00
|
|
|
expect(steps).to.eventually.deep.equal([{
|
|
|
|
action: 'start'
|
2019-07-08 10:20:56 +00:00
|
|
|
current: current.local.apps['1234'].services[1]
|
|
|
|
target: target.local.apps['1234'].services[1]
|
2017-11-01 06:47:48 +00:00
|
|
|
serviceId: 24
|
|
|
|
appId: 1234
|
|
|
|
options: {}
|
|
|
|
}])
|
|
|
|
)
|
|
|
|
|
|
|
|
it 'infers a kill step when a service has to be removed', ->
|
|
|
|
Promise.join(
|
|
|
|
@normaliseCurrent(currentState[0])
|
|
|
|
@normaliseTarget(targetState[1], availableImages[0])
|
|
|
|
(current, target) =>
|
2019-07-12 15:36:40 +00:00
|
|
|
steps = @applications._inferNextSteps(false, availableImages[0], [], true, current, target, false, {}, {})
|
2017-11-01 06:47:48 +00:00
|
|
|
expect(steps).to.eventually.deep.equal([{
|
|
|
|
action: 'kill'
|
2019-07-08 10:20:56 +00:00
|
|
|
current: current.local.apps['1234'].services[1]
|
2017-11-01 06:47:48 +00:00
|
|
|
target: null
|
|
|
|
serviceId: 24
|
|
|
|
appId: 1234
|
|
|
|
options: {}
|
|
|
|
}])
|
|
|
|
)
|
|
|
|
|
|
|
|
it 'infers a fetch step when a service has to be updated', ->
|
|
|
|
Promise.join(
|
|
|
|
@normaliseCurrent(currentState[0])
|
|
|
|
@normaliseTarget(targetState[2], availableImages[0])
|
|
|
|
(current, target) =>
|
2019-07-12 15:36:40 +00:00
|
|
|
steps = @applications._inferNextSteps(false, availableImages[0], [], true, current, target, false, {}, {})
|
2017-11-01 06:47:48 +00:00
|
|
|
expect(steps).to.eventually.deep.equal([{
|
|
|
|
action: 'fetch'
|
2019-07-08 10:20:56 +00:00
|
|
|
image: @applications.imageForService(target.local.apps['1234'].services[1])
|
2017-11-01 06:47:48 +00:00
|
|
|
serviceId: 24
|
|
|
|
appId: 1234
|
2019-05-08 10:01:20 +00:00
|
|
|
serviceName: 'anotherService'
|
2017-11-01 06:47:48 +00:00
|
|
|
}])
|
|
|
|
)
|
|
|
|
|
|
|
|
it 'does not infer a fetch step when the download is already in progress', ->
|
|
|
|
Promise.join(
|
|
|
|
@normaliseCurrent(currentState[0])
|
|
|
|
@normaliseTarget(targetState[2], availableImages[0])
|
|
|
|
(current, target) =>
|
2019-07-12 15:36:40 +00:00
|
|
|
steps = @applications._inferNextSteps(false, availableImages[0], [ target.local.apps['1234'].services[1].imageId ], true, current, target, false, {}, {})
|
2017-11-01 06:47:48 +00:00
|
|
|
expect(steps).to.eventually.deep.equal([{ action: 'noop', appId: 1234 }])
|
|
|
|
)
|
|
|
|
|
|
|
|
it 'infers a kill step when a service has to be updated but the strategy is kill-then-download', ->
|
|
|
|
Promise.join(
|
|
|
|
@normaliseCurrent(currentState[0])
|
|
|
|
@normaliseTarget(targetState[3], availableImages[0])
|
|
|
|
(current, target) =>
|
2019-07-12 15:36:40 +00:00
|
|
|
steps = @applications._inferNextSteps(false, availableImages[0], [], true, current, target, false, {}, {})
|
2017-11-01 06:47:48 +00:00
|
|
|
expect(steps).to.eventually.deep.equal([{
|
|
|
|
action: 'kill'
|
2019-07-08 10:20:56 +00:00
|
|
|
current: current.local.apps['1234'].services[1]
|
|
|
|
target: target.local.apps['1234'].services[1]
|
2017-11-01 06:47:48 +00:00
|
|
|
serviceId: 24
|
|
|
|
appId: 1234
|
|
|
|
options: {}
|
|
|
|
}])
|
|
|
|
)
|
|
|
|
|
|
|
|
it 'does not infer to kill a service with default strategy if a dependency is not downloaded', ->
|
|
|
|
Promise.join(
|
|
|
|
@normaliseCurrent(currentState[4])
|
|
|
|
@normaliseTarget(targetState[4], availableImages[2])
|
|
|
|
(current, target) =>
|
2019-07-12 15:36:40 +00:00
|
|
|
steps = @applications._inferNextSteps(false, availableImages[2], [], true, current, target, false, {}, {})
|
2019-03-11 17:54:59 +00:00
|
|
|
expect(steps).to.eventually.have.deep.members([{
|
2017-11-01 06:47:48 +00:00
|
|
|
action: 'fetch'
|
2019-07-08 10:20:56 +00:00
|
|
|
image: @applications.imageForService(target.local.apps['1234'].services[0])
|
2017-11-01 06:47:48 +00:00
|
|
|
serviceId: 23
|
2019-05-08 10:01:20 +00:00
|
|
|
appId: 1234,
|
|
|
|
serviceName: 'aservice'
|
2019-03-11 17:54:59 +00:00
|
|
|
}, { action: 'noop', appId: 1234 }])
|
2017-11-01 06:47:48 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
it 'infers to kill several services as long as there is no unmet dependency', ->
|
|
|
|
Promise.join(
|
|
|
|
@normaliseCurrent(currentState[0])
|
|
|
|
@normaliseTarget(targetState[5], availableImages[1])
|
|
|
|
(current, target) =>
|
2019-07-12 15:36:40 +00:00
|
|
|
steps = @applications._inferNextSteps(false, availableImages[1], [], true, current, target, false, {}, {})
|
2017-11-01 06:47:48 +00:00
|
|
|
expect(steps).to.eventually.have.deep.members([
|
|
|
|
{
|
|
|
|
action: 'kill'
|
2019-07-08 10:20:56 +00:00
|
|
|
current: current.local.apps['1234'].services[0]
|
|
|
|
target: target.local.apps['1234'].services[0]
|
2017-11-01 06:47:48 +00:00
|
|
|
serviceId: 23
|
|
|
|
appId: 1234
|
|
|
|
options: {}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
action: 'kill'
|
2019-07-08 10:20:56 +00:00
|
|
|
current: current.local.apps['1234'].services[1]
|
|
|
|
target: target.local.apps['1234'].services[1]
|
2017-11-01 06:47:48 +00:00
|
|
|
serviceId: 24
|
|
|
|
appId: 1234
|
|
|
|
options: {}
|
|
|
|
}
|
|
|
|
])
|
|
|
|
)
|
|
|
|
|
|
|
|
it 'infers to start the dependency first', ->
|
|
|
|
Promise.join(
|
|
|
|
@normaliseCurrent(currentState[1])
|
|
|
|
@normaliseTarget(targetState[4], availableImages[1])
|
|
|
|
(current, target) =>
|
2019-07-12 15:36:40 +00:00
|
|
|
steps = @applications._inferNextSteps(false, availableImages[1], [], true, current, target, false, {}, {})
|
2017-11-01 06:47:48 +00:00
|
|
|
expect(steps).to.eventually.have.deep.members([
|
|
|
|
{
|
|
|
|
action: 'start'
|
|
|
|
current: null
|
2019-07-08 10:20:56 +00:00
|
|
|
target: target.local.apps['1234'].services[0]
|
2017-11-01 06:47:48 +00:00
|
|
|
serviceId: 23
|
|
|
|
appId: 1234
|
|
|
|
options: {}
|
|
|
|
}
|
|
|
|
])
|
|
|
|
)
|
|
|
|
|
|
|
|
it 'infers to start a service once its dependency has been met', ->
|
|
|
|
Promise.join(
|
|
|
|
@normaliseCurrent(currentState[2])
|
|
|
|
@normaliseTarget(targetState[4], availableImages[1])
|
|
|
|
(current, target) =>
|
2019-07-12 15:36:40 +00:00
|
|
|
steps = @applications._inferNextSteps(false, availableImages[1], [], true, current, target, false, {}, {}, {})
|
2017-11-01 06:47:48 +00:00
|
|
|
expect(steps).to.eventually.have.deep.members([
|
|
|
|
{
|
|
|
|
action: 'start'
|
|
|
|
current: null
|
2019-07-08 10:20:56 +00:00
|
|
|
target: target.local.apps['1234'].services[1]
|
2017-11-01 06:47:48 +00:00
|
|
|
serviceId: 24
|
|
|
|
appId: 1234
|
|
|
|
options: {}
|
|
|
|
}
|
|
|
|
])
|
|
|
|
)
|
|
|
|
|
|
|
|
it 'infers to remove spurious containers', ->
|
|
|
|
Promise.join(
|
|
|
|
@normaliseCurrent(currentState[3])
|
|
|
|
@normaliseTarget(targetState[4], availableImages[1])
|
|
|
|
(current, target) =>
|
2019-07-12 15:36:40 +00:00
|
|
|
steps = @applications._inferNextSteps(false, availableImages[1], [], true, current, target, false, {}, {})
|
2017-11-01 06:47:48 +00:00
|
|
|
expect(steps).to.eventually.have.deep.members([
|
|
|
|
{
|
|
|
|
action: 'kill'
|
2019-07-08 10:20:56 +00:00
|
|
|
current: current.local.apps['1234'].services[0]
|
2017-11-01 06:47:48 +00:00
|
|
|
target: null
|
|
|
|
serviceId: 23
|
|
|
|
appId: 1234
|
|
|
|
options: {}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
action: 'start'
|
|
|
|
current: null
|
2019-07-08 10:20:56 +00:00
|
|
|
target: target.local.apps['1234'].services[1]
|
2017-11-01 06:47:48 +00:00
|
|
|
serviceId: 24
|
|
|
|
appId: 1234
|
|
|
|
options: {}
|
|
|
|
}
|
|
|
|
])
|
|
|
|
)
|
|
|
|
|
|
|
|
it 'converts an app from a state format to a db format, adding missing networks and volumes and normalising the image name', ->
|
|
|
|
app = @applications.normaliseAppForDB(appStateFormat)
|
|
|
|
expect(app).to.eventually.deep.equal(appDBFormatNormalised)
|
|
|
|
|
|
|
|
it 'converts a dependent app from a state format to a db format, normalising the image name', ->
|
|
|
|
app = @applications.proxyvisor.normaliseDependentAppForDB(dependentStateFormat)
|
|
|
|
expect(app).to.eventually.deep.equal(dependentDBFormat)
|
|
|
|
|
|
|
|
it 'converts an app in DB format into state format, adding default and missing fields', ->
|
|
|
|
@applications.normaliseAndExtendAppFromDB(appDBFormatNormalised)
|
|
|
|
.then (app) ->
|
|
|
|
appStateFormatWithDefaults = _.cloneDeep(appStateFormatNeedsServiceCreate)
|
|
|
|
opts = { imageInfo: { Config: { Cmd: [ 'someCommand' ], Entrypoint: [ 'theEntrypoint' ] } } }
|
|
|
|
appStateFormatWithDefaults.services = _.map appStateFormatWithDefaults.services, (service) ->
|
|
|
|
service.imageName = service.image
|
2018-09-18 14:36:59 +00:00
|
|
|
return Service.fromComposeObject(service, opts)
|
2017-11-01 06:47:48 +00:00
|
|
|
expect(JSON.parse(JSON.stringify(app))).to.deep.equal(JSON.parse(JSON.stringify(appStateFormatWithDefaults)))
|
|
|
|
|
|
|
|
it 'converts a dependent app in DB format into state format', ->
|
|
|
|
app = @applications.proxyvisor.normaliseDependentAppFromDB(dependentDBFormat)
|
|
|
|
expect(app).to.eventually.deep.equal(dependentStateFormatNormalised)
|
2019-07-08 10:20:56 +00:00
|
|
|
|
|
|
|
describe 'Volumes', ->
|
|
|
|
|
|
|
|
before ->
|
|
|
|
stub(@applications, 'removeAllVolumesForApp').returns(Promise.resolve([{
|
|
|
|
action: 'removeVolume',
|
|
|
|
current: Volume.fromComposeObject('my_volume', 12, {}, { docker: null, logger: null })
|
|
|
|
}]))
|
|
|
|
|
|
|
|
after ->
|
|
|
|
@applications.removeAllVolumesForApp.restore()
|
|
|
|
|
|
|
|
it 'should not remove volumes when they are no longer referenced', ->
|
|
|
|
Promise.join(
|
|
|
|
@normaliseCurrent(currentState[6]),
|
|
|
|
@normaliseTarget(targetState[0], availableImages[0])
|
|
|
|
(current, target) =>
|
2019-07-12 15:36:40 +00:00
|
|
|
@applications._inferNextSteps(false, availableImages[0], [], true, current, target, false, {}, {}).then (steps) ->
|
2019-07-08 10:20:56 +00:00
|
|
|
expect(
|
|
|
|
_.every(steps, (s) -> s.action != 'removeVolume'),
|
|
|
|
'Volumes from current app should not be removed'
|
|
|
|
).to.be.true
|
|
|
|
)
|
|
|
|
|
|
|
|
it 'should remove volumes from previous applications', ->
|
|
|
|
Promise.join(
|
|
|
|
@normaliseCurrent(currentState[5])
|
|
|
|
@normaliseTarget(targetState[6], [])
|
|
|
|
(current, target) =>
|
2019-07-12 15:36:40 +00:00
|
|
|
@applications._inferNextSteps(false, [], [], true, current, target, false, {}, {}).then (steps) ->
|
2019-07-08 10:20:56 +00:00
|
|
|
expect(steps).to.have.length(1)
|
|
|
|
expect(steps[0]).to.have.property('action').that.equals('removeVolume')
|
|
|
|
expect(steps[0].current).to.have.property('appId').that.equals(12)
|
|
|
|
)
|