From c26e0ae312da2d6b0679285cc5da97d630d254da Mon Sep 17 00:00:00 2001 From: Konstantin Yarovoy Date: Thu, 17 Oct 2024 08:00:22 +0000 Subject: [PATCH] test-adaptations: Disable cnf_to_new_cluster tests Temporarily disable cnf_to_new_cluster tests as this process needs to be redesigned to new installation format. Also, adapt service_discovery to namespaced manifest generation. Refs: #2153 Signed-off-by: Konstantin Yarovoy --- spec/workload/compatibility_spec.cr | 3 ++- src/tasks/workload/compatibility.cr | 1 + src/tasks/workload/configuration.cr | 1 + src/tasks/workload/microservice.cr | 3 +-- 4 files changed, 5 insertions(+), 3 deletions(-) diff --git a/spec/workload/compatibility_spec.cr b/spec/workload/compatibility_spec.cr index 563c43864..79b98f051 100644 --- a/spec/workload/compatibility_spec.cr +++ b/spec/workload/compatibility_spec.cr @@ -25,7 +25,8 @@ describe "Compatibility" do retries = retries + 1 end Log.info { "Status: #{result[:output]}" } - (/(PASSED).*(CNF compatible with both Calico and Cilium)/ =~ result[:output]).should_not be_nil + (/(SKIPPED)).*(alpha_k8s_apis test was temporarily disabled due to needed redesign for cnf_to_new_cluster)/ =~ result[:output]).should_not be_nil + #(/(PASSED).*(CNF compatible with both Calico and Cilium)/ =~ result[:output]).should_not be_nil ensure result = ShellCmd.run_testsuite("cnf_cleanup cnf-config=sample-cnfs/sample-coredns-cnf/cnf-testsuite.yml") result[:status].success?.should be_true diff --git a/src/tasks/workload/compatibility.cr b/src/tasks/workload/compatibility.cr index 849c6492a..a1ba7d463 100644 --- a/src/tasks/workload/compatibility.cr +++ b/src/tasks/workload/compatibility.cr @@ -526,6 +526,7 @@ end desc "CNFs should work with any Certified Kubernetes product and any CNI-compatible network that meet their functionality requirements." task "cni_compatible" do |t, args| CNFManager::Task.task_runner(args, task: t) do |args, config| + return CNFManager::TestcaseResult.new(CNFManager::ResultStatus::Skipped, "cni_compatible test was temporarily disabled due to needed redesign for cnf_to_new_cluster") docker_version = DockerClient.version_info() if docker_version.installed? ensure_kubeconfig! diff --git a/src/tasks/workload/configuration.cr b/src/tasks/workload/configuration.cr index 5d793181a..1d968a300 100644 --- a/src/tasks/workload/configuration.cr +++ b/src/tasks/workload/configuration.cr @@ -605,6 +605,7 @@ task "alpha_k8s_apis" do |t, args| unless check_poc(args) next CNFManager::TestcaseResult.new(CNFManager::ResultStatus::Skipped, "alpha_k8s_apis not in poc mode") end + return CNFManager::TestcaseResult.new(CNFManager::ResultStatus::Skipped, "alpha_k8s_apis test was temporarily disabled due to needed redesign for cnf_to_new_cluster") ensure_kubeconfig! kubeconfig_orig = ENV["KUBECONFIG"] diff --git a/src/tasks/workload/microservice.cr b/src/tasks/workload/microservice.cr index f034ccb91..12d2212e2 100644 --- a/src/tasks/workload/microservice.cr +++ b/src/tasks/workload/microservice.cr @@ -631,8 +631,7 @@ task "service_discovery" do |t, args| CNFManager::Task.task_runner(args, task: t) do |args,config| # Get all resources for the CNF resource_ymls = CNFManager.cnf_workload_resources(args, config) { |resource| resource } - deployment_namespace = CNFManager.get_deployment_namespace(config) - resources = Helm.workload_resource_kind_names(resource_ymls, default_namespace: deployment_namespace) + resources = Helm.workload_resource_kind_names(resource_ymls) # Collect service names from the CNF resource list cnf_service_names = [] of String