Add gating.yml and gating tests.
Signed-off-by: Rafael Guterres Jeffman <rjeffman@redhat.com>
This commit is contained in:
parent
cf06f3462c
commit
77a1ebe17e
7
gating.yaml
Normal file
7
gating.yaml
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
# recipients: abokovoy, frenaud, kaleem, ftrivino, rjeffman
|
||||||
|
--- !Policy
|
||||||
|
product_versions:
|
||||||
|
- rhel-10
|
||||||
|
decision_context: osci_compose_gate
|
||||||
|
rules:
|
||||||
|
- !PassingTestCaseRule {test_case_name: osci.brew-build.tier0.functional}
|
14
tests/test_ifaddr.py
Normal file
14
tests/test_ifaddr.py
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
import pytest
|
||||||
|
|
||||||
|
import ifaddr
|
||||||
|
|
||||||
|
|
||||||
|
def test_get_adapters():
|
||||||
|
"""Test 'get_adapters' against 'lo' interface."""
|
||||||
|
lo_ips = [
|
||||||
|
n.ip if not isinstance(n.ip, tuple) else n.ip[0]
|
||||||
|
for a in ifaddr.get_adapters() if a.name == "lo"
|
||||||
|
for n in a.ips
|
||||||
|
]
|
||||||
|
assert "127.0.0.1" in lo_ips
|
||||||
|
assert "::1" in lo_ips
|
13
tests/tests.yml
Normal file
13
tests/tests.yml
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
---
|
||||||
|
- hosts: localhost
|
||||||
|
tags:
|
||||||
|
- classic
|
||||||
|
roles:
|
||||||
|
- role: standard-test-basic
|
||||||
|
required_packages:
|
||||||
|
- python-ifaddr
|
||||||
|
- python3-pytest
|
||||||
|
tests:
|
||||||
|
- unittests:
|
||||||
|
dir: "."
|
||||||
|
run: pytest-3 test_ifaddr.py
|
Loading…
Reference in New Issue
Block a user