MCPcopy Index your code
hub / github.com/devspace-sh/devspace / createFiles

Function createFiles

helper/server/upstream_test.go:120–141  ·  view source on GitHub ↗
(dir string, file testFile)

Source from the content-addressed store, hash-verified

118}
119
120func createFiles(dir string, file testFile) error {
121 for name, child := range file.Children {
122 if child.Children != nil {
123 err := os.Mkdir(filepath.Join(dir, name), 0755)
124 if err != nil {
125 return err
126 }
127
128 err = createFiles(filepath.Join(dir, name), child)
129 if err != nil {
130 return err
131 }
132 } else {
133 err := os.WriteFile(filepath.Join(dir, name), child.Data, 0666)
134 if err != nil {
135 return err
136 }
137 }
138 }
139
140 return nil
141}
142
143func TestUpstreamServer(t *testing.T) {
144 fromDir := t.TempDir()

Callers 2

TestUpstreamServerFunction · 0.85
TestDownstreamServerFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected