(t *testing.T, image *fakes.Image, ext buildpack.BuildModule)
| 2060 | } |
| 2061 | |
| 2062 | func assertImageHasExtLayer(t *testing.T, image *fakes.Image, ext buildpack.BuildModule) { |
| 2063 | t.Helper() |
| 2064 | |
| 2065 | dirPath := fmt.Sprintf("/cnb/extensions/%s/%s", ext.Descriptor().Info().ID, ext.Descriptor().Info().Version) |
| 2066 | layerTar, err := image.FindLayerWithPath(dirPath) |
| 2067 | h.AssertNil(t, err) |
| 2068 | |
| 2069 | h.AssertOnTarEntry(t, layerTar, dirPath, |
| 2070 | h.IsDirectory(), |
| 2071 | ) |
| 2072 | |
| 2073 | h.AssertOnTarEntry(t, layerTar, path.Dir(dirPath), |
| 2074 | h.IsDirectory(), |
| 2075 | ) |
| 2076 | |
| 2077 | h.AssertOnTarEntry(t, layerTar, dirPath+"/bin/generate", |
| 2078 | h.ContentEquals("generate-contents"), |
| 2079 | ) |
| 2080 | |
| 2081 | h.AssertOnTarEntry(t, layerTar, dirPath+"/bin/detect", |
| 2082 | h.ContentEquals("detect-contents"), |
| 2083 | ) |
| 2084 | } |
| 2085 | |
| 2086 | func assertImageHasOrderBpLayer(t *testing.T, image *fakes.Image, bp buildpack.BuildModule) { |
| 2087 | t.Helper() |
no test coverage detected