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.
1 parent 6a32fc1 commit 3cc5f71Copy full SHA for 3cc5f71
test/run_migration_test
@@ -53,4 +53,17 @@ 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
+ docker run --rm -e POSTGRESQL_MIGRATION_REMOTE_HOST=invalid-host-name -e POSTGRESQL_MIGRATION_ADMIN_PASSWORD=password "$image_to" run-postgresql --version
60
+ if [ $? -eq 0 ] ; then
61
+ info "The image existed with 0 despite migration obviously did not work, that's a problem."
62
+ return 1
63
+ else
64
+ info "The image existed with non-zero exit code when migration obviously did not work, which is correct"
65
+ fi
66
+}
67
+
68
assert_migration_succeeds pagila
69
+assert_migration_fails
0 commit comments