Add gating definition for RHEL 9

Related: rhbz#1947473

Signed-off-by: Kaleemullah Siddiqui <ksiddiqu@redhat.com>
This commit is contained in:
Kaleemullah Siddiqui 2021-06-08 22:15:12 +05:30
parent 4b2169cd7b
commit 3db6dfb99a
4 changed files with 55 additions and 0 deletions

7
gating.yaml Normal file
View File

@ -0,0 +1,7 @@
# recipients: abokovoy, frenaud, kaleem, ftrivino, cheimes
--- !Policy
product_versions:
- rhel-9
decision_context: osci_compose_gate
rules:
- !PassingTestCaseRule {test_case_name: baseos-ci.brew-build.tier1.functional}

8
tests/sanity.sh Normal file
View File

@ -0,0 +1,8 @@
#!/bin/sh
set -ex
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
dnf install -y python3-qrcode
exec ${DIR}/test_ipa_otptoken.py

View File

@ -0,0 +1,30 @@
#!/usr/libexec/platform-python
"""Simple test for APIs used by python3-qrcode
"""
import io
import logging
import hashlib
import qrcode
logging.basicConfig(level=logging.INFO)
log = logging.getLogger()
TEXT = "example data"
HASH = "4d0186bad6cb0ea83f634959bba9bd2494f2b15cc785285e0914521246452e06"
def main():
qr_output = io.StringIO()
qr = qrcode.QRCode()
qr.add_data(TEXT)
qr.make()
qr.print_ascii(out=qr_output, tty=False)
value = qr_output.getvalue()
print(value)
assert hashlib.sha256(value.encode('utf-8')).hexdigest() == HASH
log.info("PASS")
if __name__ == "__main__":
main()

10
tests/tests.yml Normal file
View File

@ -0,0 +1,10 @@
---
- hosts: localhost
tags:
- classic
roles:
- role: standard-test-scripts
tests:
- sanity.sh
files:
- test_ipa_otptoken.py