(t *testing.T)
| 19 | } |
| 20 | |
| 21 | func 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 | |
| 34 | func TestFindConfigFileCurrentDir(t *testing.T) { |
| 35 | expectedPath := path.Clean(".sops.yaml") |
nothing calls this directly
no test coverage detected
searching dependent graphs…