MCPcopy
hub / github.com/kptdev/kpt / TestCmd_git

Function TestCmd_git

internal/cmdget/cmdget_test.go:169–175  ·  view source on GitHub ↗

TestCmd_git tests that if a package path contains .git, it is still parsed correctly

(t *testing.T)

Source from the content-addressed store, hash-verified

167
168// TestCmd_git tests that if a package path contains .git, it is still parsed correctly
169func TestCmd_git(t *testing.T) {
170 r := cmdget.NewRunner("kpt")
171 r.Command.SetArgs([]string{"https://github.com/GoogleContainerTools/kpt/.github/workflows", "./"})
172 err := r.Command.Execute()
173 assert.NoError(t, err)
174 assert.NoError(t, os.RemoveAll("workflows"))
175}
176
177// NoOpRunE is a noop function to replace the run function of a command. Useful for testing argument parsing.
178var NoOpRunE = func(cmd *cobra.Command, args []string) error { return nil }

Callers

nothing calls this directly

Calls 2

NewRunnerFunction · 0.92
RemoveAllMethod · 0.45

Tested by

no test coverage detected