App-Sqitch
view release on metacpan or search on metacpan
main reference for database URLs in the Sqitch documentation.
- Fixed the output of the list of changes to be deployed or reverted to
actually require `--verbose` twice, as described in the v1.4.0 changes,
and not just once. Thanks to Erik Wienhold for the PR (#785)!
- Removed the duplicate change name from the output of the list of
changes to be deployed or reverted with `-VV`. Thanks to Erik Wienhold
for the PR (#787)!
- Fixed invalid template resolution when adding a singe change to
multiple engines at once. Thanks to Christian Riedel for the detailed
bug report (#795)!
- Fixed Oracle and Firebird test failures due to incorrect use of `chmod`.
Thanks to Slaven ReziÄ for the report and the fix (#807)!
- Tests now require Test::Warn 0.31 or later, as newline handling issues
cause test failures in earlier versions. Thanks to Slaven ReziÄ for the
test reports and for identifying the issue.
- Updated the locale configuration to fix issues in more recent versions
of Perl, and added tests to ensure that the sqitch CLI executes and
properly emits localized messages (except on Windows, where the language
codes are incompatible).
- Fixed an issue where the MySQL engine failed to recognize the MariaDB
`mysql` client installed by Homebrew on macOS. Thanks to Carlos Ramos
t/firebird.t view on Meta::CPAN
}
# Make sure default_client croaks when it finds no client.
FSPEC: {
# Give it an invalid fbsql file to find.
my $tmpdir = tempdir(CLEANUP => 1);
my $tmp = Path::Class::Dir->new("$tmpdir");
my $iswin = App::Sqitch::ISWIN || $^O eq 'cygwin';
my $fbsql = $tmp->file('fbsql' . ($iswin ? '.exe' : ''));
$fbsql->touch;
chmod 0755, $fbsql unless $iswin;
my $fs_mock = Test::MockModule->new('File::Spec');
$fs_mock->mock(path => sub { $tmp });
throws_ok { $fb->default_client } 'App::Sqitch::X',
'Should get error when no client found';
is $@->ident, 'firebird', 'Client exception ident should be "firebird"';
is $@->message, __(
'Unable to locate Firebird ISQL; set "engine.firebird.client" via sqitch config'
), 'Client exception message should be correct';
}
# Start with no ORACLE_HOME.
my $target = App::Sqitch::Target->new(sqitch => $sqitch);
isa_ok my $ora = $CLASS->new(sqitch => $sqitch, target => $target), $CLASS;
is $ora->client, $cli, 'client should default to sqlplus';
# Put client in ORACLE_HOME.
my $tmpdir = tempdir(CLEANUP => 1);
my $tmp = Path::Class::Dir->new("$tmpdir");
my $sqlplus = $tmp->file($cli);
$sqlplus->touch;
chmod 0755, $sqlplus unless $iswin;
local $ENV{ORACLE_HOME} = "$tmpdir";
$target = App::Sqitch::Target->new(sqitch => $sqitch);
isa_ok $ora = $CLASS->new(sqitch => $sqitch, target => $target), $CLASS;
is $ora->client, $sqlplus, 'client should use $ORACLE_HOME';
# ORACLE_HOME/bin takes precedence.
my $bin = Path::Class::Dir->new("$tmpdir", 'bin');
$bin->mkpath;
$sqlplus = $bin->file($cli);
$sqlplus->touch;
chmod 0755, $sqlplus unless $iswin;
$target = App::Sqitch::Target->new(sqitch => $sqitch);
isa_ok $ora = $CLASS->new(sqitch => $sqitch, target => $target), $CLASS;
is $ora->client, $sqlplus, 'client should use $ORACLE_HOME/bin';
}
is $ora->registry, '', 'registry default should be empty';
is $ora->uri, 'db:oracle:', 'Default URI should be "db:oracle"';
my $dest_uri = $ora->uri->clone;
( run in 0.312 second using v1.01-cache-2.11-cpan-496ff517765 )