-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[MAINTENANCE] moved tests to lambda directories (#101)
* feat: moved tests to lambda dirs
- Loading branch information
1 parent
39dabdf
commit ac6b4b4
Showing
35 changed files
with
53 additions
and
30 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
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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,8 +1,25 @@ | ||
FROM public.ecr.aws/lambda/python:3.9 | ||
FROM public.ecr.aws/lambda/python:3.9 as base | ||
COPY requirements.txt ./ | ||
RUN pip3 install -r requirements.txt --no-cache-dir | ||
COPY ./*.py ./ | ||
COPY great_expectations ./great_expectations | ||
COPY ./data_test/*.py ./ | ||
COPY ./data_test/great_expectations ./great_expectations | ||
RUN rm -f /etc/timezone | ||
RUN python3 -c "import tzlocal; tzlocal.get_localzone()" | ||
|
||
FROM base as unit-tests | ||
RUN pip install pytest==7.3.1 moto==4.1.6 | ||
ENV ENVIRONMENT=local \ | ||
REPORTS_WEB=test \ | ||
AWS_ACCESS_KEY_ID=test \ | ||
AWS_SECRET_ACCESS_KEY=test \ | ||
AWS_DEFAULT_REGION=us-east-1 \ | ||
REDSHIFT_DB=test \ | ||
REDSHIFT_SECRET=test \ | ||
S3_HOST=localhost \ | ||
S3_PORT=9000 \ | ||
BUCKET=test-bucket | ||
COPY ./tests/test*.py ./ | ||
ENTRYPOINT ["pytest","-qvs"] | ||
|
||
FROM base as production | ||
CMD ["data_test.handler"] |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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,5 +1,22 @@ | ||
FROM public.ecr.aws/lambda/python:3.9 | ||
FROM public.ecr.aws/lambda/python:3.9 as base | ||
ADD ./requirements.txt ./requirements.txt | ||
RUN pip3 install -r requirements.txt | ||
COPY ./*.py ./ | ||
COPY ./report_push/*.py ./ | ||
|
||
FROM base as unit-tests | ||
RUN pip install pytest==7.3.1 moto==4.1.6 | ||
ENV ENVIRONMENT=local \ | ||
BUCKET=test-bucket \ | ||
DYNAMODB_TABLE=test-table \ | ||
AWS_ACCESS_KEY_ID=test \ | ||
AWS_SECRET_ACCESS_KEY=test \ | ||
AWS_DEFAULT_REGION=us-east-1 \ | ||
SNS_BUGS_TOPIC_ARN=test-topic-arn \ | ||
JIRA_URL=https://jira.localhost \ | ||
DATAQA_JIRA_USERNAME=qauser \ | ||
DATAQA_JIRA_PASSWORD=qapassword | ||
COPY ./tests/test*.py ./ | ||
ENTRYPOINT ["pytest", "-qvs"] | ||
|
||
FROM base as production | ||
CMD ["push_data_report.handler"] |
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file was deleted.
Oops, something went wrong.