diff --git a/lib/uffizzi/cli/dev.rb b/lib/uffizzi/cli/dev.rb index c2fd2b82..a41bbdb0 100644 --- a/lib/uffizzi/cli/dev.rb +++ b/lib/uffizzi/cli/dev.rb @@ -10,18 +10,18 @@ class Cli::Dev < Thor include ApiClient desc 'start [CONFIG]', 'Start dev environment' - method_option :detach, type: :boolean, aliases: :d + method_option :quiet, type: :boolean, aliases: :q method_option :'default-repo', type: :string method_option :kubeconfig, type: :string def start(config_path = 'skaffold.yaml') DevService.check_skaffold_existence - DevService.check_running_daemon if options[:detach] + DevService.check_running_daemon if options[:quiet] DevService.check_skaffold_config_existence(config_path) check_login cluster_id, cluster_name = start_create_cluster kubeconfig = wait_cluster_creation(cluster_name) - if options[:detach] + if options[:quiet] launch_demonise_skaffold(config_path) else DevService.start_basic_skaffold(config_path, options) diff --git a/test/uffizzi/cli/dev_test.rb b/test/uffizzi/cli/dev_test.rb index 7102446b..b437f449 100644 --- a/test/uffizzi/cli/dev_test.rb +++ b/test/uffizzi/cli/dev_test.rb @@ -82,7 +82,7 @@ def test_start_dev_as_daemon stubbed_uffizzi_cluster_delete_request = stub_uffizzi_delete_cluster(@project_slug) @mock_shell.promise_execute(/skaffold version/, stdout: 'v.2.7.1') @mock_shell.promise_execute(/skaffold dev --filename/, stdout: 'Good') - @dev.options = command_options(detach: true) + @dev.options = command_options(quiet: true) @dev.start(@skaffold_file_path) @@ -98,7 +98,7 @@ def test_start_dev_as_daemon def test_start_dev_as_daemon_when_deamon_already_run @mock_shell.promise_execute(/skaffold version/, stdout: 'v.2.7.1') @mock_shell.promise_execute(/skaffold dev --filename/, stdout: 'Good') - @dev.options = command_options(detach: true) + @dev.options = command_options(quiet: true) File.write(DevService.pid_path, '1000') @mock_process.pid = 1000