X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=dbsrgits%2FDBIx-Class-DeploymentHandler.git;a=blobdiff_plain;f=t%2Fdeploy_methods%2Fsql_translator.t;fp=t%2Fdeploy_methods%2Fsql_translator.t;h=f9f5bfa7fbf22561e6f1b77c312286f7a3601f56;hp=f7a7cf2768a9b4532dc380c4d294cc9a95338d6f;hb=1f0d0633940a59386e5c0ebec602d0650a3694ed;hpb=4d09f7120015cc9b9f50fb80931be05572492229 diff --git a/t/deploy_methods/sql_translator.t b/t/deploy_methods/sql_translator.t index f7a7cf2..f9f5bfa 100644 --- a/t/deploy_methods/sql_translator.t +++ b/t/deploy_methods/sql_translator.t @@ -36,7 +36,7 @@ VERSION1: { close $prerun; $dm->preinstall({ version => '1.0' }); - ok -e 'foobar'; + ok -e 'foobar', 'perl migration runs'; { my $warned = 0; @@ -51,7 +51,7 @@ VERSION1: { close $common; ok( - -f catfile(qw( t sql SQLite schema 1.0 001-auto.sql )), + -f catfile(qw( t sql SQLite schema 1.0 001-auto.sql-json )), '1.0 schema gets generated properly' ); @@ -96,7 +96,7 @@ VERSION2: { $version = $s->schema_version(); $dm->prepare_deploy; ok( - -f catfile(qw( t sql SQLite schema 2.0 001-auto.sql )), + -f catfile(qw( t sql SQLite schema 2.0 001-auto.sql-json )), '2.0 schema gets generated properly' ); mkpath(catfile(qw( t sql SQLite up 1.0-2.0 ))); @@ -117,7 +117,7 @@ VERSION2: { ok( $warned, 'prepare_upgrade with a bogus preversion warns' ); } ok( - -f catfile(qw( t sql SQLite up 1.0-2.0 001-auto.sql )), + -f catfile(qw( t sql SQLite up 1.0-2.0 001-auto.sql-json )), '1.0-2.0 diff gets generated properly and default start and end versions get set' ); mkpath(catfile(qw( t sql SQLite down 2.0-1.0 ))); @@ -127,7 +127,7 @@ VERSION2: { version_set => [$version, '1.0'] }); ok( - -f catfile(qw( t sql SQLite down 2.0-1.0 001-auto.sql )), + -f catfile(qw( t sql SQLite down 2.0-1.0 001-auto.sql-json )), '2.0-1.0 diff gets generated properly' ); dies_ok { @@ -203,7 +203,7 @@ VERSION3: { $version = $s->schema_version(); $dm->prepare_deploy; ok( - -f catfile(qw( t sql SQLite schema 3.0 001-auto.sql )), + -f catfile(qw( t sql SQLite schema 3.0 001-auto.sql-json )), '2.0 schema gets generated properly' ); $dm->prepare_downgrade({ @@ -212,7 +212,7 @@ VERSION3: { version_set => [$version, '1.0'] }); ok( - -f catfile(qw( t sql SQLite down 3.0-1.0 001-auto.sql )), + -f catfile(qw( t sql SQLite down 3.0-1.0 001-auto.sql-json )), '3.0-1.0 diff gets generated properly' ); $dm->prepare_upgrade({ @@ -221,7 +221,7 @@ VERSION3: { version_set => ['1.0', $version] }); ok( - -f catfile(qw( t sql SQLite up 1.0-3.0 001-auto.sql )), + -f catfile(qw( t sql SQLite up 1.0-3.0 001-auto.sql-json )), '1.0-3.0 diff gets generated properly' ); $dm->prepare_upgrade({ @@ -240,11 +240,11 @@ VERSION3: { ok( $warned, 'prepare_upgrade warns if you clobber an existing upgrade file' ); } ok( - -f catfile(qw( t sql SQLite up 1.0-2.0 001-auto.sql )), + -f catfile(qw( t sql SQLite up 1.0-2.0 001-auto.sql-json )), '2.0-3.0 diff gets generated properly' ); mkpath catfile(qw( t sql _generic up 2.0-3.0 )); - rename catfile(qw( t sql SQLite up 2.0-3.0 001-auto.sql )), catfile(qw( t sql _generic up 2.0-3.0 001-auto.sql )); + rename catfile(qw( t sql SQLite up 2.0-3.0 001-auto.sql-json )), catfile(qw( t sql _generic up 2.0-3.0 001-auto.sql-json )); rmtree(catfile(qw( t sql SQLite ))); warn 'how can this be' if -d catfile(qw( t sql SQLite )); dies_ok {