This repository has been archived by the owner on Jan 30, 2020. It is now read-only.
functional: fix error from message change from systemctl status #1700
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.
Since systemd v231,
TestNodeShutdown
fails with the following message.It's because of behavioral change of
"systemctl status"
. Until systemd v230,"systemctl status hello.service"
has printedto stdout, when hello.service is not active. So the functional test
TestNodeShutdown
has expected a string"Active: inactive"
in the message from stdout.Since systemd v231, however, the output string has become
And it's printed to stderr, instead of stdout.
As
MemberCommand()
doesn't return stderr at all, we need to make it return stderr too. Changing prototype ofMemberCommand()
however requires a lot of changes all over functional tests. So let's add another helperMemberCommandStderr()
, a distinct helper that returns both stdout and stderr. Then we can change onlyTestNodeShutdown()
without touching other tests.
In the long run, we need to change
MemberCommand()
directly, removingMemberCommandStderr()
.Fixes #1699