MCPcopy
hub / github.com/carvel-dev/ytt / TestNewSortedFilesFromPaths

Function TestNewSortedFilesFromPaths

pkg/files/file_test.go:13–27  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

11)
12
13func 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}

Callers

nothing calls this directly

Calls 3

NewSortedFilesFromPathsFunction · 0.92
RelativePathMethod · 0.65
DescriptionMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…