mirror of
https://github.com/moby/moby.git
synced 2025-07-29 07:21:35 +03:00
fix remaining issues with checker.Not
Signed-off-by: Tibor Vass <tibor@docker.com>
This commit is contained in:
@ -38,8 +38,7 @@ func pruneNetworkAndVerify(c *testing.T, d *daemon.Daemon, kept, pruned []string
|
|||||||
out, err := d.Cmd("network", "ls", "--format", "{{.Name}}")
|
out, err := d.Cmd("network", "ls", "--format", "{{.Name}}")
|
||||||
assert.NilError(c, err)
|
assert.NilError(c, err)
|
||||||
return out, ""
|
return out, ""
|
||||||
}, checker.Not(checker.Contains(s))()), poll.WithTimeout(defaultReconciliationTimeout))
|
}, checker.Not(checker.Contains(s))), poll.WithTimeout(defaultReconciliationTimeout))
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -389,7 +389,7 @@ func (s *DockerSwarmSuite) TestSwarmContainerAttachByNetworkId(c *testing.T) {
|
|||||||
return out, ""
|
return out, ""
|
||||||
}
|
}
|
||||||
|
|
||||||
poll.WaitOn(c, pollCheck(c, checkNetwork, checker.Not(checker.Contains("testnet"))()), poll.WithTimeout(3*time.Second))
|
poll.WaitOn(c, pollCheck(c, checkNetwork, checker.Not(checker.Contains("testnet"))), poll.WithTimeout(3*time.Second))
|
||||||
}
|
}
|
||||||
|
|
||||||
func (s *DockerSwarmSuite) TestOverlayAttachable(c *testing.T) {
|
func (s *DockerSwarmSuite) TestOverlayAttachable(c *testing.T) {
|
||||||
|
@ -3,7 +3,6 @@ package discovery // import "github.com/docker/docker/pkg/discovery"
|
|||||||
import (
|
import (
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/docker/docker/integration-cli/checker"
|
|
||||||
"gotest.tools/assert"
|
"gotest.tools/assert"
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -86,20 +85,20 @@ func (s *DiscoverySuite) TestEntriesEquality(c *testing.T) {
|
|||||||
assert.Assert(c, entries.Equals(Entries{
|
assert.Assert(c, entries.Equals(Entries{
|
||||||
&Entry{Host: "127.0.0.1", Port: "2375"},
|
&Entry{Host: "127.0.0.1", Port: "2375"},
|
||||||
&Entry{Host: "127.0.0.2", Port: "2375"},
|
&Entry{Host: "127.0.0.2", Port: "2375"},
|
||||||
}), checker.Equals, true)
|
}))
|
||||||
|
|
||||||
// Different size
|
// Different size
|
||||||
assert.Assert(c, entries.Equals(Entries{
|
assert.Assert(c, !entries.Equals(Entries{
|
||||||
&Entry{Host: "127.0.0.1", Port: "2375"},
|
&Entry{Host: "127.0.0.1", Port: "2375"},
|
||||||
&Entry{Host: "127.0.0.2", Port: "2375"},
|
&Entry{Host: "127.0.0.2", Port: "2375"},
|
||||||
&Entry{Host: "127.0.0.3", Port: "2375"},
|
&Entry{Host: "127.0.0.3", Port: "2375"},
|
||||||
}), checker.Equals, false)
|
}))
|
||||||
|
|
||||||
// Different content
|
// Different content
|
||||||
assert.Assert(c, entries.Equals(Entries{
|
assert.Assert(c, !entries.Equals(Entries{
|
||||||
&Entry{Host: "127.0.0.1", Port: "2375"},
|
&Entry{Host: "127.0.0.1", Port: "2375"},
|
||||||
&Entry{Host: "127.0.0.42", Port: "2375"},
|
&Entry{Host: "127.0.0.42", Port: "2375"},
|
||||||
}), checker.Equals, false)
|
}))
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user