MCPcopy Index your code
hub / github.com/cloudfoundry/cli / WithEmptyFilesApp

Function WithEmptyFilesApp

integration/helpers/app.go:237–249  ·  view source on GitHub ↗
(f func(dir string))

Source from the content-addressed store, hash-verified

235}
236
237func 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.
252func AppGUID(appName string) string {

Callers 1

Calls 1

TempDirAbsolutePathFunction · 0.85

Tested by

no test coverage detected