Skip to content

Commit

Permalink
fix: don't set DHIS2_CORE_CONFIG to undefined, it needs to be unset
Browse files Browse the repository at this point in the history
  • Loading branch information
amcgee committed Apr 3, 2020
1 parent 5c1d263 commit 21b467a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
4 changes: 3 additions & 1 deletion packages/cluster/src/common.js
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,9 @@ module.exports.makeEnvironment = cfg => {
DHIS2_CORE_VERSION: cfg.dhis2Version,
DHIS2_CORE_DB_VERSION: cfg.dbVersion,
DHIS2_CORE_PORT: cfg.port,
DHIS2_CORE_CONFIG: cfg.dhis2Config,
}
if (cfg.dhis2Config) {
env.DHIS2_CORE_CONFIG = cfg.dhis2Config
}

reporter.debug('Runtime environment\n', env)
Expand Down
5 changes: 0 additions & 5 deletions packages/cluster/tests/setup-environment.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ test('build runtime environment based on defaults', async function(t) {
DHIS2_CORE_VERSION: 'dev',
DHIS2_CORE_DB_VERSION: 'dev',
DHIS2_CORE_PORT: defaults.port,
DHIS2_CORE_CONFIG: undefined,
}

t.deepEqual(actual, expected, 'default environment')
Expand Down Expand Up @@ -57,7 +56,6 @@ test('build runtime environment based on args', async function(t) {
DHIS2_CORE_VERSION: '2.33',
DHIS2_CORE_DB_VERSION: '2.32',
DHIS2_CORE_PORT: 8233,
DHIS2_CORE_CONFIG: undefined,
}

t.deepEqual(actual, expected, 'args environment')
Expand Down Expand Up @@ -90,7 +88,6 @@ test('build runtime environment based on mixed args and config', async function(
DHIS2_CORE_VERSION: 'master',
DHIS2_CORE_DB_VERSION: 'dev',
DHIS2_CORE_PORT: 8233,
DHIS2_CORE_CONFIG: undefined,
}

t.deepEqual(actual, expected, 'args and config environment')
Expand Down Expand Up @@ -124,7 +121,6 @@ test('build runtime environment based on mixed args, cache, config and defaults'
DHIS2_CORE_VERSION: 'dev',
DHIS2_CORE_DB_VERSION: 'dev',
DHIS2_CORE_PORT: 8233,
DHIS2_CORE_CONFIG: undefined,
}

t.deepEqual(actual, expected, 'merged environment')
Expand Down Expand Up @@ -165,7 +161,6 @@ test('build runtime environment based on mixed args, cache, config, custom per-c
DHIS2_CORE_VERSION: 'apa',
DHIS2_CORE_DB_VERSION: 'dev',
DHIS2_CORE_PORT: 9999,
DHIS2_CORE_CONFIG: undefined,
}

t.deepEqual(actual, expected, 'merged environment')
Expand Down

0 comments on commit 21b467a

Please sign in to comment.