MCPcopy Create free account
hub / github.com/celer-pkg/celer / TestCloneRepo_Commit

Function TestCloneRepo_Commit

pkgs/git/control_clone_test.go:58–75  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

56}
57
58func TestCloneRepo_Commit(t *testing.T) {
59 if err := os.RemoveAll("testdata"); err != nil {
60 t.Fatal(err)
61 }
62
63 commit := "1ea1ac188ad4b9cb662e3f8314673c63df95a589"
64 if err := CloneRepo("[test clone repo]", "bzip2@1ea1ac188ad4b9cb662e3f8314673c63df95a589", testRepo, commit, 0, "testdata"); err != nil {
65 t.Fatal(err)
66 }
67
68 result, err := GetCommitHash("testdata")
69 if err != nil {
70 t.Fatal(err)
71 }
72 if result != commit {
73 t.Fatalf("commit %s not found", commit)
74 }
75}

Callers

nothing calls this directly

Calls 2

CloneRepoFunction · 0.85
GetCommitHashFunction · 0.85

Tested by

no test coverage detected