This repository was archived by the owner on Jan 30, 2020. It is now read-only.
functional: fix error from message change from systemctl status#1700
Merged
dongsupark merged 1 commit intocoreos:masterfrom Nov 2, 2016
Merged
functional: fix error from message change from systemctl status#1700dongsupark merged 1 commit intocoreos:masterfrom
dongsupark merged 1 commit intocoreos:masterfrom
Conversation
d8811b6 to
31d2751
Compare
Author
|
Ok, functional tests work fine now. |
Since systemd v231, TestNodeShutdown fails with the following message.
====
--- FAIL: TestNodeShutdown (fleet.conf=[enable_grpc=false]) (8.98s)
node_test.go:83: Unit hello.service not reported as inactive:
====
It's because of behavioral change of "systemctl status". Until systemd
v230, "systemctl status hello.service" has printed "Loaded: not-found
(Reason: No such file or directory)\nActive: inactive (dead)" to 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 "Unit NAME
could not be found", where NAME is the unit name. 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 of MemberCommand() however
requires a lot of changes all over functional tests. So let's add
another helper MemberCommandStderr(), a distinct helper that returns
both stdout and stderr. Then we can change only TestNodeShutdown()
without touching other tests. In the long run, we need to change
MemberCommand() directly, removing MemberCommandStderr().
Fixes coreos#1699
31d2751 to
7a16cab
Compare
Author
|
Yep, the gnutls handshake error was just intermittent. Now it's working fine. |
dongsupark
pushed a commit
that referenced
this pull request
Nov 2, 2016
functional: fix error from message change from systemctl status
dongsupark
pushed a commit
to endocode/fleet
that referenced
this pull request
Nov 9, 2016
Remove Cluster.MemberCommand(), rename MemberCommandStderr() to MemberCommand(), and update every call site accordingly. That way we can clean up leftovers from coreos#1700.
dongsupark
pushed a commit
to endocode/fleet
that referenced
this pull request
Nov 9, 2016
Remove Cluster.MemberCommand(), rename MemberCommandStderr() to MemberCommand(), and update every call site accordingly. That way we can clean up leftovers from coreos#1700.
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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,
TestNodeShutdownfails 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
TestNodeShutdownhas 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