Skip to content

Commit 7c886a5

Browse files
committed
Uninstall all after all spec tests
It may avoid some scrashes when deleting kind clusters. Fixes #2350 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
1 parent a85238d commit 7c886a5

21 files changed

+81
-0
lines changed

spec/platform/platform_spec.cr

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,5 +26,9 @@ describe "Platform" do
2626
result = ShellCmd.run_testsuite("platform:control_plane_hardening")
2727
(/You must install a CNF first./ =~ result[:output]).should be_nil
2828
end
29+
30+
after_all do
31+
result = ShellCmd.run_testsuite("uninstall_all")
32+
end
2933
end
3034

spec/setup_spec.cr

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -483,4 +483,8 @@ describe "Installation" do
483483
result[:status].success?.should be_true
484484
end
485485
end
486+
487+
after_all do
488+
result = ShellCmd.run_testsuite("uninstall_all")
489+
end
486490
end

spec/utils/k8s_instrumentation_spec.cr

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,7 @@ describe "K8sInstrumentation" do
1616
(resp["95th percentile"].to_f).should_not be_nil
1717
end
1818

19+
after_all do
20+
result = ShellCmd.run_testsuite("uninstall_all")
21+
end
1922
end

spec/workload/compatibility_spec.cr

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,4 +74,8 @@ describe "Compatibility" do
7474
ShellCmd.cnf_uninstall
7575
end
7676
end
77+
78+
after_all do
79+
result = ShellCmd.run_testsuite("uninstall_all")
80+
end
7781
end

spec/workload/configuration_spec.cr

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -362,4 +362,8 @@ describe CnfTestSuite do
362362
result[:status].success?.should be_false
363363
(/You must install a CNF first./ =~ result[:output]).should_not be_nil
364364
end
365+
366+
after_all do
367+
result = ShellCmd.run_testsuite("uninstall_all")
368+
end
365369
end

spec/workload/installability_spec.cr

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,4 +74,8 @@ describe CnfTestSuite do
7474
result = ShellCmd.cnf_uninstall()
7575
end
7676
end
77+
78+
after_all do
79+
result = ShellCmd.run_testsuite("uninstall_all")
80+
end
7781
end

spec/workload/microservice_spec.cr

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -280,6 +280,7 @@ describe "Microservice" do
280280
result[:status].success?.should be_true
281281
end
282282
end
283+
283284
it "'zombie_handled' should failed if a zombie is not succesfully reaped by PID 1", tags: ["zombie"] do
284285
begin
285286

@@ -292,5 +293,9 @@ describe "Microservice" do
292293
result[:status].success?.should be_true
293294
end
294295
end
296+
297+
after_all do
298+
result = ShellCmd.run_testsuite("uninstall_all")
299+
end
295300
end
296301

spec/workload/observability_spec.cr

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -176,4 +176,8 @@ describe "Observability" do
176176
it "'tracing' should pass if tracing is used", tags: ["observability_jaeger_pass"] do
177177
# (kosstennbl) TODO: Test and specs for 'tracing' should be redesigned. Check #2153 for more info. Spec was using sample-tracing CNF.
178178
end
179+
180+
after_all do
181+
result = ShellCmd.run_testsuite("uninstall_all")
182+
end
179183
end

spec/workload/operator_spec.cr

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,4 +75,8 @@ describe "Operator" do
7575
result[:status].success?.should be_true
7676
end
7777
end
78+
79+
after_all do
80+
result = ShellCmd.run_testsuite("uninstall_all")
81+
end
7882
end

spec/workload/registry_spec.cr

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,5 +139,6 @@ describe "Private Registry: Rolling" do
139139
end
140140
end
141141
Dockerd.uninstall
142+
result = ShellCmd.run_testsuite("uninstall_all")
142143
end
143144
end

0 commit comments

Comments
 (0)