Check if pg_dump is available before running database export

This commit is contained in:
Dan Sosedoff
2018-04-25 23:29:18 -05:00
parent 7dce0fb4f4
commit e2be689a05
3 changed files with 17 additions and 1 deletions

View File

@@ -24,8 +24,12 @@ func test_DumpExport(t *testing.T) {
os.Remove(savePath)
}()
// Test full db dump
dump := Dump{}
// Test for pg_dump presence
assert.True(t, dump.CanExport())
// Test full db dump
err = dump.Export(url, saveFile)
assert.NoError(t, err)