Skip to content

Commit

Permalink
[340] Rename flag detach to quiet
Browse files Browse the repository at this point in the history
  • Loading branch information
zipofar committed Oct 6, 2023
1 parent 23de188 commit ebb6bb7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions lib/uffizzi/cli/dev.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
4 changes: 2 additions & 2 deletions test/uffizzi/cli/dev_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand All @@ -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

Expand Down

0 comments on commit ebb6bb7

Please sign in to comment.