-
Notifications
You must be signed in to change notification settings - Fork 42
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
Use test:///default in tests #140
Merged
Merged
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
This was referenced Jun 13, 2024
Closed
ekohl
force-pushed
the
use-test-connection
branch
from
June 24, 2024 14:53
08bfa96
to
5ee7846
Compare
Even EL7(.9) includes libvirt 4.5.0 and this greatly simplifies the code.
Previously leases could be nil in which case the code would crash. By using the safe operator the code can be shorter. It also replaces sort_by.last with max_by.
The mac is defined as the mac address on the first nic. This removes the double action of taking the first and then finding it again.
This is primarily useful for tests where I need a specific mac address to match mocks.
Rather than assuming the key is present, this gracefully handles it being absent.
ekohl
force-pushed
the
use-test-connection
branch
from
July 15, 2024 15:12
5ee7846
to
24b27e4
Compare
Rather than mocking, this uses the test connection to use real libvirt objects. This brings compatibility with 0.8.3. It only keeps mocking for dhcp_leases which isn't implemented in the test connection. The UUIDs are modified to match.
ekohl
force-pushed
the
use-test-connection
branch
from
July 15, 2024 15:14
24b27e4
to
923ad45
Compare
@ekohl is there by a chance any ETA getting this out of the doors? |
I was hoping we'd finish the UEFI and secureboot things, but I can release what's already out there. Probably won't be this week though. |
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.
Rather than mocking, this uses the test connection to use real libvirt objects.
It only keeps mocking for dhcp_leases which isn't implemented in the test connection. The UUIDs are modified to match.
This was suggested by the ruby-libvirt maintainers in https://gitlab.com/libvirt/libvirt-ruby/-/merge_requests/35#note_1948893893. Right now it still contains various unrelated patches, though some are certainly needed. I'd qualify some of them as features, others bug fixes and some general cleanups.