(f func(dir string))
| 235 | } |
| 236 | |
| 237 | func WithEmptyFilesApp(f func(dir string)) { |
| 238 | dir := TempDirAbsolutePath("", "simple-app") |
| 239 | defer os.RemoveAll(dir) |
| 240 | |
| 241 | tempfile := filepath.Join(dir, "index.html") |
| 242 | err := os.WriteFile(tempfile, nil, 0666) |
| 243 | Expect(err).ToNot(HaveOccurred()) |
| 244 | |
| 245 | err = os.WriteFile(filepath.Join(dir, "Staticfile"), nil, 0666) |
| 246 | Expect(err).ToNot(HaveOccurred()) |
| 247 | |
| 248 | f(dir) |
| 249 | } |
| 250 | |
| 251 | // AppGUID returns the GUID for an app in the currently targeted space. |
| 252 | func AppGUID(appName string) string { |
no test coverage detected