(t *testing.T)
| 32 | } |
| 33 | |
| 34 | func TestFindConfigFileCurrentDir(t *testing.T) { |
| 35 | expectedPath := path.Clean(".sops.yaml") |
| 36 | fs = mockFS{stat: func(name string) (os.FileInfo, error) { |
| 37 | if name == expectedPath { |
| 38 | return nil, nil |
| 39 | } |
| 40 | return nil, &os.PathError{} |
| 41 | }} |
| 42 | filepath, err := FindConfigFile(".") |
| 43 | assert.Nil(t, err) |
| 44 | assert.Equal(t, expectedPath, filepath) |
| 45 | } |
| 46 | |
| 47 | var sampleConfig = []byte(` |
| 48 | creation_rules: |
nothing calls this directly
no test coverage detected
searching dependent graphs…