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

Function GetTestDataPath

internal/testutil/testutil.go:393–403  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

391}
392
393func GetTestDataPath() (string, error) {
394 filename, err := getTestUtilGoFilePath()
395 if err != nil {
396 return "", err
397 }
398 ds, err := filepath.Abs(filepath.Join(filepath.Dir(filename), "testdata"))
399 if err != nil {
400 return "", err
401 }
402 return ds, nil
403}
404
405func getTestUtilGoFilePath() (string, error) {
406 _, filename, _, ok := runtime.Caller(1)

Callers 3

TestReplaceNonKRMFilesFunction · 0.92
SetupTestGitRepoMethod · 0.85
replaceDataFunction · 0.85

Calls 1

getTestUtilGoFilePathFunction · 0.85

Tested by 1

TestReplaceNonKRMFilesFunction · 0.74