(t *testing.T)
| 56 | } |
| 57 | |
| 58 | func 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 | } |
nothing calls this directly
no test coverage detected