MCPcopy Create free account
hub / github.com/cli/cli / TestClientDeleteLocalTagRemovesTag

Function TestClientDeleteLocalTagRemovesTag

git/client_test.go:920–932  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

918}
919
920func TestClientDeleteLocalTagRemovesTag(t *testing.T) {
921 // Given a repository with a local tag
922 repo := newTestRepo(t)
923 repo.run(t, "commit", "--quiet", "--allow-empty", "-m", "initial commit")
924 repo.run(t, "tag", "v1.0")
925
926 // When the tag is deleted
927 err := repo.client.DeleteLocalTag(t.Context(), "v1.0")
928
929 // Then the tag no longer resolves
930 require.NoError(t, err)
931 assert.Empty(t, repo.run(t, "tag", "--list", "v1.0"))
932}
933
934func TestClientDeleteLocalTagReportsMissingTag(t *testing.T) {
935 // Given a repository without the requested tag

Callers

nothing calls this directly

Calls 4

newTestRepoFunction · 0.85
DeleteLocalTagMethod · 0.80
EmptyMethod · 0.80
runMethod · 0.45

Tested by

no test coverage detected