Merge pull request #943 from balena-io/test-device-config-defaults

test: Add a test case for deviceConfig.getDefaults
This commit is contained in:
Pablo Carranza Vélez 2019-03-28 17:11:33 -07:00 committed by GitHub
commit 114a62606c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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', ->