Skip to content

Commit

Permalink
Adding unit tests to python-minimal
Browse files Browse the repository at this point in the history
  • Loading branch information
Gordonei committed Feb 1, 2024
1 parent 943bb5e commit a444731
Showing 1 changed file with 23 additions and 1 deletion.
24 changes: 23 additions & 1 deletion base/drivers/python_minimal/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM cityofcapetown/datascience:drivers
FROM cityofcapetown/datascience:drivers as drivers-image

LABEL authors="Riaz Arbi,Gordon Inggs"

Expand All @@ -20,6 +20,28 @@ COPY python_additions.sh .

RUN bash python_additions.sh

FROM drivers-image as unit-test

# Minio Utils unit tests
RUN git clone https://ds1.capetown.gov.za/ds_gitlab/OPM/db-utils.git && \
cd db-utils && rm -rf db_utils && \
python3 -W ignore:ImportantWarning -m unittest tst.test_exchange_utils && \
python3 -W ignore:ImportantWarning -m unittest tst.test_minio_utils && \
python3 -W ignore:ImportantWarning -m unittest tst.test_odbc_utils && \
python3 -W ignore:ImportantWarning -m unittest tst.test_secrets_utils && \
python3 -W ignore:ImportantWarning -m unittest tst.test_sharepoint_utils && \
python3 -W ignore:ImportantWarning -m unittest tst.test_trino_utils && \
python3 -W ignore:ImportantWarning -m unittest tst.test_minio_utils_base_funcs && \
python3 -W ignore:ImportantWarning -m unittest tst.test_minio_utils_df_funcs

# Pipeline Utils unit tests
RUN git clone https://ds1.capetown.gov.za/ds_gitlab/OPM/pipeline-utils.git && \
cd pipeline-utils && rm -rf pipeline_utils && \
python3 -W ignore:ImportantWarning -m unittest tst.test_kubernetes_dag


FROM unit-test as final-image

RUN apt-get clean && \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* && \
python3 -m pip cache purge

0 comments on commit a444731

Please sign in to comment.