-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add pytest-based integration test framework #25
Merged
bernhardkaindl
merged 1 commit into
xenserver:master
from
xenserver-next:private/bernhardk/pytest-integration-testframework
Nov 23, 2023
Merged
Add pytest-based integration test framework #25
bernhardkaindl
merged 1 commit into
xenserver:master
from
xenserver-next:private/bernhardk/pytest-integration-testframework
Nov 23, 2023
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
bernhardkaindl
requested review from
GeraldEV,
BengangY,
ashwin9390 and
DeliZhangX
November 22, 2023 12:41
bernhardkaindl
force-pushed
the
private/bernhardk/pytest-integration-testframework
branch
from
November 22, 2023 14:08
7f8c997
to
7de527d
Compare
ashwin9390
reviewed
Nov 22, 2023
ashwin9390
previously approved these changes
Nov 22, 2023
bernhardkaindl
force-pushed
the
private/bernhardk/pytest-integration-testframework
branch
from
November 22, 2023 16:05
7de527d
to
ec1779b
Compare
bernhardkaindl
force-pushed
the
private/bernhardk/pytest-integration-testframework
branch
3 times, most recently
from
November 22, 2023 17:22
a16fcdb
to
a83a126
Compare
Signed-off-by: Bernhard Kaindl <[email protected]>
bernhardkaindl
force-pushed
the
private/bernhardk/pytest-integration-testframework
branch
4 times, most recently
from
November 23, 2023 01:06
c6c0c1c
to
14e98a1
Compare
ashwin9390
previously approved these changes
Nov 23, 2023
GeraldEV
previously approved these changes
Nov 23, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approved with two minor comments
bernhardkaindl
dismissed stale reviews from GeraldEV and ashwin9390
via
November 23, 2023 13:07
300b2cf
bernhardkaindl
force-pushed
the
private/bernhardk/pytest-integration-testframework
branch
from
November 23, 2023 13:07
14e98a1
to
300b2cf
Compare
ashwin9390
approved these changes
Nov 23, 2023
GeraldEV
approved these changes
Nov 23, 2023
bernhardkaindl
deleted the
private/bernhardk/pytest-integration-testframework
branch
January 8, 2024 18:53
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Add a
pytest
-based integration test framework, addressing the weaknesses of the initial prototype tests based on shell scripts:act
(using a localdocker
orpodman
as backend container runtime) to run. Such container runtime is not installed on some servers, so it was not easy to check them.To fix these weaknesses of my early prototype tests, I implemented
pytest
fixtures which automatically runxen-bugtool
in a test container (using Linux namespaces, so it works on any Linux system that would otherwise be capable to rundocker
,podman
, etc), but not requiring any configuration, group or root privileges to install and use.Add:
pytest
fixturesREADME-pytest.md
xen-bugtool -y --entries=xenserver-logs
(including the/etc/systemd.tar
archive) that we just merged recently.An example, why the
pytest
framework instead of shell scripts is beneficial are for example these undetected test errors in this #22 which is currently in review:https://github.com/xenserver/status-report/actions/runs/6938095957/job/18873299352?pr=22
With the test implemented in Python, possibilities for silent test errors will be less difficult to spot!
And, with it, we can replace the use of
grep
with content matching in Python, also usingre
, when needed.See the
README-pytest.md
for further information.