(dir string, file testFile)
| 118 | } |
| 119 | |
| 120 | func 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 | |
| 143 | func TestUpstreamServer(t *testing.T) { |
| 144 | fromDir := t.TempDir() |
no outgoing calls
no test coverage detected