MCPcopy Create free account
hub / github.com/alibaba/open-code-review / TestGetCommitMessage

Function TestGetCommitMessage

cmd/opencodereview/git_test.go:65–74  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

63}
64
65func TestGetCommitMessage(t *testing.T) {
66 dir := initTestGitRepo(t)
67 msg, err := getCommitMessage(dir, "HEAD")
68 if err != nil {
69 t.Fatalf("unexpected error: %v", err)
70 }
71 if msg != "initial commit" {
72 t.Errorf("msg = %q, want 'initial commit'", msg)
73 }
74}
75
76func TestGetCommitMessage_InvalidCommit(t *testing.T) {
77 dir := initTestGitRepo(t)

Callers

nothing calls this directly

Calls 2

initTestGitRepoFunction · 0.85
getCommitMessageFunction · 0.85

Tested by

no test coverage detected