MCPcopy Create free account
hub / github.com/libgit2/git2go / TestRemoveNote

Function TestRemoveNote

note_test.go:67–89  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

65}
66
67func TestRemoveNote(t *testing.T) {
68 t.Parallel()
69 repo := createTestRepo(t)
70 defer cleanupTestRepo(t, repo)
71
72 commitId, _ := seedTestRepo(t, repo)
73
74 commit, err := repo.LookupCommit(commitId)
75 checkFatal(t, err)
76
77 note, _ := createTestNote(t, repo, commit)
78
79 _, err = repo.Notes.Read("", commit.Id())
80 checkFatal(t, err)
81
82 err = repo.Notes.Remove("", note.Author(), note.Committer(), commitId)
83 checkFatal(t, err)
84
85 _, err = repo.Notes.Read("", commit.Id())
86 if err == nil {
87 t.Fatal("note remove failed")
88 }
89}
90
91func TestDefaultNoteRef(t *testing.T) {
92 t.Parallel()

Callers

nothing calls this directly

Calls 11

createTestRepoFunction · 0.85
cleanupTestRepoFunction · 0.85
seedTestRepoFunction · 0.85
checkFatalFunction · 0.85
createTestNoteFunction · 0.85
LookupCommitMethod · 0.80
ReadMethod · 0.45
IdMethod · 0.45
RemoveMethod · 0.45
AuthorMethod · 0.45
CommitterMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…