MCPcopy
hub / github.com/cli/cli / TestOwnerBinaryExtension

Function TestOwnerBinaryExtension

pkg/cmd/extension/extension_test.go:67–85  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

65}
66
67func TestOwnerBinaryExtension(t *testing.T) {
68 tempDir := t.TempDir()
69 extName := "gh-bin-ext"
70 extDir := filepath.Join(tempDir, "extensions", extName)
71 extPath := filepath.Join(extDir, extName)
72 bm := binManifest{
73 Owner: "owner",
74 Name: "gh-bin-ext",
75 Host: "example.com",
76 Tag: "v1.0.1",
77 }
78 assert.NoError(t, stubBinaryExtension(extDir, bm))
79 e := &Extension{
80 kind: BinaryKind,
81 path: extPath,
82 }
83
84 assert.Equal(t, "owner", e.Owner())
85}
86
87func TestOwnerGitExtension(t *testing.T) {
88 gc := &mockGitClient{}

Callers

nothing calls this directly

Calls 4

OwnerMethod · 0.95
stubBinaryExtensionFunction · 0.85
JoinMethod · 0.80
EqualMethod · 0.80

Tested by

no test coverage detected