Skip to content

Commit c23c7a5

Browse files
committed
Make testcase docs more consistent, introduce testcase url
Signed-off-by: Matthias Büchse <matthias.buechse@alasca.cloud>
1 parent d579a43 commit c23c7a5

17 files changed

Lines changed: 208 additions & 176 deletions

Standards/scs-0003-v1-sovereign-cloud-standards-yaml.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,8 @@ TBD
226226
| ----------------- | --------------- | ------------------------------------------------------------------------------------------------- | ----------------- |
227227
| `id` | String | Identifier for this test case (immutable and unique within this module) | `image-md-check` |
228228
| `lifetime` | String | One of: `day`, `week` (_default_), `month`, `quarter`, `year` | `day` |
229-
| `description` | String | Short description of the test case | |
229+
| `description` | String | Short description of the test case (markdown allowed, but keep it short for CLI users) | |
230+
| `url` | String | URL pointing to the relevant SCS documentation for the testcase | |
230231

231232
A test result is valid until the end of the next period, except when lifetime is `year`: then the result is
232233
valid until the end of the following month plus one year.

Standards/scs-0100-w1-flavor-naming-implementation-testing.md

Lines changed: 4 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -154,30 +154,12 @@ generation `x` for the time being.
154154

155155
## Automated tests
156156

