Skip to content

Commit

Permalink
[#474] Test dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
danielmursa-dev committed Jan 2, 2025
1 parent 4baf943 commit 5323014
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
15 changes: 10 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -77,14 +77,19 @@ USER user
ARG COMMIT_HASH
ARG RELEASE

RUN echo "----- STARTING BUILD -----"
RUN echo "COMMIT_HASH: $COMMIT_HASH"
RUN echo "RELEASE: $RELEASE"
RUN echo "----- BUILD ARGUMENTS END -----"
ARG COMMIT_HASH
ARG RELEASE

ENV GIT_SHA=${COMMIT_HASH}
ENV COMMIT_HASH=${COMMIT_HASH}
ENV RELEASE=${RELEASE}

ENV TEST_MAYKIN=CIAO

RUN echo "----- ENV VARIABLES -----" \
&& echo "COMMIT_HASH: $COMMIT_HASH" \
&& echo "RELEASE: $RELEASE" \
&& echo "----- END -----"

ENV DJANGO_SETTINGS_MODULE=objects.conf.docker

ARG SECRET_KEY=dummy
Expand Down
1 change: 1 addition & 0 deletions src/objects/tests/admin/test_token_permissions.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ def test_version(self, m):
response = self.app.get(self.url)
self.assertEqual(response.status_code, 200)
self.assertEqual(os.environ["ENVIRONMENT"], "dev")
self.assertEqual(os.environ["TEST_MAYKIN"], "CIAO")
if os.environ["ENVIRONMENT"] == "development":
self.assertEqual(os.environ["RELEASE"], "dev")
else:
Expand Down

0 comments on commit 5323014

Please sign in to comment.