Because of argument order to assert, in case of fail, we'll get message
like:
... obtained string = "uid=100(test) gid=101(test)\n"
... expected string = "uid=100(test) gid=101(test) groups=101(test)\n"
But obtained string should be second one, not the first one. And
expected string should be first. Here's sample output from test above:
... Output: before restart 'uid=100(test) gid=101(test)
', after restart 'uid=100(test) gid=101(test) groups=101(test)
It's confusing, because expected order of strings in assertion is
reversed. What goes before restart - should be "expected string" and
what goes after - should be "obtained string".
Signed-off-by: Vitaly Ostrosablin <vostrosablin@virtuozzo.com>
| ... | ... |
@@ -2797,7 +2797,7 @@ func (s *DockerDaemonSuite) TestExecWithUserAfterLiveRestore(c *check.C) {
|
| 2797 | 2797 |
|
| 2798 | 2798 |
out2, err := s.d.Cmd("exec", "-u", "test", "top", "id")
|
| 2799 | 2799 |
c.Assert(err, check.IsNil, check.Commentf("Output: %s", out2))
|
| 2800 |
- c.Assert(out1, check.Equals, out2, check.Commentf("Output: before restart '%s', after restart '%s'", out1, out2))
|
|
| 2800 |
+ c.Assert(out2, check.Equals, out1, check.Commentf("Output: before restart '%s', after restart '%s'", out1, out2))
|
|
| 2801 | 2801 |
|
| 2802 | 2802 |
out, err = s.d.Cmd("stop", "top")
|
| 2803 | 2803 |
c.Assert(err, check.IsNil, check.Commentf("Output: %s", out))
|