157-
### Errors
158-
159-
The following items MUST be detected and reported as an error:
160-
161-
- any syntax error in a name starting with `SCS-`,
162-
- any mismatch between any immediately discoverable property of a flavor (currently, CPU, RAM and disk size)
163-
and the meaning of its name (which is usually a lower bound), such as the CPU generation or hypervisor.
164-
165-
In addition, the following items MAY be reported as an error:
166-
167-
- any mismatch between any non-immediately discoverable property of flavor and the meaning of its name.
168-
169-
### Warnings
170-
171-
None so far.
172-
173-
### Implementation
174-
175-
We implemented two testcases, paralleling the two items in the "Errors" section above:
157+
The following testcases [are implemented](https://github.com/SovereignCloudStack/standards/tree/main/Tests/iaas/openstack_test.py):
176158

177159
- `scs-0100-syntax-check` ensures that any name starting with `SCS-` adheres to the standard;
178-
- `scs-0100-semantics-check` ensures that any such name is telling the truth as specified in the standard.
179-
180-
These testcases can be checked using [`openstack_test.py`](https://github.com/SovereignCloudStack/standards/tree/main/Tests/iaas/openstack_test.py).
160+
- `scs-0100-semantics-check` ensures that any such name is telling the truth as specified in the standard;
161+
specifically: any immediately discoverable property of a flavor (currently, CPU, RAM and disk size)
162+
matches the meaning of its name (which is usually a lower bound), such as the CPU generation or hypervisor.
181163

182164
## Manual tests
183165

Standards/scs-0101-w1-entropy-implementation-testing.md

Lines changed: 9 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -19,57 +19,26 @@ Only the flavor and image attributes required by the standard have to be set:
1919

2020
## Automated tests
2121

22-
### Images sample
22+
The following testcases [are implemented](https://github.com/SovereignCloudStack/standards/blob/main/Tests/iaas/openstack_test.py):
2323

24-
Some checks need to be performed on a live instance. For these checks, it is
25-
necessary to choose a sample of VM images to test on.
26-
27-
For the time being, the sample MUST contain at least one public image reported
28-
by OpenStack. This may be extended in the future.
29-
30-
### Errors
31-
32-
For every image in the chosen sample, the following items MUST be detected and
33-
reported as an error:
34-
35-
- the service `rngd` is not running,
36-
- the special file `/proc/sys/kernel/random/entropy_avail` does not contain
37-
the value 256 (pinned since kernel 5.18),
38-
- the number of FIPS 140-2 failures exceeds 5 out of 1000 blocks
39-
tested, as determined by `cat /dev/random | rngtest -c 1000` .
24+
- `scs-0101-image-property` ensures that each flavor has the extra spec `hw_rng:allowed=True`,
25+
- `scs-0101-flavor-property` ensures that each public image has the property `hw_rng_model: virtio`,
26+
- `scs-0101-rngd` ensures that the service `rngd` is present on a sample VM,
27+
- `scs-0101-entropy-avail` ensures that the special file `/proc/sys/kernel/random/entropy_avail` contains
28+
the value 256 (pinned since kernel 5.18) on a sample VM,
29+
- `scs-0101-fips-test` ensures that the number of FIPS 140-2 failures is below 5 out of 1000 blocks
30+
tested, as determined by `cat /dev/random | rngtest -c 1000` on a sample VM.
4031

4132
Note: The latter two items act as surrogates for the following item, which
4233
cannot be detected directly:
4334

44-
- CPU instructions for accessing entropy are not available to the VMs.
45-
46-
### Warnings
47-
48-
The following items MUST be detected and reported as a warning:
49-
50-
- any flavor missing the attribute `hw_rng:allowed=True`,
51-
- any image missing the attribute `hw_rng_model: virtio`,
52-
- the number of FIPS 140-2 failures exceeds 3 out of 1000 blocks
53-
tested (compare with errors).
35+
- CPU instructions for accessing entropy are available to the VMs.
5436

5537
Note that the requirement regarding the kernel patch level will not be
5638
checked, because of two reasons: (a) we already check the file `entropy_avail`
5739
(see subsection on Errors), and (b) users can always choose a recent image,
5840
as ensured by the image metadata standard.
5941

60-
### Implementation
61-
62-
We implemented the following testcases that reflect the items in the above section
63-
on automated tests:
64-
65-
- `scs-0101-image-property`,
66-
- `scs-0101-flavor-property`,
67-
- `scs-0101-entropy-avail`,
68-
- `scs-0101-rngd`,
69-
- `scs-0101-fips-test` (covers both the error and warning case).
70-
71-
These testcases can be checked using [`openstack_test.py`](https://github.com/SovereignCloudStack/standards/blob/main/Tests/iaas/openstack_test.py).
72-
7342
## Manual tests
7443

7544
None.

Standards/scs-0102-w1-image-metadata-implementation-testing.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,10 @@ for these images.
1515

1616
## Automated tests
1717

18-
We implemented a host of testcases to reflect the requirements and recommendations of the standard. The following
19-
testcases ensure that fields have proper values:
18+
We [implemented](https://github.com/SovereignCloudStack/standards/blob/main/Tests/iaas/openstack_test.py)
19+
a host of testcases to reflect the requirements and recommendations of the standard.
20+
21+
The following testcases ensure that fields have proper values:
2022

2123
- `scs-0102-prop-architecture`,
2224
- `scs-0102-prop-hash_algo`,
@@ -42,9 +44,6 @@ The following testcase ensures that each image is as recent as claimed by its `r
4244

4345
- `scs-0102-image-recency`
4446

45-
The script [`openstack_test.py`](https://github.com/SovereignCloudStack/standards/blob/main/Tests/iaas/openstack_test.py)
46-
can be used to check these testcases.
47-
4847
## Manual tests
4948

5049
None.

Standards/scs-0103-w1-standard-flavors-implementation.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,11 @@ You can generate input for it using the tool
1717

1818
## Automated tests
1919

20-
We implemented a set of testcases corresponding 1:1 to the standard flavors:
20+
We [implemented](https://github.com/SovereignCloudStack/standards/blob/main/Tests/iaas/openstack_test.py)
21+
a set of testcases corresponding 1:1 to the standard flavors:
2122

2223
- `scs-0103-flavor-X` with varying `X`: ensures that flavor `SCS-X` is present and has the
2324
required `extra_specs`.
2425

2526
_NOTE_: We still need to add testcases to ensure that the `extra_specs` of non-standard
2627
flavors are correct as well.
27-
28-
The testcases can be run using the script
29-
[`openstack_test.py`](https://github.com/SovereignCloudStack/standards/blob/main/Tests/iaas/openstack_test.py).

Standards/scs-0104-w1-standard-images-implementation.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,8 @@ Please see [its documentation](https://docs.scs.community/docs/iaas/components/i
6161

6262
## Automated tests
6363

64-
We implemented testcases reflecting the information given in the YAML file(s). Be advised that
64+
We [implemented](https://github.com/SovereignCloudStack/standards/blob/main/Tests/iaas/openstack_test.py)
65+
testcases reflecting the information given in the YAML file(s). Be advised that
6566
the approach with the YAML file has considerable drawbacks, and it will be abandoned in
6667
future versions of the standard in favor of a more classical approach. The testcases already
6768
anticipate this future development.
@@ -72,6 +73,3 @@ There are two classes of testcases:
7273
these ensure that certain images have the correct `image_source`;
7374
- `scs-0104-image-X` with varying `X`:
7475
these ensure that certain images can be found in the list of public images.
75-
76-
The testcases can be run using the script
77-
[`openstack_test.py`](https://github.com/SovereignCloudStack/standards/blob/main/Tests/iaas/openstack_test.py).

Standards/scs-0114-w1-volume-type-implementation.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,10 @@ supplements:
88

99
## Automated tests
1010

11-
We implemented the following testcases:
11+
We [implemented](https://github.com/SovereignCloudStack/standards/blob/main/Tests/iaas/openstack_test.py)
12+
the following testcases:
1213

1314
- `scs-0114-syntax-check` ensures that, for every volume type description,
1415
the list of aspects, if present, is formatted according to the standard.
1516
- `scs-0114-encrypted-type` ensures that a volume type featuring encryption is present.
1617
- `scs-0114-replicated-type` ensures that a volume type featuring replication is present.
17-
18-
The testcases can be run using the script
19-
[`openstack_test.py`](https://github.com/SovereignCloudStack/standards/blob/main/Tests/iaas/openstack_test.py).

Standards/scs-0115-w1-security-groups-implementation.md

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,11 @@ supplements:
88

99
## Automated tests
1010

11-
We implemented a single test case,
11+
We [implemented](https://github.com/SovereignCloudStack/standards/blob/main/Tests/iaas/openstack_test.py) a single test case,
1212

1313
- `scs-0115-default-rules`,
1414

1515
which ensures
1616

1717
1. the absence of any ingress traffic rules except traffic from the same Security Group in the `openstack default security group rule list`,
1818
2. the presence of any egress traffic rules.
19-
20-
The testcase can be run using the script
21-
[`openstack_test.py`](https://github.com/SovereignCloudStack/standards/blob/main/Tests/iaas/openstack_test.py).

Standards/scs-0116-w1-key-manager-implementation-testing.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,14 +40,12 @@ This can be done with a small change in the policy.yaml file. The `creator` has
4040
4141
## Automated Tests
4242
43-
We implemented the following testcases, in accordance with the standard:
43+
We [implemented](https://github.com/SovereignCloudStack/standards/blob/main/Tests/iaas/openstack_test.py)
44+
the following testcases, in accordance with the standard:
4445
4546
- `scs-0116-presence` ensures that a service of type "key-manager" occurs in the service catalog;
4647
- `scs-0116-permissions` ensures that a regular user has suitable access to the key-manager API.
4748

48-
The testcases can be run using the script
49-
[`openstack_test.py`](https://github.com/SovereignCloudStack/standards/blob/main/Tests/iaas/openstack_test.py).
50-
5149
## Manual Tests
5250

5351
It is not possible to check a deployment for a correctly protected Master KEK automatically from the outside.

Standards/scs-0117-w1-volume-backup-service-implementation.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,15 @@ supplements:
88

99
## Automated tests
1010

11-
We implemented a single testcase,
11+
We [implemented](https://github.com/SovereignCloudStack/standards/blob/main/Tests/iaas/openstack_test.py)
12+
a single testcase,
1213

1314
- `scs-0117-test-backup`,
1415

1516
which verifies that a non-admin user can backup and restore volumes.
1617

1718
To this end, the testcase uses the `/v3/{project_id}/backups` Block Storage API endpoint to create a volume and a backup of it and subsequently restores the backup on a new volume while verifying the success of each operation.
1819

19-
The testcase can be run using the script
20-
[`openstack_test.py`](https://github.com/SovereignCloudStack/standards/blob/main/Tests/iaas/openstack_test.py).
21-
2220
## Manual tests
2321

2422
Note that the automated tests don't verify the optional part of the standard: providing a separate storage backend for Cinder volume backups.

0 commit comments

Comments
 (0)