travis: fix postgres credentials

This commit is contained in:
Nolan Lawson 2018-04-10 17:04:08 -07:00
parent 36af90506f
commit 30ee13146e
1 changed files with 5 additions and 3 deletions

View File

@ -44,12 +44,14 @@ async function cloneMastodon () {
async function setupMastodonDatabase () { async function setupMastodonDatabase () {
console.log('Setting up mastodon database...') console.log('Setting up mastodon database...')
try { try {
await exec(`dropdb -h 127.0.0.1 -U ${DB_USER} mastodon_development`, {cwd: mastodonDir}) await exec(`dropdb -h 127.0.0.1 -U ${DB_USER} --no-password mastodon_development`, {cwd: mastodonDir})
} catch (e) { /* ignore */ } } catch (e) { /* ignore */ }
await exec(`createdb -h 127.0.0.1 -U ${DB_USER} mastodon_development`, {cwd: mastodonDir}) await exec(`createdb -h 127.0.0.1 -U ${DB_USER} --no-password mastodon_development`, {cwd: mastodonDir})
let dumpFile = path.join(dir, '../fixtures/dump.sql') let dumpFile = path.join(dir, '../fixtures/dump.sql')
await exec(`pg_restore -h 127.0.0.1 -U ${DB_USER} -Fc -d mastodon_development "${dumpFile}"`, {cwd: mastodonDir}) await exec(`pg_restore -h 127.0.0.1 -U ${DB_USER} --no-password -Fc -d mastodon_development "${dumpFile}"`, {
cwd: mastodonDir
})
let tgzFile = path.join(dir, '../fixtures/system.tgz') let tgzFile = path.join(dir, '../fixtures/system.tgz')
let systemDir = path.join(mastodonDir, 'public/system') let systemDir = path.join(mastodonDir, 'public/system')