[lxc-devel] [go-lxc/v2] Fix TestRunCommandNoWait failure

stgraber on Github lxc-bot at linuxcontainers.org
Fri Nov 25 19:02:17 UTC 2016


A non-text attachment was scrubbed...
Name: not available
Type: text/x-mailbox
Size: 355 bytes
Desc: not available
URL: <http://lists.linuxcontainers.org/pipermail/lxc-devel/attachments/20161125/6b57da95/attachment.bin>
-------------- next part --------------
From f2d9e73627b6ad2cd714da6dc935aeed1b23258b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?St=C3=A9phane=20Graber?= <stgraber at ubuntu.com>
Date: Fri, 25 Nov 2016 13:57:04 -0500
Subject: [PATCH] Fix TestRunCommandNoWait failure
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Signed-off-by: Stéphane Graber <stgraber at ubuntu.com>
---
 lxc_test.go | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/lxc_test.go b/lxc_test.go
index e77724e..bb60a06 100644
--- a/lxc_test.go
+++ b/lxc_test.go
@@ -974,12 +974,13 @@ func TestRunCommandNoWait(t *testing.T) {
 		t.FailNow()
 	}
 
-	argsThree = []string{"/bin/sh", "-c", "exit 0"}
+	argsThree = []string{"/bin/sh", "-c", "exit 1"}
 	pid, err = c.RunCommandNoWait(argsThree, DefaultAttachOptions)
 	if err != nil {
 		t.Errorf(err.Error())
 		t.FailNow()
 	}
+
 	proc, err = os.FindProcess(pid)
 	if err != nil {
 		t.Errorf(err.Error())
@@ -991,6 +992,7 @@ func TestRunCommandNoWait(t *testing.T) {
 		t.Errorf(err.Error())
 		t.FailNow()
 	}
+
 	if procState.Success() {
 		t.Errorf("Expected failure")
 		t.FailNow()


More information about the lxc-devel mailing list