(t *testing.T)
| 11 | ) |
| 12 | |
| 13 | func TestNewSortedFilesFromPaths(t *testing.T) { |
| 14 | inputPaths := []string{ |
| 15 | "../yamltemplate/filetests/def.tpltest", |
| 16 | "https://example.org/test.yaml?hello=world&foo=bar", |
| 17 | "an/overwritten/path/to/file.yaml=https://example.org/test.yaml?hello=world&foo=bar"} |
| 18 | filesToProcess, err := files.NewSortedFilesFromPaths(inputPaths, files.SymlinkAllowOpts{true, []string{}}) |
| 19 | |
| 20 | require.NoError(t, err) |
| 21 | |
| 22 | assert.Equal(t, filesToProcess[0].RelativePath(), "def.tpltest") |
| 23 | assert.Equal(t, filesToProcess[1].RelativePath(), "test.yaml") |
| 24 | assert.Equal(t, filesToProcess[1].Description(), "HTTP URL 'https://example.org/test.yaml?hello=world&foo=bar'") |
| 25 | assert.Equal(t, filesToProcess[2].RelativePath(), "an/overwritten/path/to/file.yaml") |
| 26 | assert.Equal(t, filesToProcess[2].Description(), "HTTP URL 'https://example.org/test.yaml?hello=world&foo=bar'") |
| 27 | } |
nothing calls this directly
no test coverage detected
searching dependent graphs…