(t *testing.T, image *fakes.Image, bp buildpack.BuildModule)
| 2036 | } |
| 2037 | |
| 2038 | func assertImageHasBPLayer(t *testing.T, image *fakes.Image, bp buildpack.BuildModule) { |
| 2039 | t.Helper() |
| 2040 | |
| 2041 | dirPath := fmt.Sprintf("/cnb/buildpacks/%s/%s", bp.Descriptor().Info().ID, bp.Descriptor().Info().Version) |
| 2042 | layerTar, err := image.FindLayerWithPath(dirPath) |
| 2043 | h.AssertNil(t, err) |
| 2044 | |
| 2045 | h.AssertOnTarEntry(t, layerTar, dirPath, |
| 2046 | h.IsDirectory(), |
| 2047 | ) |
| 2048 | |
| 2049 | h.AssertOnTarEntry(t, layerTar, path.Dir(dirPath), |
| 2050 | h.IsDirectory(), |
| 2051 | ) |
| 2052 | |
| 2053 | h.AssertOnTarEntry(t, layerTar, dirPath+"/bin/build", |
| 2054 | h.ContentEquals("build-contents"), |
| 2055 | ) |
| 2056 | |
| 2057 | h.AssertOnTarEntry(t, layerTar, dirPath+"/bin/detect", |
| 2058 | h.ContentEquals("detect-contents"), |
| 2059 | ) |
| 2060 | } |
| 2061 | |
| 2062 | func assertImageHasExtLayer(t *testing.T, image *fakes.Image, ext buildpack.BuildModule) { |
| 2063 | t.Helper() |
no test coverage detected