Skip to content
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

HMS-3162: tests: add basic integration testing #24

Merged
merged 1 commit into from
Dec 7, 2023

Conversation

mvo5
Copy link
Collaborator

@mvo5 mvo5 commented Dec 4, 2023

This commit adds basic integration testing for the project. It is pytest based and can run both locally or via tmt [0] which will spin up a clean VM and run the tests inside.

See https://github.com/osbuild/osbuild-deploy-container/compare/main...mvo5:tmt-smoke?expand=1#diff-5de36acd90308dc62abf7855a686ee7052ffb6e762c756fd735fb0c9fbd9595dR1 (tests/README.md) for a very basic description.

There are still some TODOs that need addressing (here or in followups):

I personally think that as it is it is already useful and we could merge and iterate but I'm equally happy to flesh it out more. It will already do a container build/run/validate that something got generated.

[0] https://github.com/teemtee/tmt

@mvo5 mvo5 force-pushed the tmt-smoke branch 10 times, most recently from 7754208 to d1adda3 Compare December 4, 2023 20:58
@mvo5 mvo5 marked this pull request as ready for review December 4, 2023 21:14
@mvo5 mvo5 force-pushed the tmt-smoke branch 2 times, most recently from 1cfbb79 to 2ea53d3 Compare December 5, 2023 06:57
@mvo5 mvo5 changed the title tests: add basic integration testing tests: add basic integration testing (HMS-3141) Dec 5, 2023
@mvo5 mvo5 changed the title tests: add basic integration testing (HMS-3141) tests: add basic integration testing (HMS-3162) Dec 5, 2023
@achilleas-k
Copy link
Member

I clicked the rebase button. The linter was failing because the branch was from before the repo and package rename so it was failing.

test/test_smoke.py Show resolved Hide resolved
test/test_smoke.py Outdated Show resolved Hide resolved
test/README.md Outdated Show resolved Hide resolved
test/test_smoke.py Outdated Show resolved Hide resolved
@ochosi ochosi changed the title tests: add basic integration testing (HMS-3162) HMS-3162: tests: add basic integration testing Dec 6, 2023
@ochosi
Copy link
Contributor

ochosi commented Dec 6, 2023

@mvo5 Just fyi, I changed to PR title because the Jira reference needs to be a prefix for the automation to pick it up and link it.

@mvo5
Copy link
Collaborator Author

mvo5 commented Dec 7, 2023

@mvo5 Just fyi, I changed to PR title because the Jira reference needs to be a prefix for the automation to pick it up and link it.

Thanks @ochosi ! Maybe it's just me (or me just not being used to this) but I wonder if we could change the automation to look at the end? I find it aesthetically more pleasing to keep the existing form of <subsystem>: what changed and just make that <subsystem>: what changed (JIRA-xxxx). Similar patterns are used e.g. in debian changelogs when bugs are closed (there its technically free form but the convention is that it's at the end). No super strong opinion though just an wondering because now it's early enough to tweak what we do :)

This commit adds basic integration testing for the project. It
is pytest based and can run both locally or via `tmt` [0] which
will spin up a clean VM and run the tests inside.

[0] https://github.com/teemtee/tmt
@ochosi
Copy link
Contributor

ochosi commented Dec 7, 2023

@mvo5 Just fyi, I changed to PR title because the Jira reference needs to be a prefix for the automation to pick it up and link it.

Thanks @ochosi ! Maybe it's just me (or me just not being used to this) but I wonder if we could change the automation to look at the end? I find it aesthetically more pleasing to keep the existing form of <subsystem>: what changed and just make that <subsystem>: what changed (JIRA-xxxx). Similar patterns are used e.g. in debian changelogs when bugs are closed (there its technically free form but the convention is that it's at the end). No super strong opinion though just an wondering because now it's early enough to tweak what we do :)

I wholeheartedly agree, but it seems this is hardcoded in Jira's DVCS plugin, so there's little we can do about it.

Copy link
Member

@ondrejbudai ondrejbudai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Amazing, thanks!

@ondrejbudai ondrejbudai enabled auto-merge December 7, 2023 11:45
@ondrejbudai ondrejbudai added this pull request to the merge queue Dec 7, 2023
Merged via the queue into osbuild:main with commit 93f1f70 Dec 7, 2023
5 of 6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants