-
Notifications
You must be signed in to change notification settings - Fork 41
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
Optimize list-units and list-unit-files tests #929
Merged
mwperina
merged 5 commits into
eclipse-bluechi:main
from
mwperina:list-units-code-duplication
Aug 29, 2024
Merged
Optimize list-units and list-unit-files tests #929
mwperina
merged 5 commits into
eclipse-bluechi:main
from
mwperina:list-units-code-duplication
Aug 29, 2024
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
Member
mwperina
commented
Aug 23, 2024
•
edited
Loading
edited
- Eliminate special characters from systemctl list-units
- Minimize code duplication around list-units tests
- Improve verification of bluechictl list-units
- Minimize code duplication around list-unit-files tests
- Remove duplicate debug log information
Moving back to draft, further optimizations including list-unit-files is possible |
23439d0
to
3344434
Compare
3344434
to
80e5a86
Compare
ee4e15f
to
690f7eb
Compare
systemctl list-units uses special characters in front of unit name to emphasize state of the unit. But such special characters make parsing of the output more complicated, so let's remove such characters using --plain parameter. Signed-off-by: Martin Perina <[email protected]>
690f7eb
to
81dedcb
Compare
engelmi
reviewed
Aug 29, 2024
engelmi
reviewed
Aug 29, 2024
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.
Small NIT, otherwise LGTM
Signed-off-by: Martin Perina <[email protected]>
Up-until-now we have only verified, that bluechictl list-units output contains all units, which are reported by systemctl list-units. But we had a bug, because bluechictl list-units reported more units than systemctl, which is caused by different behavior between ListUnits D-Bus API, which by default reports all units (and this option cannot be changed), and systemctl list-units reported only loaded units. So --all parameter was added to systemctl list-units and verification was improved to have really a match between systemctl and bluechictl list-units results. Signed-off-by: Martin Perina <[email protected]>
Signed-off-by: Martin Perina <[email protected]>
Remove logging of the output from BluechiCtl._run(), because the output is already logged in ContainerClient.exec_run() or SSHClient.exec_run() Signed-off-by: Martin Perina <[email protected]>
81dedcb
to
0a5fb84
Compare
engelmi
approved these changes
Aug 29, 2024
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.
LGTM
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.