Skip to content

Commit 0a822e8

Browse files
committed
change channel back to error when testcase is not passed
Signed-off-by: Matthias Büchse <[email protected]>
1 parent 5e7617a commit 0a822e8

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

Tests/iaas/scs_0100_flavor_naming/flavor_names_check.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ def compute_scs_0100_semantics_check(scs_flavors: list) -> bool:
4949
continue # this case is handled by syntax check
5050
cpuram = flavorname.cpuram
5151
if flv.vcpus < cpuram.cpus:
52-
logger.info(f"Flavor {flv.name} CPU overpromise: {flv.vcpus} < {cpuram.cpus}")
52+
logger.error(f"Flavor {flv.name} CPU overpromise: {flv.vcpus} < {cpuram.cpus}")
5353
problems.add(flv.name)
5454
elif flv.vcpus > cpuram.cpus:
5555
logger.info(f"Flavor {flv.name} CPU underpromise: {flv.vcpus} > {cpuram.cpus}")
@@ -59,7 +59,7 @@ def compute_scs_0100_semantics_check(scs_flavors: list) -> bool:
5959
if flvram >= 10 and flvram != int(flvram) or flvram * 2 != int(flvram * 2):
6060
logger.info(f"Flavor {flv.name} uses discouraged uneven size of memory {flvram:.1f} GiB")
6161
if flvram < cpuram.ram:
62-
logger.info(f"Flavor {flv.name} RAM overpromise {flvram:.1f} < {cpuram.ram:.1f}")
62+
logger.error(f"Flavor {flv.name} RAM overpromise {flvram:.1f} < {cpuram.ram:.1f}")
6363
problems.add(flv.name)
6464
elif flvram > cpuram.ram:
6565
logger.info(f"Flavor {flv.name} RAM underpromise {flvram:.1f} > {cpuram.ram:.1f}")
@@ -69,7 +69,7 @@ def compute_scs_0100_semantics_check(scs_flavors: list) -> bool:
6969
if disksize not in ACC_DISK:
7070
logger.info(f"Flavor {flv.name} non-standard disk size {disksize}, should have (5, 10, 20, 50, 100, 200, ...)")
7171
if flv.disk < disksize:
72-
logger.info(f"Flavor {flv.name} disk overpromise {flv.disk} < {disksize}")
72+
logger.error(f"Flavor {flv.name} disk overpromise {flv.disk} < {disksize}")
7373
problems.add(flv.name)
7474
elif flv.disk > disksize:
7575
logger.info(f"Flavor {flv.name} disk underpromise {flv.disk} > {disksize}")

Tests/iaas/scs_0101_entropy/entropy_check.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ def compute_scs_0101_image_property(images, attributes=IMAGE_ATTRIBUTES):
6666
# drop those candidates that are fine
6767
offenders = [candidate for candidate in candidates if candidate[1]]
6868
for name, wrong in offenders:
69-
logger.info(f"Image '{name}' missing recommended attributes: {', '.join(wrong)}")
69+
logger.error(f"Image '{name}' missing recommended attributes: {', '.join(wrong)}")
7070
return not offenders
7171

7272

@@ -84,15 +84,15 @@ def compute_scs_0101_flavor_property(flavors, attributes=FLAVOR_ATTRIBUTES, opti
8484
# and if the recommended attributes are present, we assume that implementers have done their job already
8585
if miss_opt:
8686
message += f"; additionally, missing optional attributes: {', '.join(miss_opt)}"
87-
logger.info(message)
87+
logger.error(message)
8888
return not offenses
8989

9090

9191
def compute_scs_0101_entropy_avail(collected_vm_output, image_name):
9292
lines = collected_vm_output['entropy-avail']
9393
entropy_avail = lines[0].strip()
9494
if entropy_avail != "256":
95-
logger.info(
95+
logger.error(
9696
f"VM '{image_name}' didn't have a fixed amount of entropy available. "
9797
f"Expected 256, got {entropy_avail}."
9898
)
@@ -103,7 +103,7 @@ def compute_scs_0101_entropy_avail(collected_vm_output, image_name):
103103
def compute_scs_0101_rngd(collected_vm_output, image_name):
104104
lines = collected_vm_output['rngd']
105105
if "could not be found" in '\n'.join(lines):
106-
logger.info(f"VM '{image_name}' doesn't provide the recommended service rngd")
106+
logger.error(f"VM '{image_name}' doesn't provide the recommended service rngd")
107107
return False
108108
return True
109109

@@ -123,12 +123,12 @@ def compute_scs_0101_fips_test(collected_vm_output, image_name):
123123
)
124124
if int(fips_failures) <= 5:
125125
return True # lenient test passed
126-
logger.info(
126+
logger.error(
127127
f"VM '{image_name}' didn't pass the FIPS 140-2 testing. "
128128
f"Expected a maximum of 5 failures, got {fips_failures}."
129129
)
130130
else:
131-
logger.info(f"VM '{image_name}': failed to determine fips failures")
131+
logger.error(f"VM '{image_name}': failed to determine fips failures")
132132
logger.debug(f"stderr following:\n{fips_data}")
133133
except BaseException:
134134
logger.critical(f"Couldn't check VM '{image_name}' requirements", exc_info=True)
@@ -142,7 +142,7 @@ def compute_scs_0101_virtio_rng(collected_vm_output, image_name):
142142
# `cat` can fail with return code 1 if special file does not exist
143143
hw_device = lines[0]
144144
if not hw_device.strip() or "No such device" in lines[1]:
145-
logger.info(f"VM '{image_name}' doesn't provide a hardware device.")
145+
logger.error(f"VM '{image_name}' doesn't provide a hardware device.")
146146
return False
147147
return True
148148
except BaseException:

0 commit comments

Comments
 (0)