MCPcopy Create free account
hub / github.com/coder/coder / assertEventuallyNoClientsForAgent

Function assertEventuallyNoClientsForAgent

enterprise/tailnet/pgcoord_test.go:965–977  ·  view source on GitHub ↗
(ctx context.Context, t *testing.T, store database.Store, agentID uuid.UUID)

Source from the content-addressed store, hash-verified

963}
964
965func 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
979type fakeCoordinator struct {
980 ctx context.Context

Calls 4

FatalMethod · 0.80
HelperMethod · 0.65
IsMethod · 0.45

Tested by

no test coverage detected