mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Merge pull request #36455 from thaJeztah/flip-asserts
Fix "expected" and "actual" being reversed
This commit is contained in:
commit
7459e4cd4f
1 changed files with 4 additions and 4 deletions
|
@ -36,7 +36,7 @@ func TestNetworkNat(t *testing.T) {
|
|||
|
||||
data, err := ioutil.ReadAll(conn)
|
||||
require.NoError(t, err)
|
||||
assert.Equal(t, strings.TrimSpace(string(data)), msg)
|
||||
assert.Equal(t, msg, strings.TrimSpace(string(data)))
|
||||
}
|
||||
|
||||
func TestNetworkLocalhostTCPNat(t *testing.T) {
|
||||
|
@ -53,7 +53,7 @@ func TestNetworkLocalhostTCPNat(t *testing.T) {
|
|||
|
||||
data, err := ioutil.ReadAll(conn)
|
||||
require.NoError(t, err)
|
||||
assert.Equal(t, strings.TrimSpace(string(data)), msg)
|
||||
assert.Equal(t, msg, strings.TrimSpace(string(data)))
|
||||
}
|
||||
|
||||
func TestNetworkLoopbackNat(t *testing.T) {
|
||||
|
@ -81,7 +81,7 @@ func TestNetworkLoopbackNat(t *testing.T) {
|
|||
_, err = io.Copy(&b, body)
|
||||
require.NoError(t, err)
|
||||
|
||||
assert.Equal(t, strings.TrimSpace(b.String()), msg)
|
||||
assert.Equal(t, msg, strings.TrimSpace(b.String()))
|
||||
}
|
||||
|
||||
func startServerContainer(t *testing.T, msg string, port int) string {
|
||||
|
@ -109,7 +109,7 @@ func getExternalAddress(t *testing.T) net.IP {
|
|||
|
||||
ifaceAddrs, err := iface.Addrs()
|
||||
require.NoError(t, err)
|
||||
assert.NotEqual(t, len(ifaceAddrs), 0)
|
||||
assert.NotEqual(t, 0, len(ifaceAddrs))
|
||||
|
||||
ifaceIP, _, err := net.ParseCIDR(ifaceAddrs[0].String())
|
||||
require.NoError(t, err)
|
||||
|
|
Loading…
Reference in a new issue