Skip to content

Commit

Permalink
WIP: added smoke integration test.
Browse files Browse the repository at this point in the history
  • Loading branch information
jirihnidek committed Nov 22, 2024
1 parent aef3a46 commit 3b5b1ea
Show file tree
Hide file tree
Showing 4 changed files with 43 additions and 1 deletion.
Empty file added integration-tests/__init__.py
Empty file.
3 changes: 3 additions & 0 deletions integration-tests/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
git+https://github.com/ptoscano/pytest-client-tools@main
pyyaml
sh
24 changes: 24 additions & 0 deletions integration-tests/test_consumer.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
"""
This Python module contains integration tests for rhc.
It uses pytest-client-tools Python module.More information about this
module could be found: https://github.com/ptoscano/pytest-client-tools/
"""

import contextlib
import sh


def test_busctl_get_consumer_uuid():
"""
Simple smoke test using busctl CLI tool. It tries to call simple D-Bus method.
"""
with contextlib.suppress(Exception):
sh.busctl(
"call",
"com.redhat.RHSM1",
"/com/redhat/RHSM1/Consumer",
"com.redhat.RHSM1.Consumer",
"GetUuid",
"s",
'""',
)
17 changes: 16 additions & 1 deletion systemtest/tests/integration/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,19 @@ dnf --setopt install_weak_deps=False install -y \

python3 -m venv venv
# shellcheck disable=SC1091
. venv/bin/activate
. venv/bin/activate

# Install requirements for integration tests
pip install -r integration-tests/requirements.txt

# Run all integration tests
pytest --junit-xml=./junit.xml -v integration-tests
retval=$?

# Copy artifacts of integration tests
if [ -d "$TMT_PLAN_DATA" ]; then
cp ./junit.xml "$TMT_PLAN_DATA/junit.xml"
fi

# Return exit code of integration tests
exit $retval

0 comments on commit 3b5b1ea

Please sign in to comment.