rm-gocheck: DeepEquals -> assert.DeepEqual
sed -E -i 's#\bassert\.Assert\(c, (.*), checker\.DeepEquals, (.*)#assert.DeepEqual(c, \1, \2#g' \ -- "integration-cli/docker_cli_daemon_test.go" "pkg/discovery/discovery_test.go" "pkg/discovery/file/file_test.go" "pkg/discovery/kv/kv_test.go" "pkg/discovery/memory/memory_test.go" Signed-off-by: Tibor Vass <tibor@docker.com>
This commit is contained in:
parent
6dc7f4c167
commit
dd9d28669f
5 changed files with 8 additions and 8 deletions
|
@ -1727,7 +1727,7 @@ func (s *DockerDaemonSuite) TestDaemonStartWithDefaultTLSHost(c *testing.T) {
|
|||
|
||||
assert.Assert(c, certRequestInfo, checker.NotNil)
|
||||
assert.Assert(c, certRequestInfo.AcceptableCAs, checker.HasLen, 1)
|
||||
assert.Assert(c, certRequestInfo.AcceptableCAs[0], checker.DeepEquals, rootCert.RawSubject)
|
||||
assert.DeepEqual(c, certRequestInfo.AcceptableCAs[0], rootCert.RawSubject)
|
||||
}
|
||||
|
||||
func (s *DockerDaemonSuite) TestBridgeIPIsExcludedFromAllocatorPool(c *testing.T) {
|
||||
|
|
|
@ -52,7 +52,7 @@ func (s *DiscoverySuite) TestParse(c *testing.T) {
|
|||
|
||||
func (s *DiscoverySuite) TestCreateEntries(c *testing.T) {
|
||||
entries, err := CreateEntries(nil)
|
||||
assert.Assert(c, entries, checker.DeepEquals, Entries{})
|
||||
assert.DeepEqual(c, entries, Entries{})
|
||||
assert.Assert(c, err, checker.IsNil)
|
||||
|
||||
entries, err = CreateEntries([]string{"127.0.0.1:2375", "127.0.0.2:2375", "[2001:db8:0:f101::2]:2375", ""})
|
||||
|
|
|
@ -95,7 +95,7 @@ func (s *DiscoverySuite) TestWatch(c *testing.T) {
|
|||
|
||||
// Write the file and make sure we get the expected value back.
|
||||
assert.Assert(c, ioutil.WriteFile(tmp.Name(), []byte(data), 0600), checker.IsNil)
|
||||
assert.Assert(c, <-ch, checker.DeepEquals, expected)
|
||||
assert.DeepEqual(c, <-ch, expected)
|
||||
|
||||
// Add a new entry and look it up.
|
||||
expected = append(expected, &discovery.Entry{Host: "3.3.3.3", Port: "3333"})
|
||||
|
@ -105,7 +105,7 @@ func (s *DiscoverySuite) TestWatch(c *testing.T) {
|
|||
_, err = f.WriteString("\n3.3.3.3:3333\n")
|
||||
assert.Assert(c, err, checker.IsNil)
|
||||
f.Close()
|
||||
assert.Assert(c, <-ch, checker.DeepEquals, expected)
|
||||
assert.DeepEqual(c, <-ch, expected)
|
||||
|
||||
// Stop and make sure it closes all channels.
|
||||
close(stopCh)
|
||||
|
|
|
@ -239,13 +239,13 @@ func (ds *DiscoverySuite) TestWatch(c *testing.T) {
|
|||
|
||||
// Push the entries into the store channel and make sure discovery emits.
|
||||
mockCh <- kvs
|
||||
assert.Assert(c, <-ch, checker.DeepEquals, expected)
|
||||
assert.DeepEqual(c, <-ch, expected)
|
||||
|
||||
// Add a new entry.
|
||||
expected = append(expected, &discovery.Entry{Host: "3.3.3.3", Port: "3333"})
|
||||
kvs = append(kvs, &store.KVPair{Key: path.Join("path", defaultDiscoveryPath, "3.3.3.3"), Value: []byte("3.3.3.3:3333")})
|
||||
mockCh <- kvs
|
||||
assert.Assert(c, <-ch, checker.DeepEquals, expected)
|
||||
assert.DeepEqual(c, <-ch, expected)
|
||||
|
||||
close(mockCh)
|
||||
// Give it enough time to call WatchTree.
|
||||
|
|
|
@ -31,7 +31,7 @@ func (s *discoverySuite) TestWatch(c *testing.T) {
|
|||
}
|
||||
|
||||
assert.Assert(c, d.Register("1.1.1.1:1111"), checker.IsNil)
|
||||
assert.Assert(c, <-ch, checker.DeepEquals, expected)
|
||||
assert.DeepEqual(c, <-ch, expected)
|
||||
|
||||
expected = discovery.Entries{
|
||||
&discovery.Entry{Host: "1.1.1.1", Port: "1111"},
|
||||
|
@ -39,7 +39,7 @@ func (s *discoverySuite) TestWatch(c *testing.T) {
|
|||
}
|
||||
|
||||
assert.Assert(c, d.Register("2.2.2.2:2222"), checker.IsNil)
|
||||
assert.Assert(c, <-ch, checker.DeepEquals, expected)
|
||||
assert.DeepEqual(c, <-ch, expected)
|
||||
|
||||
// Stop and make sure it closes all channels.
|
||||
close(stopCh)
|
||||
|
|
Loading…
Reference in a new issue