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>
(cherry picked from commit dd9d28669f)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
Tibor Vass 2019-09-09 21:05:57 +00:00 committed by Sebastiaan van Stijn
parent 6dc7846d26
commit 17e04aa6c2
No known key found for this signature in database
GPG key ID: 76698F39D527CE8C
5 changed files with 8 additions and 8 deletions

View file

@ -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) {

View file

@ -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", ""})

View file

@ -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)

View file

@ -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.

View file

@ -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)