Skip to content

Commit

Permalink
[364] clear dev config if cluster is deleted
Browse files Browse the repository at this point in the history
  • Loading branch information
moklidia authored and zipofar committed Dec 14, 2023
1 parent 158fa74 commit 45f77be
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions lib/uffizzi/cli/cluster.rb
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,7 @@ def handle_delete_command(command_args)

handle_delete_cluster(cluster_name)
ClusterDeleteService.exclude_kubeconfig(cluster_data[:id], kubeconfig) if kubeconfig.present?
DevService.clear_dev_environment_config if DevService.dev_environment[:cluster_name] == cluster_name
end

def handle_delete_cluster(cluster_name)
Expand Down
1 change: 1 addition & 0 deletions test/uffizzi/cli/cluster_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
require 'psych'
require 'base64'
require 'test_helper'

class ClusterTest < Minitest::Test
def setup
@cluster = Uffizzi::Cli::Cluster.new
Expand Down

0 comments on commit 45f77be

Please sign in to comment.