Tweak the pg dump incompatibility error message

This commit is contained in:
Dan Sosedoff 2022-12-12 14:51:46 -06:00
parent 859af81206
commit 3a3fc951e7
No known key found for this signature in database
GPG Key ID: 26186197D282B164
2 changed files with 2 additions and 2 deletions

View File

@ -37,7 +37,7 @@ func (d *Dump) Validate(serverVersion string) error {
if detected && serverVersion != "" {
satisfied := checkVersionRequirement(dumpVersion, serverVersion)
if !satisfied {
return fmt.Errorf("pg_dump version %v is too low, must be running %v or order", dumpVersion, serverVersion)
return fmt.Errorf("pg_dump version %v not compatible with server version %v", dumpVersion, serverVersion)
}
}

View File

@ -30,7 +30,7 @@ func testDumpExport(t *testing.T) {
// Test for pg_dump presence
assert.NoError(t, dump.Validate("10.0"))
assert.NoError(t, dump.Validate(""))
assert.Contains(t, dump.Validate("20").Error(), "is too low, must be running 20 or order")
assert.Contains(t, dump.Validate("20").Error(), "not compatible with server version 20")
// Test full db dump
err = dump.Export(context.Background(), url, saveFile)