mirror of
https://github.com/moby/moby.git
synced 2026-01-11 18:51:37 +00:00
libnet: de-flake TestEndpointStore
Signed-off-by: Albin Kerouanton <albinker@gmail.com>
This commit is contained in:
@@ -2,6 +2,8 @@ package libnetwork
|
||||
|
||||
import (
|
||||
"context"
|
||||
"slices"
|
||||
"strings"
|
||||
"testing"
|
||||
|
||||
"github.com/docker/docker/libnetwork/config"
|
||||
@@ -27,6 +29,7 @@ func TestEndpointStore(t *testing.T) {
|
||||
|
||||
// Check that we can find both endpoints
|
||||
found := c.findEndpoints(filterEndpointByNetworkId("testNetwork"))
|
||||
slices.SortFunc(found, func(a, b *Endpoint) int { return strings.Compare(a.id, b.id) })
|
||||
assert.Equal(t, len(found), 2)
|
||||
assert.Equal(t, found[0], ep1)
|
||||
assert.Equal(t, found[1], ep2)
|
||||
|
||||
Reference in New Issue
Block a user