Make sure we compare strings with the same capitalization

Signed-off-by: Alvaro Saurin <alvaro.saurin@gmail.com>
(cherry picked from commit ded347e744)
This commit is contained in:
Alvaro Saurin 2016-06-21 10:35:50 +02:00 committed by Tibor Vass
parent 71dbab2235
commit 3e6c39e2ee

View file

@ -751,7 +751,7 @@ func (s *DockerSuite) TestRunUserByIDBig(c *check.C) {
if err == nil {
c.Fatal("No error, but must be.", out)
}
if !strings.Contains(out, libcontainerUser.ErrRange.Error()) {
if !strings.Contains(strings.ToUpper(out), strings.ToUpper(libcontainerUser.ErrRange.Error())) {
c.Fatalf("expected error about uids range, got %s", out)
}
}
@ -764,7 +764,7 @@ func (s *DockerSuite) TestRunUserByIDNegative(c *check.C) {
if err == nil {
c.Fatal("No error, but must be.", out)
}
if !strings.Contains(out, libcontainerUser.ErrRange.Error()) {
if !strings.Contains(strings.ToUpper(out), strings.ToUpper(libcontainerUser.ErrRange.Error())) {
c.Fatalf("expected error about uids range, got %s", out)
}
}