MCPcopy Create free account
hub / github.com/buildpacks/pack / assertImageHasOrderBpLayer

Function assertImageHasOrderBpLayer

internal/builder/builder_test.go:2086–2100  ·  view source on GitHub ↗
(t *testing.T, image *fakes.Image, bp buildpack.BuildModule)

Source from the content-addressed store, hash-verified

2084}
2085
2086func assertImageHasOrderBpLayer(t *testing.T, image *fakes.Image, bp buildpack.BuildModule) {
2087 t.Helper()
2088
2089 dirPath := fmt.Sprintf("/cnb/buildpacks/%s/%s", bp.Descriptor().Info().ID, bp.Descriptor().Info().Version)
2090 layerTar, err := image.FindLayerWithPath(dirPath)
2091 h.AssertNil(t, err)
2092
2093 h.AssertOnTarEntry(t, layerTar, dirPath,
2094 h.IsDirectory(),
2095 )
2096
2097 h.AssertOnTarEntry(t, layerTar, path.Dir(dirPath),
2098 h.IsDirectory(),
2099 )
2100}

Callers 1

testBuilderFunction · 0.85

Calls 2

InfoMethod · 0.65
DescriptorMethod · 0.65

Tested by

no test coverage detected