Project

General

Profile

« Previous | Next » 

Revision 99d46890

Added by Ivan Necas almost 7 years ago

`upgrade run --phase` instead of `upgrade advanced run`

To improve the usability of the command

View differences:

test/lib/cli/upgrade_command_test.rb
Subcommands:
list-versions List versions this system is upgradable to
check Run pre-upgrade checks before upgrading to specified version
advanced Advanced commands: use with caution
run Run full upgrade to a specified version
Options:
......
end
end
describe 'advanced run' do
let :command do
%w[upgrade advanced run]
end
it 'runs the specific phase' do
UpgradeRunner.any_instance.expects(:run_phase).with(:pre_migrations)
run_cmd(['--phase=pre_migrations', '--target-version=1.15'])
end
end
describe 'run' do
let :command do
%w[upgrade run]
......
UpgradeRunner.any_instance.expects(:run)
run_cmd(['--target-version=1.15'])
end
it 'with --phase it runs only a specific phase of the upgrade' do
UpgradeRunner.any_instance.expects(:run_phase).with(:pre_migrations)
run_cmd(['--phase=pre_migrations', '--target-version=1.15'])
end
end
end
end

Also available in: Unified diff