(ctx context.Context, t *testing.T, store database.Store, agentID uuid.UUID)
| 963 | } |
| 964 | |
| 965 | func assertEventuallyNoClientsForAgent(ctx context.Context, t *testing.T, store database.Store, agentID uuid.UUID) { |
| 966 | t.Helper() |
| 967 | assert.Eventually(t, func() bool { |
| 968 | clients, err := store.GetTailnetTunnelPeerIDsBatch(ctx, []uuid.UUID{agentID}) |
| 969 | if xerrors.Is(err, sql.ErrNoRows) { |
| 970 | return true |
| 971 | } |
| 972 | if err != nil { |
| 973 | t.Fatal(err) |
| 974 | } |
| 975 | return len(clients) == 0 |
| 976 | }, testutil.WaitShort, testutil.IntervalFast) |
| 977 | } |
| 978 | |
| 979 | type fakeCoordinator struct { |
| 980 | ctx context.Context |
no test coverage detected