MCPcopy Create free account
hub / github.com/cloudflare/artifact-fs / readFileEventually

Function readFileEventually

e2e_git_test.go:555–569  ·  view source on GitHub ↗
(t *testing.T, path string)

Source from the content-addressed store, hash-verified

553 assertGitStatus(t, repo.mountPath, map[string]string{"SECURITY.md -> SECURITY-renamed.md": "R "})
554
555 preCommitHEAD := strings.TrimSpace(gitCmd(t, repo.mountPath, "rev-parse", "HEAD"))
556 gitCmd(t, repo.mountPath,
557 "-c", "user.name=E2E Test",
558 "-c", "user.email=e2e@test",
559 "commit", "-m", "rename security doc",
560 )
561
562 waitForHeadAndStatus(t, repo.mountPath, preCommitHEAD, map[string]string{})
563 assertPathMissing(t, filepath.Join(repo.mountPath, "SECURITY.md"))
564 if got := readFileStr(t, filepath.Join(repo.mountPath, "SECURITY-renamed.md")); !strings.Contains(got, "Security") {
565 t.Fatalf("renamed file content = %q", got)
566 }
567}
568
569func TestE2EGitCommitTrackedDelete(t *testing.T) {
570 repo := newMountedE2ERepo(t)
571
572 gitCmd(t, repo.mountPath, "rm", "LICENSE-MIT")

Calls 2

AddMethod · 0.80
ReadFileMethod · 0.45

Tested by

no test coverage detected