(t *testing.T)
| 27 | } |
| 28 | |
| 29 | func TestCreateTagLightweight(t *testing.T) { |
| 30 | t.Parallel() |
| 31 | repo := createTestRepo(t) |
| 32 | defer cleanupTestRepo(t, repo) |
| 33 | |
| 34 | commitID, _ := seedTestRepo(t, repo) |
| 35 | |
| 36 | commit, err := repo.LookupCommit(commitID) |
| 37 | checkFatal(t, err) |
| 38 | |
| 39 | tagID, err := repo.Tags.CreateLightweight("v0.1.0", commit, false) |
| 40 | checkFatal(t, err) |
| 41 | |
| 42 | _, err = repo.Tags.CreateLightweight("v0.1.0", commit, true) |
| 43 | checkFatal(t, err) |
| 44 | |
| 45 | ref, err := repo.References.Lookup("refs/tags/v0.1.0") |
| 46 | checkFatal(t, err) |
| 47 | |
| 48 | compareStrings(t, "refs/tags/v0.1.0", ref.Name()) |
| 49 | compareStrings(t, "v0.1.0", ref.Shorthand()) |
| 50 | compareStrings(t, tagID.String(), commitID.String()) |
| 51 | compareStrings(t, commitID.String(), ref.Target().String()) |
| 52 | } |
| 53 | |
| 54 | func TestListTags(t *testing.T) { |
| 55 | t.Parallel() |
nothing calls this directly
no test coverage detected
searching dependent graphs…