test: Add a test case for deviceConfig.getDefaults

This would help avoid bugs like the one fixed in 9.11.1.

Change-type: patch
Signed-off-by: Pablo Carranza Velez <pablo@balena.io>
This commit is contained in:
Pablo Carranza Velez 2019-03-19 14:27:27 -07:00
parent e5fee8d277
commit ea6ebf8223

View File

@ -164,6 +164,24 @@ describe 'DeviceConfig', ->
SUPERVISOR_POLL_INTERVAL: '100',
})
it 'returns default configuration values', ->
conf = @deviceConfig.getDefaults()
expect(conf).to.deep.equal({
SUPERVISOR_VPN_CONTROL: 'true'
SUPERVISOR_POLL_INTERVAL: '60000',
SUPERVISOR_LOCAL_MODE: 'false',
SUPERVISOR_CONNECTIVITY_CHECK: 'true',
SUPERVISOR_LOG_CONTROL: 'true',
SUPERVISOR_DELTA: 'false',
SUPERVISOR_DELTA_REQUEST_TIMEOUT: '30000',
SUPERVISOR_DELTA_APPLY_TIMEOUT: '0',
SUPERVISOR_DELTA_RETRY_COUNT: '30',
SUPERVISOR_DELTA_RETRY_INTERVAL: '10000',
SUPERVISOR_DELTA_VERSION: '2',
SUPERVISOR_OVERRIDE_LOCK: 'false',
SUPERVISOR_PERSISTENT_LOGGING: 'false',
})
describe 'Extlinux files', ->
it 'should correctly write to extlinux.conf files', ->