Feature/tests#15
Open
adam-trhon wants to merge 3 commits into
Open
Conversation
With old systemd (before 240), just after boot, the
get_systemd_status_raw function fails with the following exception:
ValueError: invalid literal for int() with base 10: '2 "star'
Calling `print(path_and_id)` before parsing prints the following:
/org/freedesktop/systemd1/unit/syslog_2eservice" 0 "
/org/freedesktop/systemd1/unit/alsa_2drestore_2eservice" 0 "
/org/freedesktop/systemd1/unit/dev_2dram0_2edevice" 0 "
/org/freedesktop/systemd1/unit/multi_2duser_2etarget" 2 "start
The last line causes the error which is fixed by this patch.
Signed-off-by: Adam Trhon <adam.trhon@tbs-biometrics.com>
9fbee9c to
5d1bcde
Compare
Setup test infrastructure, populate it with a simple test of get_systemd_version function. Signed-off-by: Adam Trhon <adam.trhon@tbs-biometrics.com>
The newly added test of get_systemd_status failed for old systemd with > assert status['systemd-resolved.service']["type"] == '' E assert '"' == '' E + " tests/test_linux.py:36: AssertionError so refactor parsing of path_and_id to fix that. Signed-off-by: Adam Trhon <adam.trhon@tbs-biometrics.com>
Contributor
Author
|
I modified the first patch to also include coverage |
Contributor
Author
|
Hello, any progress here? |
This file contains hidden or 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
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.
No description provided.