Browse code

fix remaining issues with checker.Not

Signed-off-by: Tibor Vass <tibor@docker.com>
(cherry picked from commit 40f1950e8ea84a8518c7378d0e8cbe9142e3b0cf)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>

Tibor Vass authored on 2019/08/17 08:36:18
Showing 3 changed files
... ...
@@ -38,8 +38,7 @@ func pruneNetworkAndVerify(c *testing.T, d *daemon.Daemon, kept, pruned []string
38 38
 			out, err := d.Cmd("network", "ls", "--format", "{{.Name}}")
39 39
 			assert.NilError(c, err)
40 40
 			return out, ""
41
-		}, checker.Not(checker.Contains(s))()), poll.WithTimeout(defaultReconciliationTimeout))
42
-
41
+		}, checker.Not(checker.Contains(s))), poll.WithTimeout(defaultReconciliationTimeout))
43 42
 	}
44 43
 }
45 44
 
... ...
@@ -389,7 +389,7 @@ func (s *DockerSwarmSuite) TestSwarmContainerAttachByNetworkId(c *testing.T) {
389 389
 		return out, ""
390 390
 	}
391 391
 
392
-	poll.WaitOn(c, pollCheck(c, checkNetwork, checker.Not(checker.Contains("testnet"))()), poll.WithTimeout(3*time.Second))
392
+	poll.WaitOn(c, pollCheck(c, checkNetwork, checker.Not(checker.Contains("testnet"))), poll.WithTimeout(3*time.Second))
393 393
 }
394 394
 
395 395
 func (s *DockerSwarmSuite) TestOverlayAttachable(c *testing.T) {
... ...
@@ -3,7 +3,6 @@ package discovery // import "github.com/docker/docker/pkg/discovery"
3 3
 import (
4 4
 	"testing"
5 5
 
6
-	"github.com/docker/docker/integration-cli/checker"
7 6
 	"gotest.tools/assert"
8 7
 )
9 8
 
... ...
@@ -86,20 +85,20 @@ func (s *DiscoverySuite) TestEntriesEquality(c *testing.T) {
86 86
 	assert.Assert(c, entries.Equals(Entries{
87 87
 		&Entry{Host: "127.0.0.1", Port: "2375"},
88 88
 		&Entry{Host: "127.0.0.2", Port: "2375"},
89
-	}), checker.Equals, true)
89
+	}))
90 90
 
91 91
 	// Different size
92
-	assert.Assert(c, entries.Equals(Entries{
92
+	assert.Assert(c, !entries.Equals(Entries{
93 93
 		&Entry{Host: "127.0.0.1", Port: "2375"},
94 94
 		&Entry{Host: "127.0.0.2", Port: "2375"},
95 95
 		&Entry{Host: "127.0.0.3", Port: "2375"},
96
-	}), checker.Equals, false)
96
+	}))
97 97
 
98 98
 	// Different content
99
-	assert.Assert(c, entries.Equals(Entries{
99
+	assert.Assert(c, !entries.Equals(Entries{
100 100
 		&Entry{Host: "127.0.0.1", Port: "2375"},
101 101
 		&Entry{Host: "127.0.0.42", Port: "2375"},
102
-	}), checker.Equals, false)
102
+	}))
103 103
 
104 104
 }
105 105