diff --git a/modules/t/schemaPatches.t b/modules/t/schemaPatches.t index be98b8a1ab9dc47628587f1759f163c318cd0629..6ff73afa0dadd1b6e55e6b12119ca20ca965b830 100644 --- a/modules/t/schemaPatches.t +++ b/modules/t/schemaPatches.t @@ -1,5 +1,5 @@ # We respond to the following ENV -# ENS_LOCAL_SCHEMA - If set to true we will use the local schema as the reference schema. Otherwise we use the previous version's schema from source control +# ENS_REMOTE_SCHEMA - If set to true we will use the remote schema as the reference schema. Otherwise we use the local schema held in sql/table.sql use strict; use warnings; @@ -63,7 +63,10 @@ SKIP: { # Create last release DB my $current_table_sql; - if ($ENV{ENS_LOCAL_SCHEMA}) { + if ($ENV{ENS_REMOTE_SCHEMA}) { + $current_table_sql = get_table_sql($current_release); + } + else { my $table_sql = catfile($sql_dir, 'table.sql'); skip 'Skipping DB patch test as we cannot find last release schema file (table.sql)', 1 unless -e $table_sql; @@ -71,9 +74,6 @@ SKIP: { unless -r $table_sql; $current_table_sql = slurp($table_sql); } - else { - $current_table_sql = get_table_sql($current_release); - } skip "Skipping DB patch tests as we cannot find the SQL for release $current_release", (scalar(@patches)+1) unless defined $current_table_sql;