MCPcopy Create free account
hub / github.com/cloudfoundry/cli / WithNoResourceMatchedApp

Function WithNoResourceMatchedApp

integration/helpers/app.go:115–125  ·  view source on GitHub ↗

WithNoResourceMatchedApp creates a simple application to use with your CLI command (typically CF Push). When pushing, be aware of specifying '-b staticfile_buildpack" so that your app will correctly start up with the proper buildpack.

(f func(dir string))

Source from the content-addressed store, hash-verified

113// staticfile_buildpack" so that your app will correctly start up with the
114// proper buildpack.
115func WithNoResourceMatchedApp(f func(dir string)) {
116 dir := TempDirAbsolutePath("", "simple-app")
117 defer os.RemoveAll(dir)
118
119 tempfile := filepath.Join(dir, "index.html")
120
121 err := os.WriteFile(tempfile, []byte(fmt.Sprintf("hello world %s", strings.Repeat("a", 65*1024))), 0666)
122 Expect(err).ToNot(HaveOccurred())
123
124 f(dir)
125}
126
127// WithMultiBuildpackApp creates a multi-buildpack application to use with the CF push command.
128func WithMultiBuildpackApp(f func(dir string)) {

Callers 1

Calls 1

TempDirAbsolutePathFunction · 0.85

Tested by

no test coverage detected