Avoid to overwrite env, just extend it with new env variables
This commit is contained in:
parent
eee59abfa1
commit
4c09a70647
@ -34,25 +34,19 @@ async function stopRedis () {
|
||||
|
||||
async function dropDatabase () {
|
||||
await exec(`dropdb --if-exists ${TEST_DB}`, {
|
||||
env: {
|
||||
PGUSER: 'postgres'
|
||||
}
|
||||
env: Object.assign ({ PGUSER: 'postgres' }, process.env)
|
||||
});
|
||||
}
|
||||
|
||||
async function createDatabase () {
|
||||
await exec(`createdb -T template_postgis -EUTF8 "${TEST_DB}"`, {
|
||||
env: {
|
||||
PGUSER: 'postgres'
|
||||
}
|
||||
env: Object.assign ({ PGUSER: 'postgres' }, process.env)
|
||||
});
|
||||
}
|
||||
|
||||
async function createDatabaseExtension () {
|
||||
await exec(`psql -c "CREATE EXTENSION IF NOT EXISTS cartodb CASCADE;" ${TEST_DB}`, {
|
||||
env: {
|
||||
PGUSER: 'postgres'
|
||||
}
|
||||
env: Object.assign ({ PGUSER: 'postgres' }, process.env)
|
||||
});
|
||||
}
|
||||
|
||||
@ -77,9 +71,7 @@ async function populateDatabase () {
|
||||
`;
|
||||
|
||||
await exec(populateDatabaseCmd, {
|
||||
env: {
|
||||
PGUSER: 'postgres'
|
||||
}
|
||||
env: Object.assign ({ PGUSER: 'postgres' }, process.env)
|
||||
});
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user