We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 6a32fc1 + 6c2f02e commit 89dc0b2Copy full SHA for 89dc0b2
test/run_migration_test
@@ -53,4 +53,16 @@ assert_migration_succeeds ()
53
container_from= container_to=
54
}
55
56
+# test case suggested in https://github.com/sclorg/postgresql-container/pull/521
57
+assert_migration_fails()
58
+{
59
+ if docker run --rm -e POSTGRESQL_MIGRATION_REMOTE_HOST=invalid-host-name -e POSTGRESQL_MIGRATION_ADMIN_PASSWORD=password "$image_to" run-postgresql --version ; then
60
+ info "The image exited with 0 despite migration obviously did not work, that's a problem."
61
+ return 1
62
+ else
63
+ info "The image exited with non-zero exit code when migration obviously did not work, which is correct"
64
+ fi
65
+}
66
+
67
assert_migration_succeeds pagila
68
+assert_migration_fails
0 commit comments