Added gating.yaml and test for python-yubico
Signed-off-by: Sudhir Menon <sumenon@redhat.com>
This commit is contained in:
parent
350da02d79
commit
85bdbbecac
7
gating.yaml
Normal file
7
gating.yaml
Normal file
@ -0,0 +1,7 @@
|
||||
# recipients: abokovoy, frenaud, kaleem, ftrivino, cheimes
|
||||
--- !Policy
|
||||
product_versions:
|
||||
- rhel-10
|
||||
decision_context: osci_compose_gate
|
||||
rules:
|
||||
- !PassingTestCaseRule {test_case_name: osci.brew-build.tier0.functional}
|
||||
28
tests/test_ipa_yubikey.py
Normal file
28
tests/test_ipa_yubikey.py
Normal file
@ -0,0 +1,28 @@
|
||||
#!/usr/bin/python3
|
||||
"""Simple test for APIs used by IPA's otptoken plugin
|
||||
"""
|
||||
import logging
|
||||
|
||||
import yubico
|
||||
import usb.core
|
||||
|
||||
logging.basicConfig(level=logging.INFO)
|
||||
log = logging.getLogger()
|
||||
|
||||
|
||||
def main():
|
||||
try:
|
||||
yk = yubico.find_yubikey()
|
||||
except usb.core.USBError as e:
|
||||
log.info(e)
|
||||
except yubico.yubikey.YubiKeyError as e:
|
||||
log.info(e)
|
||||
else:
|
||||
assert yk.version_num()
|
||||
log.info(yk.status())
|
||||
log.info(yk.status().valid_configs())
|
||||
log.info("PASS")
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
14
tests/tests.yml
Normal file
14
tests/tests.yml
Normal file
@ -0,0 +1,14 @@
|
||||
---
|
||||
- hosts: localhost
|
||||
tags:
|
||||
- classic
|
||||
roles:
|
||||
- role: standard-test-source
|
||||
- role: standard-test-basic
|
||||
required_packages:
|
||||
- python3-yubico
|
||||
tests:
|
||||
- test_ipa_yubikey:
|
||||
dir: "tests"
|
||||
run: ./test_ipa_yubikey.py
|
||||
|
||||
Loading…
Reference in New Issue
Block a user