Skip to content

Commit

Permalink
test-adaptations: Disable cnf_to_new_cluster tests
Browse files Browse the repository at this point in the history
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 <konstantin.yarovoy@tietoevry.com>
  • Loading branch information
kosstennbl committed Oct 23, 2024
1 parent 24744bc commit 1b512d7
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 5 deletions.
3 changes: 2 additions & 1 deletion spec/workload/compatibility_spec.cr
Original file line number Diff line number Diff line change
Expand Up @@ -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

Check failure on line 28 in spec/workload/compatibility_spec.cr

View workflow job for this annotation

GitHub Actions / Chaos & Oran Tests (pod_memory_hog)

invalid regex: unmatched parentheses at 9

Check failure on line 28 in spec/workload/compatibility_spec.cr

View workflow job for this annotation

GitHub Actions / Chaos & Oran Tests (zombie)

invalid regex: unmatched parentheses at 9

Check failure on line 28 in spec/workload/compatibility_spec.cr

View workflow job for this annotation

GitHub Actions / Chaos & Oran Tests (pod_delete)

invalid regex: unmatched parentheses at 9

Check failure on line 28 in spec/workload/compatibility_spec.cr

View workflow job for this annotation

GitHub Actions / Chaos & Oran Tests (pod_network_latency)

invalid regex: unmatched parentheses at 9

Check failure on line 28 in spec/workload/compatibility_spec.cr

View workflow job for this annotation

GitHub Actions / Chaos & Oran Tests (pod_network_duplication)

invalid regex: unmatched parentheses at 9

Check failure on line 28 in spec/workload/compatibility_spec.cr

View workflow job for this annotation

GitHub Actions / Chaos & Oran Tests (pod_network_corruption)

invalid regex: unmatched parentheses at 9

Check failure on line 28 in spec/workload/compatibility_spec.cr

View workflow job for this annotation

GitHub Actions / Chaos & Oran Tests (oran)

invalid regex: unmatched parentheses at 9

Check failure on line 28 in spec/workload/compatibility_spec.cr

View workflow job for this annotation

GitHub Actions / Chaos & Oran Tests (disk_fill)

invalid regex: unmatched parentheses at 9

Check failure on line 28 in spec/workload/compatibility_spec.cr

View workflow job for this annotation

GitHub Actions / Chaos & Oran Tests (pod_io_stress)

invalid regex: unmatched parentheses at 9
#(/(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
Expand Down
2 changes: 2 additions & 0 deletions src/tasks/workload/compatibility.cr
Original file line number Diff line number Diff line change
Expand Up @@ -526,6 +526,8 @@ 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|
# TODO (kosstennbl) adapt cnf_to_new_cluster metod to new installation process. Until then - test is disabled. More info: #2153
next CNFManager::TestcaseResult.new(CNFManager::ResultStatus::Skipped, "cni_compatible test was temporarily disabled, check #2153")
docker_version = DockerClient.version_info()
if docker_version.installed?
ensure_kubeconfig!
Expand Down
9 changes: 7 additions & 2 deletions src/tasks/workload/configuration.cr
Original file line number Diff line number Diff line change
Expand Up @@ -606,14 +606,19 @@ task "alpha_k8s_apis" do |t, args|
next CNFManager::TestcaseResult.new(CNFManager::ResultStatus::Skipped, "alpha_k8s_apis not in poc mode")
end

ensure_kubeconfig!
cluster_name = "apisnooptest"
kubeconfig_orig = ENV["KUBECONFIG"]

# TODO (kosstennbl) adapt cnf_to_new_cluster metod to new installation process. Until then - test is disabled. More info: #2153
result = CNFManager::TestcaseResult.new(CNFManager::ResultStatus::Skipped, "alpha_k8s_apis test was temporarily disabled, check #2153")
next result

ensure_kubeconfig!

# Get kubernetes version of the current server.
# This is used to setup kind with same k8s image version.
k8s_server_version = KubectlClient.server_version

cluster_name = "apisnooptest"
# Ensure any old cluster is deleted
KindManager.new.delete_cluster(cluster_name)
apisnoop = ApiSnoop.new()
Expand Down
3 changes: 1 addition & 2 deletions src/tasks/workload/microservice.cr
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 1b512d7

Please sign in to comment.