summaryrefslogtreecommitdiff
path: root/spec/models/clusters/applications
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2019-11-21 12:06:40 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2019-11-21 12:06:40 +0000
commit0a6ffb540e569bd7a7c548d59b12bc55d4bf9cf1 (patch)
tree9ff7dd7b21a3f9642a8fbb45c922f71a433faf02 /spec/models/clusters/applications
parenta048261403ea7e12992ccffe704f0779235712d7 (diff)
downloadgitlab-ce-0a6ffb540e569bd7a7c548d59b12bc55d4bf9cf1.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/models/clusters/applications')
-rw-r--r--spec/models/clusters/applications/knative_spec.rb7
1 files changed, 4 insertions, 3 deletions
diff --git a/spec/models/clusters/applications/knative_spec.rb b/spec/models/clusters/applications/knative_spec.rb
index 51c8a6bb68d..f1ce447a0d8 100644
--- a/spec/models/clusters/applications/knative_spec.rb
+++ b/spec/models/clusters/applications/knative_spec.rb
@@ -161,18 +161,19 @@ describe Clusters::Applications::Knative do
end
it "initializes command with all necessary postdelete script" do
- api_resources = YAML.safe_load(File.read(Rails.root.join(Clusters::Applications::Knative::API_RESOURCES_PATH)))
+ api_groups = YAML.safe_load(File.read(Rails.root.join(Clusters::Applications::Knative::API_GROUPS_PATH)))
remove_knative_istio_leftovers_script = [
"kubectl delete --ignore-not-found ns knative-serving",
"kubectl delete --ignore-not-found ns knative-build"
]
- full_delete_commands_size = api_resources.size + remove_knative_istio_leftovers_script.size
+ full_delete_commands_size = api_groups.size + remove_knative_istio_leftovers_script.size
expect(subject.postdelete).to include(*remove_knative_istio_leftovers_script)
expect(subject.postdelete.size).to eq(full_delete_commands_size)
- expect(subject.postdelete[2]).to eq("kubectl delete --ignore-not-found crd #{api_resources[0]}")
+ expect(subject.postdelete[2]).to eq("kubectl api-resources -o name --api-group #{api_groups[0]} | xargs kubectl delete --ignore-not-found crd")
+ expect(subject.postdelete[3]).to eq("kubectl api-resources -o name --api-group #{api_groups[1]} | xargs kubectl delete --ignore-not-found crd")
end
end