Merge pull request #1149 from balena-io/roman/regression-db-test

Add regression test for app manager init
This commit is contained in:
Roman Mazur 2019-11-27 20:23:46 +02:00 committed by GitHub
commit 97fab2099f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -142,6 +142,7 @@ describe 'ApplicationManager', ->
})
stub(@applications.docker, 'getNetworkGateway').returns(Promise.resolve('172.17.0.1'))
stub(@applications.docker, 'listContainers').returns(Promise.resolve([]))
stub(@applications.docker, 'listImages').returns(Promise.resolve([]))
stub(Service, 'extendEnvVars').callsFake (env) ->
env['ADDITIONAL_ENV_VAR'] = 'foo'
return env
@ -195,6 +196,9 @@ describe 'ApplicationManager', ->
@applications.docker.listContainers.restore()
Service.extendEnvVars.restore()
it 'should init', ->
@applications.init()
it 'infers a start step when all that changes is a running state', ->
Promise.join(
@normaliseCurrent(currentState[0])