Skip to content

Commit 9dadf5a

Browse files
Record aborted testcases, part 1 (#975)
Harden scripts for all testcases that are currently being found in scs-compatible-iaas.yaml. Future work includes to - adapt `Tests/iaas/secure-connections` in the same manner and include testcases into yaml - also harden scripts for testcases in scs-compatible-kaas.yaml Signed-off-by: Matthias Büchse <[email protected]> Co-authored-by: Marvin Frommhold <[email protected]>
1 parent b61054b commit 9dadf5a

File tree

53 files changed

+1656
-2414
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+1656
-2414
lines changed

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

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -167,9 +167,12 @@ None so far.
167167

168168
### Implementation
169169

170-
The script [`flavor-names-openstack.py`](https://github.com/SovereignCloudStack/standards/tree/main/Tests/iaas/flavor-naming/flavor-names-openstack.py)
171-
talks to the OpenStack API of the cloud specified by the `OS_CLOUD` environment and queries properties and
172-
checks the names for standards compliance.
170+
We implemented two testcases, paralleling the two items in the "Errors" section above:
171+
172+
- `scs-0100-syntax-check` ensures that any name starting with `SCS-` adheres to the standard;
173+
- `scs-0100-semantics-check` ensures that any such name is telling the truth as specified in the standard.
174+
175+
These testcases can be checked using [`openstack_test.py`](https://github.com/SovereignCloudStack/standards/tree/main/Tests/iaas/openstack_test.py).
173176

174177
## Manual tests
175178

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

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,16 @@ as ensured by the image metadata standard.
6060

6161
### Implementation
6262

63-
The script [`entropy-check.py`](https://github.com/SovereignCloudStack/standards/blob/main/Tests/iaas/entropy/entropy-check.py)
64-
connects to OpenStack and performs the checks described in this section.
63+
We implemented the following testcases that reflect the items in the above section
64+
on automated tests:
65+
66+
- `scs-0101-image-property`,
67+
- `scs-0101-flavor-property`,
68+
- `scs-0101-entropy-avail`,
69+
- `scs-0101-rngd`,
70+
- `scs-0101-fips-test` (covers both the error and warning case).
71+
72+
These testcases can be checked using [`openstack_test.py`](https://github.com/SovereignCloudStack/standards/blob/main/Tests/iaas/openstack_test.py).
6573

6674
## Manual tests
6775

Standards/scs-0102-v1-image-metadata.md

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -239,9 +239,3 @@ A boolean property that is not present is considered to be `false`.
239239
contact for issues with this image. Note that this field must only be set if the
240240
service provider does provide support for this image included in the image/flavor
241241
pricing (but it might be provided by a contracted 3rd party, e.g. the OS vendor).
242-
243-
### Conformance Tests
244-
245-
The script `image-md-check.py` retrieves the
246-
image list from a configured cloud and checks each image for the
247-
completeness and consistency of mandatory properties.

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

Lines changed: 29 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -16,16 +16,35 @@ for these images.
1616

1717
## Automated tests
1818

19-
### Images sample
20-
21-
Some checks need to be performed on a live instance. All publicly available images on this instance
22-
will be checked for either only the mandatory properties or possibly also the recommended ones.
23-
Additionally, a user can also decide to test their private images, although this isn't a necessity.
24-
25-
### Implementation
26-
27-
The script [`image-md-check.py`](https://github.com/SovereignCloudStack/standards/blob/main/Tests/iaas/image-metadata/image-md-check.py)
28-
connects to OpenStack and performs the checks described in this section.
19+
We implemented a host of testcases to reflect the requirements and recommendations of the standard. The following
20+
testcases ensure that fields have proper values:
21+
22+
- `scs-0102-prop-architecture`,
23+
- `scs-0102-prop-hash_algo`,
24+
- `scs-0102-prop-min_disk`,
25+
- `scs-0102-prop-min_ram`,
26+
- `scs-0102-prop-os_version`,
27+
- `scs-0102-prop-os_distro`,
28+
- `scs-0102-prop-hw_disk_bus`,
29+
- `scs-0102-prop-hypervisor_type`,
30+
- `scs-0102-prop-hw_rng_model`,
31+
- `scs-0102-prop-image_build_date`,
32+
- `scs-0102-prop-image_original_user`,
33+
- `scs-0102-prop-image_source`,
34+
- `scs-0102-prop-image_description`,
35+
- `scs-0102-prop-replace_frequency`,
36+
- `scs-0102-prop-provided_until`,
37+
- `scs-0102-prop-uuid_validity`,
38+
- `scs-0102-prop-hotfix_hours`.
39+
40+
The property `patchlevel` is not tested because it is entirely optional.
41+
42+
The following testcase ensures that each image is as recent as claimed by its `replace_frequency`:
43+
44+
- `scs-0102-image-recency`
45+
46+
The script [`openstack_test.py`](https://github.com/SovereignCloudStack/standards/blob/main/Tests/iaas/openstack_test.py)
47+
can be used to check these testcases.
2948

3049
## Manual tests
3150

Standards/scs-0103-v1-standard-flavors.md

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -156,27 +156,6 @@ with `block_device_mapping_v2`, e.g.
156156
to create a bootable 12G cinder volume from image `IMGUUID` that gets tied to the VM
157157
instance life cycle.)
158158

159-
## Conformance Tests
160-
161-
The script [`flavors-openstack.py`](https://github.com/SovereignCloudStack/standards/blob/main/Tests/iaas/standard-flavors/flavors-openstack.py)
162-
will read the lists of mandatory and recommended flavors
163-
from a yaml file provided as command-line argument, connect to an OpenStack installation,
164-
and check whether the flavors are present and their extra_specs are correct.
165-
166-
Missing flavors will be reported on various logging channels: error for mandatory, warning for
167-
recommended flavors. Incorrect extra_specs will be reported as error in any case.
168-
The return code will be non-zero if the test could not be performed or if any error was
169-
reported.
170-
171-
The script does not check whether a name given via the extra_spec `scs:name-vN` is indeed valid according
172-
to any major version of the SCS standard on flavor naming.
173-
174-
## Operational tooling
175-
176-
The [openstack-flavor-manager](https://github.com/osism/openstack-flavor-manager) is able to
177-
create all standard, mandatory SCS flavors for you. It takes input that can be generated by
178-
`flavor-manager-input.py`.
179-
180159
## Previous standard versions
181160

182161
The list of standard flavors used to be part of the flavor naming standard up until
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
---
2+
title: "SCS Standard Flavors: Implementation and Testing Notes"
3+
type: Supplement
4+
track: IaaS
5+
status: Draft
6+
supplements:
7+
- scs-0103-v1-standard-flavors.md
8+
---
9+
10+
## Operational tooling
11+
12+
The [openstack-flavor-manager](https://github.com/osism/openstack-flavor-manager) is able to
13+
create all standard, mandatory SCS flavors for you. It takes input that can be generated by
14+
[`flavor-manager-input.py`](https://github.com/SovereignCloudStack/standards/blob/main/Tests/iaas/scs_0100_flavor_naming/flavor-manager-input.py).
15+
16+
## Automated tests
17+
18+
We implemented a set of testcases corresponding 1:1 to the standard flavors:
19+
20+
- `scs-0103-flavor-X` with varying `X`: ensures that flavor `SCS-X` is present and has the
21+
required `extra_specs`.
22+
23+
_NOTE_: We still need to add testcases to ensure that the `extra_specs` of non-standard
24+
flavors are correct as well.
25+
26+
The testcases can be run using the script
27+
[`openstack_test.py`](https://github.com/SovereignCloudStack/standards/blob/main/Tests/iaas/openstack_test.py).

Standards/scs-0104-v1-standard-images.md

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -128,18 +128,3 @@ next version. This standard makes no statement as to what is supposed to happen
128128
corresponding images in a live cloud environment. It is recommended to keep the
129129
once-mandatory images in the live environment. As for new environments, it is up to the
130130
operator whether to provide any or all of these images, as stated above.
131-
132-
## Conformance Tests
133-
134-
The script `images-openstack.py` will read the lists of mandatory and recommended images
135-
from a yaml file provided as command-line argument, connect to an OpenStack installation,
136-
and check whether the images are present. Missing images will be reported on various
137-
logging channels: error for mandatory, info for recommended images. Additionally, images
138-
whose `image_source` does not conform with the specifications will be reported on the
139-
error channel. The return code will be non-zero if the test could not be performed or
140-
if any errors have been reported.
141-
142-
## Operational tooling
143-
144-
The [openstack-image-manager](https://github.com/osism/openstack-image-manager) is able to
145-
create all standard, mandatory SCS images for you given image definitions from a YAML file.

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

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
title: "SCS Standard Images: Implementation Notes"
2+
title: "SCS Standard Images: Implementation and Testing Notes"
33
type: Supplement
44
track: IaaS
55
status: Draft
@@ -59,3 +59,20 @@ Run the test script on your environment and check the error messages :)
5959
The [openstack-image-manager](https://github.com/osism/openstack-image-manager) is able to
6060
create all standard, mandatory SCS images for you given image definitions from a YAML file.
6161
Please see [its documentation](https://docs.scs.community/docs/iaas/components/image-manager/) for details.
62+
63+
## Automated tests
64+
65+
We implemented testcases reflecting the information given in the YAML file(s). Be advised that
66+
the approach with the YAML file has considerable drawbacks, and it will be abandoned in
67+
future versions of the standard in favor of a more classical approach. The testcases already
68+
anticipate this future development.
69+
70+
There are two classes of testcases:
71+
72+
- `scs-0104-source-X` with varying `X`:
73+
these ensure that certain images have the correct `image_source`;
74+
- `scs-0104-image-X` with varying `X`:
75+
these ensure that certain images can be found in the list of public images.
76+
77+
The testcases can be run using the script
78+
[`openstack_test.py`](https://github.com/SovereignCloudStack/standards/blob/main/Tests/iaas/openstack_test.py).

Standards/scs-0114-v1-volume-type-standard.md

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -124,15 +124,3 @@ It should look like the following part:
124124
## Related Documents
125125

126126
- corresponding [decision record document](https://github.com/SovereignCloudStack/standards/blob/main/Standards/scs-0111-v1-volume-type-decisions.md)
127-
128-
## Conformance Tests
129-
130-
The script `/Tests/iaas/volume-types/volume-types-check.py` connects to an OpenStack environment and tests
131-
the following:
132-
133-
- for each volume type: if its description starts with `[scs:....]`, then this prefix is a feature list
134-
(sorted, each entry at most once), and each entry is one of the possible features described here,
135-
- the recommended volume types are present (otherwise, a WARNING is produced).
136-
137-
The return code is zero precisely when the test could be performed and the conditions are satisfied.
138-
Otherwise, detailed errors and warnings are output to stderr.
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
title: "SCS Volume Types: Testing Notes"
3+
type: Supplement
4+
track: IaaS
5+
status: Draft
6+
supplements:
7+
- scs-0114-v1-volume-type-standard.md
8+
---
9+
10+
## Automated tests
11+
12+
We implemented the following testcases:
13+
14+
- `scs-0114-syntax-check` ensures that, for every volume type description,
15+
the list of aspects, if present, is formatted according to the standard.
16+
- `scs-0114-encrypted-type` ensures that a volume type featuring encryption is present.
17+
- `scs-0114-replicated-type` ensures that a volume type featuring replication is present.
18+
19+
The testcases can be run using the script
20+
[`openstack_test.py`](https://github.com/SovereignCloudStack/standards/blob/main/Tests/iaas/openstack_test.py).

0 commit comments

Comments
 (0)