MCPcopy Index your code
hub / github.com/google/go-github / TestGitService_createSignature_signerError

Function TestGitService_createSignature_signerError

github/git_commits_test.go:368–383  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

366}
367
368func TestGitService_createSignature_signerError(t *testing.T) {
369 t.Parallel()
370 a := &createCommit{
371 Message: Ptr("Commit Message."),
372 Tree: Ptr("t"),
373 Parents: []string{"p"},
374 Author: &CommitAuthor{Name: Ptr("go-github")},
375 }
376
377 signer := mockSigner(t, "", errors.New("signer error"), "")
378 _, err := createSignature(signer, a)
379
380 if err == nil {
381 t.Error("Expected error to be returned because signer returned an error")
382 }
383}
384
385func TestGitService_createSignatureMessage_nilCommit(t *testing.T) {
386 t.Parallel()

Callers

nothing calls this directly

Calls 4

mockSignerFunction · 0.85
createSignatureFunction · 0.85
PtrFunction · 0.70
ErrorMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…