mirror of
https://github.com/balena-os/balena-supervisor.git
synced 2025-01-31 00:23:57 +00:00
Add regression test for app manager init
If we had it eearlier, it would have prevented #1148. When init is called, withImagesFromDockerAndDB in images.ts is called as well. Change-type: patch Signed-off-by: Roman Mazur <roman@balena.io>
This commit is contained in:
parent
8de85a6a53
commit
f487711ba4
@ -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])
|
||||
|
Loading…
x
Reference in New Issue
Block a user