Skip to content

Commit ea4e695

Browse files
committed
Optimize the Gate duration
It spits ["cnf_installation"], ["observability"] and ["shared_database"] to optimize the gates. All the jobs end before 13 min now. It also reduces the retries when searching image digests to avoid wasting too much time in the negative testing. It renames shared_database2 to shared_database_flaky to avoid breaking the numbering. Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
1 parent b9906d8 commit ea4e695

File tree

5 files changed

+45
-45
lines changed

5 files changed

+45
-45
lines changed

.github/workflows/actions.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,10 @@ jobs:
3838
TEST_ARRAY=("${TEST_ARRAY[@]/pod_network_latency/}")
3939
TEST_ARRAY=("${TEST_ARRAY[@]/zombie/}")
4040
TEST_ARRAY=("${TEST_ARRAY[@]/oran/}")
41-
# Skip 5g, core, shared_database2 tags because they are flaky
41+
# Skip 5g, core, shared_database_flaky tags because they are flaky
4242
TEST_ARRAY=("${TEST_ARRAY[@]/5g/}")
4343
TEST_ARRAY=("${TEST_ARRAY[@]/core/}")
44-
TEST_ARRAY=("${TEST_ARRAY[@]/shared_database2/}")
44+
TEST_ARRAY=("${TEST_ARRAY[@]/shared_database_flaky/}")
4545
TEST_LIST=$(for i in ${TEST_ARRAY[@]}
4646
do
4747
echo "{\"spec\":\"$i\"}," | tr -d '\n'

spec/setup_spec.cr

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,13 @@ def fetch_nginx_chart_tgz(dest_dir : String, version = "15.10.0") : String
2121
end
2222

2323
describe "Installation" do
24-
it "'setup' should install all cnf-testsuite dependencies before installing cnfs", tags: ["cnf_installation"] do
24+
it "'setup' should install all cnf-testsuite dependencies before installing cnfs", tags: ["cnf_installation1"] do
2525
result = ShellCmd.run_testsuite("setup")
2626
result[:status].success?.should be_true
2727
(/Dependency installation complete/ =~ result[:output]).should_not be_nil
2828
end
2929

30-
it "'uninstall_all' should uninstall CNF and testsuite dependencies", tags: ["cnf_installation"] do
30+
it "'uninstall_all' should uninstall CNF and testsuite dependencies", tags: ["cnf_installation1"] do
3131
begin
3232
result = ShellCmd.cnf_install("cnf-config=./sample-cnfs/sample-minimal-cnf/")
3333
(/CNF installation complete/ =~ result[:output]).should_not be_nil
@@ -38,23 +38,23 @@ describe "Installation" do
3838
end
3939
end
4040

41-
it "'cnf_install' should pass with a minimal cnf-testsuite.yml", tags: ["cnf_installation"] do
41+
it "'cnf_install' should pass with a minimal cnf-testsuite.yml", tags: ["cnf_installation1"] do
4242
result = ShellCmd.cnf_install("cnf-path=./sample-cnfs/sample-minimal-cnf/")
4343
(/CNF installation complete/ =~ result[:output]).should_not be_nil
4444
ensure
4545
result = ShellCmd.cnf_uninstall()
4646
(/All CNF deployments were uninstalled/ =~ result[:output]).should_not be_nil
4747
end
4848

49-
it "'cnf_install/cnf_uninstall' should install/uninstall with cnf-config arg as an alias for cnf-path", tags: ["cnf_installation"] do
49+
it "'cnf_install/cnf_uninstall' should install/uninstall with cnf-config arg as an alias for cnf-path", tags: ["cnf_installation1"] do
5050
result = ShellCmd.cnf_install("cnf-config=./sample-cnfs/sample-minimal-cnf/")
5151
(/CNF installation complete/ =~ result[:output]).should_not be_nil
5252
ensure
5353
result = ShellCmd.cnf_uninstall()
5454
(/All CNF deployments were uninstalled/ =~ result[:output]).should_not be_nil
5555
end
5656

57-
it "'cnf_install/cnf_uninstall' should install/uninstall with cnf-path arg as an alias for cnf-config (.yml)", tags: ["cnf_installation"] do
57+
it "'cnf_install/cnf_uninstall' should install/uninstall with cnf-path arg as an alias for cnf-config (.yml)", tags: ["cnf_installation1"] do
5858
begin
5959
result = ShellCmd.cnf_install("cnf-path=example-cnfs/coredns/cnf-testsuite.yml")
6060
(/CNF installation complete/ =~ result[:output]).should_not be_nil
@@ -64,7 +64,7 @@ describe "Installation" do
6464
end
6565
end
6666

67-
it "'cnf_install/cnf_uninstall' should install/uninstall with cnf-path arg as an alias for cnf-config (.yaml)", tags: ["cnf_installation"] do
67+
it "'cnf_install/cnf_uninstall' should install/uninstall with cnf-path arg as an alias for cnf-config (.yaml)", tags: ["cnf_installation1"] do
6868
begin
6969
result = ShellCmd.cnf_install("cnf-path=spec/fixtures/cnf-testsuite.yaml")
7070
(/CNF installation complete/ =~ result[:output]).should_not be_nil
@@ -74,7 +74,7 @@ describe "Installation" do
7474
end
7575
end
7676

77-
it "'cnf_install/cnf_uninstall' should fail on incorrect config", tags: ["cnf_installation"] do
77+
it "'cnf_install/cnf_uninstall' should fail on incorrect config", tags: ["cnf_installation1"] do
7878
begin
7979
result = ShellCmd.cnf_install("cnf-path=spec/fixtures/sample-bad-config.yml", expect_failure: true)
8080
(/Error during parsing CNF config/ =~ result[:output]).should_not be_nil
@@ -83,7 +83,7 @@ describe "Installation" do
8383
end
8484
end
8585

86-
it "'cnf_install/cnf_uninstall' should fail on invalid config path", tags: ["cnf_installation"] do
86+
it "'cnf_install/cnf_uninstall' should fail on invalid config path", tags: ["cnf_installation1"] do
8787
begin
8888
result = ShellCmd.cnf_install("cnf-path=spec/fixtures/bad-config-path", expect_failure: true)
8989
(/Invalid CNF configuration file: spec\/fixtures\/bad-config-path\./ =~ result[:output]).should_not be_nil
@@ -92,7 +92,7 @@ describe "Installation" do
9292
end
9393
end
9494

95-
it "'cnf_install/cnf_uninstall' should install/uninstall a cnf with a cnf-testsuite.yml", tags: ["cnf_installation"] do
95+
it "'cnf_install/cnf_uninstall' should install/uninstall a cnf with a cnf-testsuite.yml", tags: ["cnf_installation1"] do
9696
begin
9797
result = ShellCmd.cnf_install("cnf-config=example-cnfs/coredns/cnf-testsuite.yml")
9898
(/CNF installation complete/ =~ result[:output]).should_not be_nil
@@ -102,7 +102,7 @@ describe "Installation" do
102102
end
103103
end
104104

105-
it "'cnf_install/cnf_uninstall' should work with cnf-testsuite.yml that has no directory associated with it", tags: ["cnf_installation"] do
105+
it "'cnf_install/cnf_uninstall' should work with cnf-testsuite.yml that has no directory associated with it", tags: ["cnf_installation1"] do
106106
begin
107107
#TODO force cnfs/<name> to be deployment name and not the directory name
108108
result = ShellCmd.cnf_install("cnf-config=spec/fixtures/cnf-testsuite.yml")
@@ -113,7 +113,7 @@ describe "Installation" do
113113
end
114114
end
115115

116-
it "'cnf_install/cnf_uninstall' should install/uninstall with helm_directory that descends multiple directories", tags: ["cnf_installation"] do
116+
it "'cnf_install/cnf_uninstall' should install/uninstall with helm_directory that descends multiple directories", tags: ["cnf_installation1"] do
117117
begin
118118
result = ShellCmd.cnf_install("cnf-path=sample-cnfs/multi_helm_directories/cnf-testsuite.yml")
119119
(/CNF installation complete/ =~ result[:output]).should_not be_nil
@@ -123,7 +123,7 @@ describe "Installation" do
123123
end
124124
end
125125

126-
it "'cnf_install/cnf_uninstall' should properly install/uninstall old versions of cnf configs", tags: ["cnf_installation"] do
126+
it "'cnf_install/cnf_uninstall' should properly install/uninstall old versions of cnf configs", tags: ["cnf_installation1"] do
127127
begin
128128
result = ShellCmd.cnf_install("cnf-path=spec/fixtures/cnf-testsuite-v1-example.yml")
129129
(/CNF installation complete/ =~ result[:output]).should_not be_nil
@@ -133,7 +133,7 @@ describe "Installation" do
133133
end
134134
end
135135

136-
it "'cnf_install' should fail if another CNF is already installed", tags: ["cnf_installation"] do
136+
it "'cnf_install' should fail if another CNF is already installed", tags: ["cnf_installation1"] do
137137
begin
138138
result = ShellCmd.cnf_install("cnf-path=sample-cnfs/sample_coredns/cnf-testsuite.yml")
139139
(/CNF installation complete/ =~ result[:output]).should_not be_nil
@@ -145,7 +145,7 @@ describe "Installation" do
145145
end
146146
end
147147

148-
it "'cnf_install/cnf_uninstall' should install/uninstall a cnf with multiple deployments", tags: ["cnf_installation"] do
148+
it "'cnf_install/cnf_uninstall' should install/uninstall a cnf with multiple deployments", tags: ["cnf_installation1"] do
149149
begin
150150
result = ShellCmd.cnf_install("cnf-path=sample-cnfs/sample_multiple_deployments/cnf-testsuite.yml")
151151
(/All "coredns" deployment resources are up/ =~ result[:output]).should_not be_nil
@@ -161,7 +161,7 @@ describe "Installation" do
161161
end
162162
end
163163

164-
it "'cnf_install/cnf_uninstall' should install/uninstall deployment with mixed installation methods", tags: ["cnf_installation"] do
164+
it "'cnf_install/cnf_uninstall' should install/uninstall deployment with mixed installation methods", tags: ["cnf_installation1"] do
165165
begin
166166
result = ShellCmd.cnf_install("cnf-path=sample-cnfs/sample-nginx-redis/cnf-testsuite.yml")
167167
(/All "nginx" deployment resources are up/ =~ result[:output]).should_not be_nil
@@ -175,7 +175,7 @@ describe "Installation" do
175175
end
176176
end
177177

178-
it "'cnf_install/cnf_uninstall' should handle partial deployment failures gracefully", tags: ["cnf_installation"] do
178+
it "'cnf_install/cnf_uninstall' should handle partial deployment failures gracefully", tags: ["cnf_installation1"] do
179179
begin
180180
result = ShellCmd.cnf_install("cnf-path=sample-cnfs/sample-partial-deployment-failure/cnf-testsuite.yml", expect_failure: true)
181181
(/All "nginx" deployment resources are up/ =~ result[:output]).should_not be_nil
@@ -187,7 +187,7 @@ describe "Installation" do
187187
end
188188
end
189189

190-
it "'cnf_install' should detect and report conflicts between deployments", tags: ["cnf_installation"] do
190+
it "'cnf_install' should detect and report conflicts between deployments", tags: ["cnf_installation1"] do
191191
begin
192192
result = ShellCmd.cnf_install("cnf-path=spec/fixtures/sample-conflicting-deployments.yml", expect_failure: true)
193193
(/Deployment names should be unique/ =~ result[:output]).should_not be_nil
@@ -196,7 +196,7 @@ describe "Installation" do
196196
end
197197
end
198198

199-
it "'cnf_install' should correctly handle deployment priority", tags: ["cnf_installation"] do
199+
it "'cnf_install' should correctly handle deployment priority", tags: ["cnf_installation_priority"] do
200200
# (kosstennbl) ELK stack requires to be installed with specific order, otherwise it would give errors
201201
begin
202202
result = ShellCmd.cnf_install("cnf-path=sample-cnfs/sample-elk-stack/cnf-testsuite.yml", timeout: 600)
@@ -249,14 +249,14 @@ describe "Installation" do
249249
end
250250
end
251251

252-
it "'cnf_uninstall' should warn user if no CNF is found", tags: ["cnf_installation"] do
252+
it "'cnf_uninstall' should warn user if no CNF is found", tags: ["cnf_installation2"] do
253253
begin
254254
result = ShellCmd.cnf_uninstall()
255255
(/CNF uninstallation skipped/ =~ result[:output]).should_not be_nil
256256
end
257257
end
258258

259-
it "'cnf_uninstall' should fail for a stuck manifest deployment", tags: ["cnf_installation"] do
259+
it "'cnf_uninstall' should fail for a stuck manifest deployment", tags: ["cnf_installation2"] do
260260
result = ShellCmd.cnf_install("cnf-path=sample-cnfs/sample_stuck_finalizer/cnf-testsuite.yml")
261261
result[:status].success?.should be_true
262262

@@ -276,7 +276,7 @@ describe "Installation" do
276276
(/CNF uninstallation skipped/ =~ result[:output]).should_not be_nil
277277
end
278278

279-
it "'cnf_uninstall' should fail for a stuck helm deployment", tags: ["cnf_installation"] do
279+
it "'cnf_uninstall' should fail for a stuck helm deployment", tags: ["cnf_installation2"] do
280280
result = ShellCmd.cnf_install("cnf-path=sample-cnfs/sample_stuck_helm_deployment/")
281281
result[:status].success?.should be_true
282282

@@ -308,7 +308,7 @@ describe "Installation" do
308308
(/CNF uninstallation skipped/ =~ result[:output]).should_not be_nil
309309
end
310310

311-
it "'cnf_install' should pass for oci repository", tags: ["cnf_installation"] do
311+
it "'cnf_install' should pass for oci repository", tags: ["cnf_installation2"] do
312312
local_registry_port = 53123
313313
tgz = fetch_nginx_chart_tgz("sample-cnfs/sample_oci_repo")
314314

@@ -355,7 +355,7 @@ describe "Installation" do
355355
end
356356
end
357357

358-
it "'cnf_install' should pass for private helm repository", tags: ["cnf_installation"] do
358+
it "'cnf_install' should pass for private helm repository", tags: ["cnf_installation2"] do
359359
chart_museum_port = 53124
360360
tgz = fetch_nginx_chart_tgz("sample-cnfs/sample_private_repo")
361361

@@ -400,7 +400,7 @@ describe "Installation" do
400400
end
401401
end
402402

403-
it "'cnf_install' should require client cert for OCI registry (mTLS)", tags: ["cnf_installation"] do
403+
it "'cnf_install' should require client cert for OCI registry (mTLS)", tags: ["cnf_installation2"] do
404404
registry_port = 54125
405405
reg_host = "127.0.0.1.nip.io"
406406
reg_host_port = "#{reg_host}:#{registry_port}"

spec/workload/microservice_spec.cr

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ describe "Microservice" do
1313
process_result.should be_true
1414
end
1515

16-
it "'shared_database' should be skipped no MariaDB containers are found", tags: ["shared_database"] do
16+
it "'shared_database' should be skipped no MariaDB containers are found", tags: ["shared_database1"] do
1717
begin
1818
ShellCmd.cnf_install("cnf-path=sample-cnfs/sample_coredns/cnf-testsuite.yml")
1919
result = ShellCmd.run_testsuite("shared_database")
@@ -25,7 +25,7 @@ describe "Microservice" do
2525
end
2626
end
2727

28-
it "'shared_database' should pass if no database is used by two microservices", tags: ["shared_database"] do
28+
it "'shared_database' should pass if no database is used by two microservices", tags: ["shared_database2"] do
2929
begin
3030
ShellCmd.cnf_install("cnf-path=sample-cnfs/sample-statefulset-cnf/cnf-testsuite.yml")
3131
result = ShellCmd.run_testsuite("shared_database")
@@ -37,7 +37,7 @@ describe "Microservice" do
3737
end
3838
end
3939

40-
it "'shared_database' should pass if one service connects to a database but other non-service connections are made to the database", tags: ["shared_database"] do
40+
it "'shared_database' should pass if one service connects to a database but other non-service connections are made to the database", tags: ["shared_database3"] do
4141
begin
4242
ShellCmd.cnf_install("cnf-path=sample-cnfs/sample-multi-db-connections-exempt/cnf-testsuite.yml")
4343
result = ShellCmd.run_testsuite("shared_database")
@@ -49,7 +49,7 @@ describe "Microservice" do
4949
end
5050
end
5151

52-
it "'shared_database' should fail if two services on the cluster connect to the same database", tags: ["shared_database2"] do
52+
it "'shared_database' should fail if two services on the cluster connect to the same database", tags: ["shared_database_flaky"] do
5353
begin
5454
ShellCmd.cnf_install("cnf-path=sample-cnfs/ndn-multi-db-connections-fail/cnf-testsuite.yml")
5555
result = ShellCmd.run_testsuite("shared_database")
@@ -62,7 +62,7 @@ describe "Microservice" do
6262
end
6363
end
6464

65-
it "'shared_database' should pass if two services on the cluster connect to the same database but they are not in the helm chart of the cnf", tags: ["shared_database"] do
65+
it "'shared_database' should pass if two services on the cluster connect to the same database but they are not in the helm chart of the cnf", tags: ["shared_database4"] do
6666
begin
6767
ShellCmd.cnf_install("cnf-path=sample-cnfs/sample_coredns")
6868
KubectlClient::Apply.namespace(DEFAULT_CNF_NAMESPACE)

spec/workload/observability_spec.cr

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ describe "Observability" do
1010
result[:status].success?.should be_true
1111
end
1212

13-
it "'log_output' should pass with a cnf that outputs logs to stdout", tags: ["observability"] do
13+
it "'log_output' should pass with a cnf that outputs logs to stdout", tags: ["observability_log_output"] do
1414
begin
1515
ShellCmd.cnf_install("cnf-config=sample-cnfs/sample-coredns-cnf/cnf-testsuite.yml")
1616
result = ShellCmd.run_testsuite("log_output")
@@ -21,7 +21,7 @@ describe "Observability" do
2121
end
2222
end
2323

24-
it "'log_output' should fail with a cnf that does not output logs to stdout", tags: ["observability"] do
24+
it "'log_output' should fail with a cnf that does not output logs to stdout", tags: ["observability_log_output"] do
2525
begin
2626
ShellCmd.cnf_install("cnf-config=sample-cnfs/sample_no_logs/cnf-testsuite.yml")
2727
result = ShellCmd.run_testsuite("log_output")
@@ -32,7 +32,7 @@ describe "Observability" do
3232
end
3333
end
3434

35-
it "'prometheus_traffic' should pass if there is prometheus traffic", tags: ["observability"] do
35+
it "'prometheus_traffic' should pass if there is prometheus traffic", tags: ["observability_prometheus_traffic"] do
3636
ShellCmd.cnf_install("cnf-config=sample-cnfs/sample-prom-pod-discovery/cnf-testsuite.yml")
3737
helm = Helm::Binary.get
3838

@@ -54,7 +54,7 @@ describe "Observability" do
5454
result[:status].success?.should be_true
5555
end
5656

57-
it "'prometheus_traffic' should skip if there is no prometheus installed", tags: ["observability"] do
57+
it "'prometheus_traffic' should skip if there is no prometheus installed", tags: ["observability_prometheus_traffic"] do
5858

5959
ShellCmd.cnf_install("cnf-config=sample-cnfs/sample-coredns-cnf/cnf-testsuite.yml")
6060
helm = Helm::Binary.get
@@ -66,7 +66,7 @@ describe "Observability" do
6666
result = ShellCmd.cnf_uninstall()
6767
end
6868

69-
it "'prometheus_traffic' should fail if the cnf is not registered with prometheus", tags: ["observability"] do
69+
it "'prometheus_traffic' should fail if the cnf is not registered with prometheus", tags: ["observability_prometheus_traffic"] do
7070

7171
ShellCmd.cnf_install("cnf-config=sample-cnfs/sample-coredns-cnf/cnf-testsuite.yml")
7272
Log.info { "Installing prometheus server" }
@@ -85,7 +85,7 @@ describe "Observability" do
8585
result[:status].success?.should be_true
8686
end
8787

88-
it "'open_metrics' should fail if there is not a valid open metrics response from the cnf", tags: ["observability"] do
88+
it "'open_metrics' should fail if there is not a valid open metrics response from the cnf", tags: ["observability_open_metrics"] do
8989
ShellCmd.cnf_install("cnf-config=sample-cnfs/sample-prom-pod-discovery/cnf-testsuite.yml")
9090
result = ShellCmd.run("helm repo add prometheus-community https://prometheus-community.github.io/helm-charts", force_output: true)
9191
Log.info { "Installing prometheus server" }
@@ -103,7 +103,7 @@ describe "Observability" do
103103
result[:status].success?.should be_true
104104
end
105105

106-
it "'open_metrics' should pass if there is a valid open metrics response from the cnf", tags: ["observability"] do
106+
it "'open_metrics' should pass if there is a valid open metrics response from the cnf", tags: ["observability_open_metrics"] do
107107
ShellCmd.cnf_install("cnf-config=sample-cnfs/sample-openmetrics/cnf-testsuite.yml")
108108
result = ShellCmd.run("helm repo add prometheus-community https://prometheus-community.github.io/helm-charts", force_output: true)
109109
Log.info { "Installing prometheus server" }
@@ -121,7 +121,7 @@ describe "Observability" do
121121
result[:status].success?.should be_true
122122
end
123123

124-
it "'routed_logs' should pass if cnfs logs are captured by fluentd", tags: ["observability"] do
124+
it "'routed_logs' should pass if cnfs logs are captured by fluentd", tags: ["observability_routed_logs"] do
125125
ShellCmd.cnf_install("cnf-config=sample-cnfs/sample-coredns-cnf/cnf-testsuite.yml")
126126
result = ShellCmd.run_testsuite("setup:install_fluentd")
127127
result = ShellCmd.run_testsuite("routed_logs")
@@ -132,7 +132,7 @@ describe "Observability" do
132132
result[:status].success?.should be_true
133133
end
134134

135-
it "'routed_logs' should pass if cnfs logs are captured by fluentd bitnami", tags: ["observability"] do
135+
it "'routed_logs' should pass if cnfs logs are captured by fluentd bitnami", tags: ["observability_routed_logs"] do
136136
ShellCmd.cnf_install("cnf-config=sample-cnfs/sample-coredns-cnf/cnf-testsuite.yml")
137137
result = ShellCmd.run_testsuite("setup:install_fluentdbitnami")
138138
result = ShellCmd.run_testsuite("routed_logs")
@@ -143,7 +143,7 @@ describe "Observability" do
143143
result[:status].success?.should be_true
144144
end
145145

146-
it "'routed_logs' should pass if cnfs logs are captured by fluentbit", tags: ["observability"] do
146+
it "'routed_logs' should pass if cnfs logs are captured by fluentbit", tags: ["observability_routed_logs"] do
147147
ShellCmd.cnf_install("cnf-config=sample-cnfs/sample-fluentbit")
148148
result = ShellCmd.run_testsuite("setup:install_fluentbit")
149149
result = ShellCmd.run_testsuite("routed_logs")
@@ -154,7 +154,7 @@ describe "Observability" do
154154
result[:status].success?.should be_true
155155
end
156156

157-
it "'routed_logs' should fail if cnfs logs are not captured", tags: ["observability"] do
157+
it "'routed_logs' should fail if cnfs logs are not captured", tags: ["observability_routed_logs"] do
158158
ShellCmd.cnf_install("cnf-config=sample-cnfs/sample-coredns-cnf/cnf-testsuite.yml")
159159
Helm.helm_repo_add("bitnami","https://charts.bitnami.com/bitnami")
160160
#todo #helm install --values ./override.yml fluentd ./fluentd

0 commit comments

Comments
 (0)