Files
moby/integration/internal/network/states.go
2025-08-22 09:38:53 -05:00

20 lines
518 B
Go

package network
import (
"context"
"github.com/moby/moby/client"
"gotest.tools/v3/poll"
)
// IsRemoved verifies the network is removed.
func IsRemoved(ctx context.Context, apiClient client.NetworkAPIClient, networkID string) func(log poll.LogT) poll.Result {
return func(log poll.LogT) poll.Result {
_, err := apiClient.NetworkInspect(ctx, networkID, client.NetworkInspectOptions{})
if err == nil {
return poll.Continue("waiting for network %s to be removed", networkID)
}
return poll.Success()
}
}