MCPcopy Create free account
hub / github.com/GoogleCloudPlatform/buildpacks / setupTestLayer

Function setupTestLayer

pkg/java/java_test.go:259–272  ·  view source on GitHub ↗
(t *testing.T, ctx *gcp.Context)

Source from the content-addressed store, hash-verified

257}
258
259func setupTestLayer(t *testing.T, ctx *gcp.Context) (string, *libcnb.Layer) {
260 t.Helper()
261 testLayerRoot := t.TempDir()
262 testFilePath := filepath.Join(testLayerRoot, "testfile")
263 _, err := os.Create(testFilePath)
264 if err != nil {
265 t.Fatalf("error creating %s: %v", testFilePath, err)
266 }
267 m2CachedRepo := &libcnb.Layer{
268 Path: testLayerRoot,
269 Metadata: map[string]interface{}{},
270 }
271 return testFilePath, m2CachedRepo
272}
273
274func setupTestManifest(t *testing.T, mfContent []byte) string {
275 t.Helper()

Callers 2

TestCheckCacheNewDateHitFunction · 0.85

Calls 1

TempDirMethod · 0.80

Tested by

no test coverage detected