Add gating definition for RHEL 9
Related: rhbz#1947473 Signed-off-by: Kaleemullah Siddiqui <ksiddiqu@redhat.com>
This commit is contained in:
parent
842e09d3f9
commit
b4e558488e
7
gating.yaml
Normal file
7
gating.yaml
Normal 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: osci.brew-build.tier0.functional}
|
||||
8
tests/sanity.sh
Normal file
8
tests/sanity.sh
Normal file
@ -0,0 +1,8 @@
|
||||
#!/bin/sh
|
||||
set -ex
|
||||
|
||||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
|
||||
|
||||
dnf install -y pyusb
|
||||
|
||||
exec ${DIR}/test_ipa_yubico_api.py
|
||||
33
tests/test_ipa_yubico_api.py
Normal file
33
tests/test_ipa_yubico_api.py
Normal file
@ -0,0 +1,33 @@
|
||||
#!/usr/libexec/platform-python
|
||||
"""Simple test for APIs used by python-yubico
|
||||
"""
|
||||
import logging
|
||||
|
||||
import usb.core
|
||||
import usb.legacy
|
||||
|
||||
logging.basicConfig(level=logging.INFO)
|
||||
log = logging.getLogger()
|
||||
|
||||
|
||||
def main():
|
||||
for d in usb.core.find(find_all=True):
|
||||
usb_device = usb.legacy.Device(d)
|
||||
# import pdb; pdb.set_trace()
|
||||
log.info(vars(usb_device))
|
||||
assert usb_device.idVendor
|
||||
assert usb_device.idProduct
|
||||
usb_conf = usb_device.configurations[0]
|
||||
log.info(vars(usb_conf))
|
||||
usb_int = usb_conf.interfaces[0][0]
|
||||
try:
|
||||
usb_handle = usb_device.open()
|
||||
assert usb_handle.controlMsg.__call__
|
||||
usb_handle.releaseInterface()
|
||||
except usb.core.USBError:
|
||||
log.info("Unable to open USB device")
|
||||
log.info("PASS")
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
10
tests/tests.yml
Normal file
10
tests/tests.yml
Normal file
@ -0,0 +1,10 @@
|
||||
---
|
||||
- hosts: localhost
|
||||
tags:
|
||||
- classic
|
||||
roles:
|
||||
- role: standard-test-scripts
|
||||
tests:
|
||||
- sanity.sh
|
||||
files:
|
||||
- test_ipa_yubico_api.py
|
||||
Loading…
Reference in New Issue
Block a user