App-Sqitch
view release on metacpan or search on metacpan
- Deprecated the `set-*` actions in the `engine` and `target` commands in
favor of the new `alter` action.
- The core `--deployed-dir`, `--revert-dir`, and `--verify-dir` options
are deprecated in favor of the `--dir` option on the `init`, `engine`,
and `target` command.
0.9992 2015-05-20T23:51:41Z
- On PostgreSQL, Sqitch now sets the `client_encoding` parameter to
`UTF8` for its own connection to the database. This ensures that data
sent to and from the database should always be properly encoded and
decoded. Users should still set the proper encodings for change scripts
as appropriate.
- Fixed test failures due to path differences on Windows.
- DateTime::TimeZone is now explicitly required in an attempt to head off
"Cannot determine local time zone" errors.
- Corrected some typos and thinkos in `sqitchtutorial-oracle`, thanks to
George Hartzell.
- Improved the script to upgrade an Oracle registry to v1.0 to support
versions prior to Oracle 12, thanks to Timothy Procter.
- Added missing closing parenthesis to the "Nothing to deploy" message.
Thanks to George Hartzell for the pull request (Issue #226).
$input = 'hep';
open my $stdin, '<', \$input;
*STDIN = $stdin;
is $sqitch->_readline, $input, '_readline should work';
$unattended = 1;
is $sqitch->_readline, undef, '_readline should return undef when unattended';
$sqitch_mock->unmock_all;
##############################################################################
# Make sure Test::LocaleDomain gives us decoded strings.
for my $lang (qw(en fr)) {
local $ENV{LANGUAGE} = $lang;
my $text = __x 'On database {db}', db => 'foo';
ok utf8::valid($text), 'Localied string should be valid UTF-8';
ok utf8::is_utf8($text), 'Localied string should be decoded';
}
##############################################################################
# Test interactivity.
lives_ok { $CLASS->_is_interactive } '_is_interactive should not die';
lives_ok { $CLASS->_is_unattended } '_is_unattended should not die';
# Test utilities.
is $CLASS->_bn(__FILE__), 'base.t', '_bn should work';
name => 'é±éªé¬',
plan => $plan2,
), 'Create change with UTF-8 name';
is $change2->info, join("\n",
'project ' . 'multi',
'uri ' . $uri->canonical,
'change ' . 'é±éªé¬',
'planner ' . $change2->format_planner,
'date ' . $change2->timestamp->as_string,
), 'The name should be decoded text in info';
is $change2->id, do {
my $content = Encode::encode_utf8 $change2->info;
Digest::SHA->new(1)->add(
'change ' . length($content) . "\0" . $content
)->hexdigest;
},'Change ID should be hashed from encoded UTF-8';
##############################################################################
# Test note_prompt().
t/checkout.t view on Meta::CPAN
# Did it revert?
is_deeply \@rev_args, [$checkout->default_target->plan->get('users')->id, 1, undef],
'"users" ID and 1 should be passed to the engine revert';
is_deeply \@rev_changes, [qw(roles users widgets)],
'Should have had the current changes for revision';
# Did it deploy?
is_deeply \@dep_args, [undef, 'tag'],
'undef, "tag", and 1 should be passed to the engine deploy';
is_deeply \@dep_changes, [qw(roles users thingÃes)],
'Should have had the other branch changes (decoded) for deploy';
ok $target->engine->with_verify, 'Engine should verify';
ok $target->engine->log_only, 'The engine should be set to log_only';
is $target->engine->lock_timeout, 30, 'The lock timeout should be set to 30';
is @vars, 2, 'Variables should have been passed to the engine twice';
is_deeply { @{ $vars[0] } }, { hey => 'there' },
'The revert vars should have been passed first';
is_deeply { @{ $vars[1] } }, { foo => 'bar', one => 1 },
'The deploy vars should have been next';
t/checkout.t view on Meta::CPAN
is_deeply +MockOutput->get_warn, [], 'Should have no warnings';
# Did it deploy?
ok !$target->engine->log_only, 'The engine should not be set to log_only';
is $target->engine->lock_timeout, App::Sqitch::Engine::default_lock_timeout(),
'The lock timeout should be set to the default';
ok !$target->engine->with_verify, 'The engine should not be set with_verfy';
is_deeply \@dep_args, [undef, 'tag'],
'undef, "tag", and 1 should be passed to the engine deploy again';
is_deeply \@dep_changes, [qw(roles users thingÃes)],
'Should have had the other branch changes (decoded) for deploy again';
is @vars, 2, 'Variables should again have been passed to the engine twice';
is_deeply { @{ $vars[0] } }, { hey => 'there' },
'The revert vars should again have been passed first';
is_deeply { @{ $vars[1] } }, { foo => 'bar', one => 1 },
'The deploy vars should again have been next';
# Should get a warning for two targets.
ok $checkout->execute('main', 'db:sqlite:'), 'Checkout main again with target';
is $target->name, 'db:sqlite:hello', 'Target should be passed to engine';
is_deeply +MockOutput->get_warn, [[__x(
change => $change,
), 'Create tag with UTF-8 name';
is $tag->info, join("\n",
'project sql',
'uri https://github.com/sqitchers/sqitch/',
'tag ' . '@é±éªé¬',
'change ' . $change->id,
'planner ' . $tag->format_planner,
'date ' . $tag->timestamp->as_string,
), 'The name should be decoded text in info';
is $tag->id, do {
my $content = Encode::encode_utf8 $tag->info;
Digest::SHA->new(1)->add(
'tag ' . length($content) . "\0" . $content
)->hexdigest;
},'Tag ID should be hahsed from encoded UTF-8';
( run in 0.421 second using v1.01-cache-2.11-cpan-26ccb49234f )