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

Function TestExists

internal/cmdexport/pathutil/pathutil_test.go:63–70  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

61}
62
63func TestExists(t *testing.T) {
64 base, err := ioutil.TempDir("", "kpt-path-test")
65 testutil.AssertNoError(t, err)
66 defer os.RemoveAll(base)
67
68 assert.Equal(t, Exists(base), true)
69 assert.Equal(t, Exists(path.Join(base, "some-random-dir")), false)
70}
71
72func TestIsInsideDirectory(t *testing.T) {
73 base := path.Join(os.TempDir(), "kpt-path-test")

Callers

nothing calls this directly

Calls 2

ExistsFunction · 0.85
RemoveAllMethod · 0.45

Tested by

no test coverage detected