-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* move tests ouf of main dockerfile * rename file * up only sut * remove tests related to testinfra and python * copy only necessary folders
- Loading branch information
Showing
5 changed files
with
25 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
FROM aifrak/testinfra:5.2.2-python-3.8.5-slim-buster as test-testinfra | ||
FROM aifrak/base-image:sut as test-build | ||
|
||
# fix issue "/usr/local/bin/python: error while loading shared libraries: libpython3.8.so.1.0: cannot open shared object file: No such file or directory" | ||
ENV LD_LIBRARY_PATH=/usr/local/lib | ||
|
||
ARG DOCKER_TEST_DIR=./docker/test | ||
|
||
RUN mkdir -p $DOCKER_TEST_DIR | ||
|
||
WORKDIR $DOCKER_TEST_DIR | ||
|
||
COPY --from=test-testinfra /usr/local/lib /usr/local/lib | ||
COPY --from=test-testinfra /usr/local/bin /usr/local/bin | ||
COPY --chown=$APP_USER:$APP_USER_GROUP ./test . | ||
|
||
ENTRYPOINT ["pytest"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
#!/bin/sh | ||
|
||
docker-compose --file docker-compose.test.yml up --build | ||
docker-compose --file docker-compose.test.yml up --build sut | ||
docker-compose --file docker-compose.test.yml down --volumes --remove-orphans --rmi all |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters