MCPcopy
hub / github.com/ory/keto / waitUntilLive

Method waitUntilLive

internal/e2e/cli_client_test.go:126–142  ·  view source on GitHub ↗
(t testing.TB)

Source from the content-addressed store, hash-verified

124}
125
126func (g *cliClient) waitUntilLive(t testing.TB) {
127 flags := make([]string, len(g.c.PersistentArgs))
128 copy(flags, g.c.PersistentArgs)
129
130 for i, f := range flags {
131 if f == "--"+cmdx.FlagFormat {
132 flags = append(flags[:i], flags[i+2:]...)
133 break
134 }
135 }
136
137 ctx, cancel := context.WithTimeout(g.c.Ctx, time.Minute)
138 defer cancel()
139
140 out := cmdx.ExecNoErrCtx(ctx, t, g.c.New(), append(flags, "status", "--"+gprclient.FlagBlock)...)
141 require.Equal(t, grpcHealthV1.HealthCheckResponse_SERVING.String()+"\n", out)
142}
143
144func (g *cliClient) deleteTuple(t testing.TB, r *ketoapi.RelationTuple) {
145 tupleEnc, err := json.Marshal(r)

Callers

nothing calls this directly

Calls 1

StringMethod · 0.65

Tested by

no test coverage detected