Skip to content

Commit 3054d80

Browse files
committed
Adapt cert tests for CNTI certification V2.0
Ref: #1932 Signed-off-by: Martin Matyas <martin.matyas@tietoevry.com>
1 parent daccafa commit 3054d80

File tree

5 files changed

+14
-11
lines changed

5 files changed

+14
-11
lines changed

embedded_files/points.yml

+10-7
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@
1212
tags: [microservice, dynamic, workload, cert, normal]
1313
- name: specialized_init_system
1414
emoji: "🚀"
15-
tags: [microservice, dynamic, workload]
15+
tags: [microservice, dynamic, workload, essential, cert]
16+
pass: 100
1617
- name: reasonable_startup_time
1718
tags: [microservice, dynamic, workload, cert, normal]
1819
- name: single_process_type
@@ -21,7 +22,8 @@
2122
pass: 100
2223
- name: zombie_handled
2324
emoji: "⚖👀"
24-
tags: [microservice, dynamic, workload, normal]
25+
tags: [microservice, dynamic, workload, essential, cert]
26+
pass: 100
2527
- name: service_discovery
2628
emoji: "⚖👀"
2729
tags: [microservice, dynamic, workload, cert, bonus]
@@ -32,8 +34,8 @@
3234
tags: [microservice, dynamic, workload, cert, normal]
3335
- name: sig_term_handled
3436
emoji: "⚖👀"
35-
tags: [microservice, dynamic, workload, normal]
36-
37+
tags: [microservice, dynamic, workload, essential, cert]
38+
pass: 100
3739
- name: cni_compatible
3840
emoji: "🔓🔑"
3941
tags: [compatibility, dynamic, workload, cert, normal]
@@ -113,8 +115,8 @@
113115
tags: [resilience, dynamic, workload, cert, normal]
114116
- name: pod_dns_error
115117
emoji: "🗡️💀♻"
116-
tags: [resilience, dynamic, workload, cert, bonus]
117-
pass: 1
118+
tags: [resilience, dynamic, workload, essential, cert]
119+
pass: 100
118120
fail: 0
119121
#- name: external_retry
120122
# tags: scalability, dynamic, workload
@@ -199,7 +201,8 @@
199201

200202
- name: volume_hostpath_not_found
201203
emoji: "💾"
202-
tags: [state, dynamic, workload]
204+
tags: [state, dynamic, workload, essential, cert]
205+
pass: 100
203206
- name: no_local_volume_configuration
204207
emoji: "💾"
205208
tags: [state, dynamic, workload, cert, bonus]

src/tasks/cert/cert.cr

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ task "cert", ["version", "cert_compatibility", "cert_state", "cert_security", "c
2020
essential_max_passed = CNFManager::Points.total_max_passed("essential")
2121
stdout_success " - #{total_passed} of #{max_passed} total tests passed"
2222

23-
if ESSENTIAL_PASSING_SCORE >= 1000
23+
if essential_total_passed >= ESSENTIAL_PASSED_THRESHOLD
2424
stdout_success " - #{essential_total_passed} of #{essential_max_passed} essential tests passed"
2525
else
2626
stdout_failure "FAILED: #{essential_total_passed} of #{essential_max_passed} essential tests passed"

src/tasks/cert/cert_microservice.cr

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ require "halite"
99
require "totem"
1010

1111
desc "The CNF test suite checks to see if CNFs follows microservice principles"
12-
task "cert_microservice", ["cert_microservice_title","reasonable_image_size", "reasonable_startup_time", "single_process_type", "service_discovery", "shared_database"] do |_, args|
12+
task "cert_microservice", ["cert_microservice_title","reasonable_image_size", "reasonable_startup_time", "single_process_type", "service_discovery", "shared_database", "zombie_handled", "sig_term_handled", "specialized_init_system"] do |_, args|
1313
# task "cert_microservice", ["cert_microservice_title", "reasonable_image_size", "reasonable_startup_time", "service_discovery"] do |_, args|
1414
# stdout_score("microservice")
1515
stdout_score(["microservice", "cert"], "microservice")

src/tasks/cert/cert_state.cr

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ require "../utils/utils.cr"
77
require "kubectl_client"
88

99
desc "The CNF test suite checks if state is stored in a custom resource definition or a separate database (e.g. etcd) rather than requiring local storage. It also checks to see if state is resilient to node failure"
10-
task "cert_state", ["cert_state_title", "no_local_volume_configuration", "elastic_volumes", "node_drain"] do |_, args|
10+
task "cert_state", ["cert_state_title", "no_local_volume_configuration", "elastic_volumes", "node_drain", "volume_hostpath_not_found"] do |_, args|
1111
# task "cert_state", ["cert_state_title", "no_local_volume_configuration", "elastic_volumes" ] do |_, args|
1212
# stdout_score("state")
1313
stdout_score(["state", "cert"], "state")

src/tasks/constants.cr

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
require "./utils/embedded_file_manager.cr"
22

3-
ESSENTIAL_PASSING_SCORE = 1000
3+
ESSENTIAL_PASSED_THRESHOLD = 15
44
CNF_DIR = "cnfs"
55
CONFIG_FILE = "cnf-testsuite.yml"
66
BASE_CONFIG = "./config.yml"

0 commit comments

Comments
 (0)