From ea6ebf822312665280903424d3f4bff1edd0476c Mon Sep 17 00:00:00 2001 From: Pablo Carranza Velez Date: Tue, 19 Mar 2019 14:27:27 -0700 Subject: [PATCH] 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 --- test/13-device-config.spec.coffee | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/test/13-device-config.spec.coffee b/test/13-device-config.spec.coffee index dfeb0795..5978562d 100644 --- a/test/13-device-config.spec.coffee +++ b/test/13-device-config.spec.coffee @@ -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', ->