fixed error check using the wrong error value

errorOut was using the err from the previous test.

Signed-off-by: Frank Rosquin <frank.rosquin@gmail.com>
Upstream-commit: 82c536aacd30baf110c074de1f83ae3ab2f9588c
Component: engine
This commit is contained in:
Frank Rosquin
2014-08-31 15:40:23 +02:00
committed by Frank Rosquin
parent 7ffe4a077d
commit 3a37023687

View File

@ -20,7 +20,7 @@ func TestTopNonPrivileged(t *testing.T) {
topCmd = exec.Command(dockerBinary, "top", cleanedContainerID)
out2, _, err2 := runCommandWithOutput(topCmd)
errorOut(err, t, fmt.Sprintf("failed to run top: %v %v", out2, err2))
errorOut(err2, t, fmt.Sprintf("failed to run top: %v %v", out2, err2))
killCmd := exec.Command(dockerBinary, "kill", cleanedContainerID)
_, err = runCommand(killCmd)