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))
| 113 | // staticfile_buildpack" so that your app will correctly start up with the |
| 114 | // proper buildpack. |
| 115 | func 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. |
| 128 | func WithMultiBuildpackApp(f func(dir string)) { |
no test coverage detected