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

Test the become key under virtual provision #2659

Merged
merged 1 commit into from
Feb 20, 2024

Conversation

carlosrodfern
Copy link
Contributor

Increase test coverage for virtual for the become feature

Pull Request Checklist

  • extend the test coverage

@lukaszachy
Copy link
Collaborator

@carlosrodfern Could you please read about the new way of provision testing implemented by #2558 and fix the test accordingly, please?
It's rendered as https://tmt.readthedocs.io/en/latest/contribute.html#provision-methods

@carlosrodfern
Copy link
Contributor Author

@carlosrodfern Could you please read about the new way of provision testing implemented by #2558 and fix the test accordingly, please? It's rendered as https://tmt.readthedocs.io/en/latest/contribute.html#provision-methods

@lukaszachy , for what I understand from the docs, what I was missing was adding the corresponding provision tag. I pushed a fixed commit with the tag. Let me know if there is something else that I missed. Thank you!

@carlosrodfern
Copy link
Contributor Author

@carlosrodfern Could you please read about the new way of provision testing implemented by #2558 and fix the test accordingly, please? It's rendered as https://tmt.readthedocs.io/en/latest/contribute.html#provision-methods

@lukaszachy , for what I understand from the docs, what I was missing was adding the corresponding provision tag. I pushed a fixed commit with the tag. Let me know if there is something else that I missed. Thank you!

It looks like I may not need PROVISION_METHODS anymore with that tag, since the tests themselves don't test more than one provision method in the same script.

@lukaszachy
Copy link
Collaborator

@carlosrodfern Sorry, I should be more verbose. You are right. Main point is the tag (and the fact that one can ask CI to run it as well by /packit test --identifier full)

There are few more PR in play, and once they are done the 'PROVISION_METHODS' variable will be obsoleted by 'PROVISION_HOW'. But that is story of the future.

@carlosrodfern
Copy link
Contributor Author

@carlosrodfern Sorry, I should be more verbose. You are right. Main point is the tag (and the fact that one can ask CI to run it as well by /packit test --identifier full)

There are few more PR in play, and once they are done the 'PROVISION_METHODS' variable will be obsoleted by 'PROVISION_HOW'. But that is story of the future.

Am I correct with this as well? I ended up removing PROVISION_METHODS:

It looks like I may not need PROVISION_METHODS anymore with that tag, since the tests themselves don't test more than one provision method in the same script.

@lukaszachy lukaszachy added this to the 1.32 milestone Feb 6, 2024
@lukaszachy lukaszachy added the test coverage Improvements or additions to test coverage of tmt itself label Feb 6, 2024
@lukaszachy
Copy link
Collaborator

/packit test

@lukaszachy
Copy link
Collaborator

/packit test -i full

@lukaszachy
Copy link
Collaborator

/packit test -i provision

@lukaszachy lukaszachy self-assigned this Feb 6, 2024
@lukaszachy
Copy link
Collaborator

/packit test -i provision

@lukaszachy
Copy link
Collaborator

/packit test

@lukaszachy
Copy link
Collaborator

lukaszachy commented Feb 8, 2024

/tests/provision/become/virtual fails with

libvirt: XML-RPC error : Failed to connect socket to '/var/run/libvirt/virtqemud-sock': No such file or directory
        fail: Failed to boot testcloud instance (Failed to connect socket to '/var/run/libvirt/virtqemud-sock': No such file or directory).
    finish

Do we have old testcloud on VM? AFAIK it should be now required by testcloud-0.9.10-2

EDIT: Hm, such testcloud and even libvirt-daemon are installed (https://artifacts.dev.testing-farm.io/d7bc3591-a9e9-421a-a4ba-504d104ddb35/guest-setup-648e75e1-3b1b-4975-ab28-29f7a8af73ef/artifact-installation-648e75e1-3b1b-4975-ab28-29f7a8af73ef/4-Install-packages.txt)

@frantisekz
Copy link
Collaborator

/tests/provision/become/virtual fails with

libvirt: XML-RPC error : Failed to connect socket to '/var/run/libvirt/virtqemud-sock': No such file or directory
        fail: Failed to boot testcloud instance (Failed to connect socket to '/var/run/libvirt/virtqemud-sock': No such file or directory).
    finish

Do we have old testcloud on VM? AFAIK it should be now required by testcloud-0.9.10-2

EDIT: Hm, such testcloud and even libvirt-daemon are installed (https://artifacts.dev.testing-farm.io/d7bc3591-a9e9-421a-a4ba-504d104ddb35/guest-setup-648e75e1-3b1b-4975-ab28-29f7a8af73ef/artifact-installation-648e75e1-3b1b-4975-ab28-29f7a8af73ef/4-Install-packages.txt)

Is libvirtd service up on the hosts? That should be enough to fix this.

@lukaszachy
Copy link
Collaborator

Is libvirtd service up on the hosts? That should be enough to fix this.

Who should be responsible for that? I'd say /plans/provision/virtual as we can't really expect each test to correctly setup testcloud, do can we?

@carlosrodfern
Copy link
Contributor Author

carlosrodfern commented Feb 13, 2024

Is libvirtd service up on the hosts? That should be enough to fix this.

Who should be responsible for that? I'd say /plans/provision/virtual as we can't really expect each test to correctly setup testcloud, do can we?

I pushed a commit with the rlServiceStart ensuring libvirtd is running. I found some tests doing something similar. It is in a separate commit so if a different approach is preferred I can remove it. We can at least see if that is enough of a fix to get it to work.

@psss
Copy link
Collaborator

psss commented Feb 14, 2024

Hm, this is strange. The plan should already take care of the libvirtd start:

- name: start-libvirtd
script: |
sudo systemctl start libvirtd
sudo systemctl status libvirtd

Let's rebase and try again if it was not some random hiccup.

@psss psss force-pushed the increase-become-test-coverage branch from 5e26e89 to 7711f2e Compare February 14, 2024 15:12
@psss psss added the ci | full test Pull request is ready for the full test execution label Feb 14, 2024
@psss
Copy link
Collaborator

psss commented Feb 14, 2024

/packit test

tests/provision/become/container/test.sh Outdated Show resolved Hide resolved
@psss
Copy link
Collaborator

psss commented Feb 14, 2024

/packit test

Copy link
Collaborator

@psss psss left a comment

Choose a reason for hiding this comment

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

Thanks for the simplification, now looks much better! Proposing just a couple of minor indentation adjustments in 87a16bb.

@psss psss force-pushed the increase-become-test-coverage branch from 87a16bb to 64964e3 Compare February 19, 2024 13:20
@psss
Copy link
Collaborator

psss commented Feb 19, 2024

/packit test

@psss psss changed the title Test become in virtual provision Test the become key under virtual provision Feb 19, 2024
Signed-off-by: Carlos Rodriguez-Fernandez <[email protected]>
@psss psss force-pushed the increase-become-test-coverage branch from 64964e3 to 64266b4 Compare February 20, 2024 06:29
@psss
Copy link
Collaborator

psss commented Feb 20, 2024

/packit test

@psss psss merged commit 64266b4 into teemtee:main Feb 20, 2024
22 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci | full test Pull request is ready for the full test execution test coverage Improvements or additions to test coverage of tmt itself
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants