Skip to content

Commit 52e790a

Browse files
author
Trong Nhan Mai
committed
chore: update README for integration test, minor fix for Makefile and tags of some test cases
Signed-off-by: Trong Nhan Mai <[email protected]>
1 parent fc145ed commit 52e790a

File tree

6 files changed

+10
-8
lines changed

6 files changed

+10
-8
lines changed

Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -319,6 +319,7 @@ integration-test-docker:
319319
python ./tests/integration/run.py \
320320
run \
321321
--macaron scripts/release_scripts/run_macaron.sh \
322+
--include-tag docker-only \
322323
--include-tag shared-docker-python \
323324
./tests/integration/cases/...
324325

tests/integration/README.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -133,17 +133,21 @@ $ python ./tests/integration/run.py run ./all/cases/...
133133
134134
In certain cases, we can utilize the feature of tags to select a subset of test cases to run with the `run` command.
135135
136-
Each test case can be attached with one or more tags in the yaml configuration. For example, you may find some of our test cases having the `docker` tag as follows.
136+
Each test case can be attached with one or more tags in the yaml configuration. For example, you may find some of our test cases having the `shared-docker-python` tag as follows.
137137
138138
```yaml
139139
description: ...
140140
tags:
141-
- docker
141+
- shared-docker-python
142142
steps:
143143
- ...
144144
```
145145
146-
We typically have the test cases for the container image being a subset of the test cases for the Macaron Python package. We can mark the test cases shared for both purposes with the `docker` tag. When we do integration testing for the container image, we can add the argument `--include-tag docker` to filter only test cases tagged with `docker`.
146+
We typically have the test cases for the container image being a subset of the test cases for the Macaron Python package. We can mark the test cases shared for both purposes with the `shared-docker-python` tag. When we do integration testing for the container image, we can add the argument `--include-tag shared-docker-python` to filter only test cases tagged with `shared-docker-python`.
147+
148+
Some other use cases of this tagging feature in our current setup:
149+
- We can have test cases that **only** run for the container image. In the integration tests for the Macaron Python package, test cases marked with `docker-only` are not run. Note that `docker-only` shouldn't be used with `shared-docker-python`.
150+
- Test cases marked with `skip` are not run.
147151
148152
```bash
149153
# Test the container image with test cases having the `docker` tag.

tests/integration/cases/django_with_dep_resolution_virtual_env_as_input/test.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ description: |
55
Tutorial test: Analyzing the dependencies with virtual env provided as input.
66
77
tags:
8-
- docker
8+
- shared-docker-python
99

1010
steps:
1111
- name: Create virtual environment.

tests/integration/cases/run_macaron_sh_early_exit/test.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ description: |
55
Running run_macaron.sh on scenarios where the docker image is not available
66
77
tags:
8-
- shared-docker-python
98
- docker-only
109

1110
steps:

tests/integration/cases/run_macaron_sh_script_unit_test/test.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,7 @@ description: |
55
Run unit tests for the run_macaron.sh script
66
77
tags:
8-
- docker
9-
- token_file_clean_up
8+
- docker-only
109

1110
steps:
1211
- name: Run test_run_macaron_sh.py

tests/integration/cases/run_macaron_sh_with_invalid_docker_pull_env/test.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ description: |
55
Making sure run_macaron.sh clean up the token file when it exits because DOCKER_PULL is set to an invalid value.
66
77
tags:
8-
- shared-docker-python
98
- docker-only
109

1110
steps:

0 commit comments

Comments
 (0)