Add test for FindPackageCandidate

Adapt tests for env
This commit is contained in:
Ettore Di Giacinto
2019-12-01 21:26:50 +01:00
parent ebf818ff08
commit 58169770e1
5 changed files with 30 additions and 7 deletions

View File

@@ -66,7 +66,9 @@ var _ = Describe("Docker backend", func() {
FROM alpine
COPY . /luetbuild
WORKDIR /luetbuild
`))
ENV PACKAGE_NAME=enman
ENV PACKAGE_VERSION=1.4.0
ENV PACKAGE_CATEGORY=app-admin`))
b := NewSimpleDockerBackend()
opts := CompilerBackendOptions{
ImageName: "luet/base",
@@ -84,6 +86,9 @@ WORKDIR /luetbuild
Expect(err).ToNot(HaveOccurred())
Expect(dockerfile).To(Equal(`
FROM luet/base
ENV PACKAGE_NAME=enman
ENV PACKAGE_VERSION=1.4.0
ENV PACKAGE_CATEGORY=app-admin
RUN echo foo > /test
RUN echo bar > /test2`))
opts = CompilerBackendOptions{