Skip to content

Commit

Permalink
configmap: Remove installation configmap
Browse files Browse the repository at this point in the history
Installation configmap can significantly complicate new installation
process and has multiple issues with its design (and related tests).
Remove installation congigmap
Redesign related tests or make them always skip until further
redesign would be done in the scope of different change

Refs: #2153
Signed-off-by: Konstantin Yarovoy <konstantin.yarovoy@tietoevry.com>
  • Loading branch information
kosstennbl committed Oct 24, 2024
1 parent 24744bc commit 0e8f0fe
Show file tree
Hide file tree
Showing 12 changed files with 150 additions and 331 deletions.
26 changes: 2 additions & 24 deletions spec/5g/ran_spec.cr
Original file line number Diff line number Diff line change
Expand Up @@ -35,33 +35,11 @@ describe "5g" do
end

it "'oran_e2_connection' should pass if the ORAN enabled RAN connects to the RIC using the e2 standard", tags: ["oran"] do
begin
setup_success = setup_5g_network
setup_success.should be_true
ShellCmd.cnf_setup("cnf-config=sample-cnfs/sample-oran-ric/cnf-testsuite.yml")
result = ShellCmd.run_testsuite("oran_e2_connection verbose")
(/(PASSED).*(RAN connects to a RIC using the e2 standard interface)/ =~ result[:output]).should_not be_nil
ensure
result = Helm.delete("open5gs -n oran")
result[:status].success?.should be_true
result = ShellCmd.run_testsuite("cnf_cleanup cnf-config=sample-cnfs/sample-oran-ric/cnf-testsuite.yml")
result[:status].success?.should be_true
end
# (kosstennbl) TODO: Test and specs for 'oran_e2_connection' should be redesigned. Check #2153 for more info. Spec was using sample_srsran_ueauth_open5gs and sample-oran-ric.
end

it "'oran_e2_connection' should fail if the ORAN enabled RAN does not connect to the RIC using the e2 standard", tags: ["oran"] do
begin
setup_success = setup_5g_network
setup_success.should be_true
ShellCmd.cnf_setup("cnf-config=sample-cnfs/sample-oran-noric/cnf-testsuite.yml")
result = ShellCmd.run_testsuite("oran_e2_connection verbose")
(/(FAILED).*(RAN does not connect to a RIC using the e2 standard interface)/ =~ result[:output]).should_not be_nil
ensure
result = Helm.delete("open5gs -n oran")
result[:status].success?.should be_true
result = ShellCmd.run_testsuite("cnf_cleanup cnf-config=sample-cnfs/sample-oran-noric/cnf-testsuite.yml")
result[:status].success?.should be_true
end
# (kosstennbl) TODO: Test and specs for 'oran_e2_connection' should be redesigned. Check #2153 for more info. Spec was using sample_srsran_ueauth_open5gs and sample-oran-noric.
end

end
2 changes: 1 addition & 1 deletion spec/workload/installability_spec.cr
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ describe CnfTestSuite do
ShellCmd.cnf_setup("cnf-path=./sample-cnfs/k8s-non-helm")
result = ShellCmd.run_testsuite("helm_deploy verbose")
result[:status].success?.should be_true
(/(FAILED).*(Helm deploy failed)/ =~ result[:output]).should_not be_nil
(/(FAILED).*(CNF has deployments that are not installed with helm)/ =~ result[:output]).should_not be_nil
ensure
result = ShellCmd.run_testsuite("cnf_cleanup cnf-path=./sample-cnfs/k8s-non-helm verbose")
end
Expand Down
29 changes: 2 additions & 27 deletions spec/workload/observability_spec.cr
Original file line number Diff line number Diff line change
Expand Up @@ -161,35 +161,10 @@ describe "Observability" do
end

it "'tracing' should fail if tracing is not used", tags: ["observability_jaeger_fail"] do
Log.info { "Installing Jaeger " }
JaegerManager.install

ShellCmd.cnf_setup("cnf-config=sample-cnfs/sample-coredns-cnf/cnf-testsuite.yml")
result = ShellCmd.run_testsuite("tracing")
(/(FAILED).*(Tracing not used)/ =~ result[:output]).should_not be_nil
ensure
result = ShellCmd.run_testsuite("cnf_cleanup cnf-config=sample-cnfs/sample-coredns-cnf/cnf-testsuite.yml")
JaegerManager.uninstall
KubectlClient::Get.resource_wait_for_uninstall("Statefulset", "jaeger-cassandra")
KubectlClient::Get.resource_wait_for_uninstall("Deployment", "jaeger-collector")
KubectlClient::Get.resource_wait_for_uninstall("Deployment", "jaeger-query")
KubectlClient::Get.resource_wait_for_uninstall("Daemonset", "jaeger-agent")
# (kosstennbl) TODO: Test and specs for 'tracing' should be redesigned. Check #2153 for more info. Spec was using sample-coredns-cnf CNF.
end

it "'tracing' should pass if tracing is used", tags: ["observability_jaeger_pass"] do
Log.info { "Installing Jaeger " }
JaegerManager.install

ShellCmd.cnf_setup("cnf-config=sample-cnfs/sample-tracing/cnf-testsuite.yml")
result = ShellCmd.run_testsuite("tracing")
(/(PASSED).*(Tracing used)/ =~ result[:output]).should_not be_nil
ensure
result = ShellCmd.run_testsuite("cnf_cleanup cnf-config=sample-cnfs/sample-tracing/cnf-testsuite.yml")
JaegerManager.uninstall
KubectlClient::Get.resource_wait_for_uninstall("Statefulset", "jaeger-cassandra")
KubectlClient::Get.resource_wait_for_uninstall("Deployment", "jaeger-collector")
KubectlClient::Get.resource_wait_for_uninstall("Deployment", "jaeger-query")
KubectlClient::Get.resource_wait_for_uninstall("Daemonset", "jaeger-agent")
# (kosstennbl) TODO: Test and specs for 'tracing' should be redesigned. Check #2153 for more info. Spec was using sample-tracing CNF.
end

end
1 change: 1 addition & 0 deletions src/tasks/constants.cr
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ EMPTY_JSON = JSON.parse(%({}))
EMPTY_JSON_ARRAY = JSON.parse(%([]))
SPECIALIZED_INIT_SYSTEMS = ["tini", "dumb-init", "s6-svscan"]
ROLLING_VERSION_CHANGE_TEST_NAMES = ["rolling_update", "rolling_downgrade", "rolling_version_change"]
WORKLOAD_RESOURCE_KIND_NAMES = ["replicaset", "deployment", "statefulset", "pod", "daemonset"]

TESTSUITE_NAMESPACE = "cnf-testsuite"
DEFAULT_CNF_NAMESPACE = "cnf-default"
Expand Down
Loading

0 comments on commit 0e8f0fe

Please sign in to comment.