Skip to content

Commit

Permalink
Replaced tmt duplicate test ID check
Browse files Browse the repository at this point in the history
In teemtee/tmt#2939, tmt (>=1.35) extended
its linting feature to also detect duplicate IDs in tests, plans and
stories. Therefore, the duplicate-ids python script can be removed
and the CI be updated to use tmt lint instead.

Signed-off-by: Michael Engel <[email protected]>
  • Loading branch information
engelmi committed Aug 21, 2024
1 parent 4f6c0f5 commit 641e4ce
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 72 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/integration-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -91,10 +91,10 @@ jobs:
tmt test id --dry | grep "New id" && echo "Found integration tests with missing ID. Please generate Test-IDs." && exit 1
cd ..
- name: Check for duplicate test IDs and summaries
- name: Lint tmt tests, plans and stories
run: |
cd tests
./scripts/duplicate-check.py
tmt lint
cd ..
- name: Run integration tests
Expand Down
16 changes: 8 additions & 8 deletions tests/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<!-- markdownlint-disable-file MD013 -->

# Eclipse BlueChi&trade; integration tests

## Installation
Expand Down Expand Up @@ -203,17 +204,16 @@ New id 'UUID' added to test '/tests/path_to_your_new_test'.

### Checking for duplicate test IDs and summaries

In addition to having a unique ID, the summaries of tests should be descriptive and unique as well. An automatic check will be performed by the CI. This check can also be invoked locally:
In addition to having a unique ID, the summaries of tests should be descriptive and unique as well. The CI will perform appropriate linting. This can also be invoked locally:

```shell
$ cd ~/bluechi/tests
$ ./scripts/duplicate-check.py
Duplicate ID '254b1fa2-7c9f-481c-85ac-c6e42c0226c8' detected for tests:
/tests/tier0/bluechi-anonymous-node
/tests/tier0/bluechi-controller-set-loglevel-invalid
Duplicate summary detected for tests:
/tests/tier0/bluechi-agent-set-loglevel
/tests/tier0/bluechi-controller-set-loglevel

# requires tmt >= 1.35
$ tmt lint tests
Lint checks on all
fail G001 duplicate id "96aa0e17-5e23-4cc3-bc34-88368b8cc07b" in "/tests/tier0/bluechi-agent-connect-via-controller-address"
fail G001 duplicate id "96aa0e17-5e23-4cc3-bc34-88368b8cc07b" in "/tests/tier0/bluechi-agent-get-logtarget"
```

## Usage of containers
Expand Down
2 changes: 1 addition & 1 deletion tests/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ junit-xml >= 1.9
pytest >= 7.3.1
podman >= 4.5.0
strato-skipper >= 2.0.2
tmt >= 1.32.1
tmt >= 1.35
61 changes: 0 additions & 61 deletions tests/scripts/duplicate-check.py

This file was deleted.

0 comments on commit 641e4ce

Please sign in to comment.