mirror of
https://github.com/sosedoff/pgweb.git
synced 2024-12-15 11:52:12 +03:00
Tweak the pg dump incompatibility error message
This commit is contained in:
parent
859af81206
commit
3a3fc951e7
@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user