Skip to content

Commit

Permalink
makefile integration target to submit all the integration payloads
Browse files Browse the repository at this point in the history
  • Loading branch information
jhkennedy committed Mar 26, 2024
1 parent 8e1dda4 commit 1e86491
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
export PYTHONPATH = ${PWD}/landsat/src
TEST_TOPIC_ARN ?= arn:aws:sns:us-west-2:986442313181:its-live-notify-test

install:
python -m pip install --upgrade pip && \
Expand All @@ -12,6 +13,10 @@ test_file ?= 'tests/'
test:
pytest $(test_file)

integration:
export AWS_PAGER='' && \
$(foreach file, $(wildcard tests/integration/*.json), echo "aws sns publish --profile saml-pub --topic-arn ${TEST_TOPIC_ARN} --message file://${file} --output json";)

static: ruff-check cfn-lint

ruff-check:
Expand Down
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,3 +69,12 @@ aws sns publish \
where `TOPIC_ARN` is the ARN of the test topic and `MESSAGE_FILE` is the path to a file containing the contents of the message you want published. Example message contents are provided in these files in the [`tests/integration`](tests/integration) directory:
* [`sns-message-landsat-l9-valid.txt`](tests/integration/sns-message-landsat-l9-valid.txt) - A message containing Landsat 9 scene over ice that *should* be processed.
* [`sns-message-landsat-l9-invalid.txt`](tests/integration/sns-message-landsat-l9-invalid.txt) - A message containingLandsat 9 scene *not* over ice that *should not* be processed.

To submit all the integration test payloads to the default test SNS topic, run:
```shell
make integration
```
or, you can submit to an alternative SNS topic like:
```shell
TEST_TOPIC_ARN=foobar make integration
```

0 comments on commit 1e86491

Please sign in to comment.