MCPcopy Index your code
hub / github.com/github/copilot-sdk / waitForFileText

Function waitForFileText

go/internal/e2e/rpc_shell_and_fleet_e2e_test.go:183–193  ·  view source on GitHub ↗
(t *testing.T, path, expected string)

Source from the content-addressed store, hash-verified

181}
182
183func waitForFileText(t *testing.T, path, expected string) {
184 t.Helper()
185 deadline := time.Now().Add(30 * time.Second)
186 for time.Now().Before(deadline) {
187 if data, err := os.ReadFile(path); err == nil && strings.Contains(string(data), expected) {
188 return
189 }
190 time.Sleep(100 * time.Millisecond)
191 }
192 t.Fatalf("Timed out waiting for shell command to write %q to %q", expected, path)
193}
194
195func waitForFleetCompletion(t *testing.T, session *copilot.Session, contentNeedle string) []copilot.SessionEvent {
196 t.Helper()

Callers 1

TestRPCShellAndFleetE2EFunction · 0.70

Calls 2

ReadFileMethod · 0.65
AddMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…