MCPcopy Index your code
hub / github.com/getsops/sops / TestFindConfigFileRecursive

Function TestFindConfigFileRecursive

config/config_test.go:21–32  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

19}
20
21func TestFindConfigFileRecursive(t *testing.T) {
22 expectedPath := path.Clean("./../../.sops.yaml")
23 fs = mockFS{stat: func(name string) (os.FileInfo, error) {
24 if name == expectedPath {
25 return nil, nil
26 }
27 return nil, &os.PathError{}
28 }}
29 filepath, err := FindConfigFile(".")
30 assert.Nil(t, err)
31 assert.Equal(t, expectedPath, filepath)
32}
33
34func TestFindConfigFileCurrentDir(t *testing.T) {
35 expectedPath := path.Clean(".sops.yaml")

Callers

nothing calls this directly

Calls 1

FindConfigFileFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…