ci: more testing CI
Some checks failed
pull-requests-open / Check commit compliance (pull_request) Successful in 5s
pull-requests-open / Run tests (pull_request) Failing after 15s

This commit is contained in:
Bertrand Lanson 2024-09-14 21:36:28 +02:00
parent 8bcc020346
commit 9ed53d92a4
Signed by: lanson
SSH Key Fingerprint: SHA256:/nqc6HGqld/PS208F6FUOvZlUzTS0rGpNNwR5O2bQBw
2 changed files with 20 additions and 7 deletions

View File

@ -46,9 +46,22 @@ jobs:
with:
python-version: "3.10"
- name: Run unit tests
uses: ansible-community/ansible-test-gh-action@release/v1
with:
ansible-core-version: stable-2.14
target-python-version: 3.10
testing-type: units
- name: Install requirements
run: pip3 install -r tests/requirements.txt
shell: bash
working-directory: ${{ gitea.workspace }}
- name: Setup testing environment
run: ansible-galaxy collection install ${{ gitea.workspace }}
shell: bash
working-directory: ${{ gitea.workspace }}
- name: Run ansible unit tests
run: ansible-test units --coverage
shell: bash
working-directory: ${{ gitea.workspace }}
- name: Print coverage informations
run: ansible-test coverage report
shell: bash
working-directory: ${{ gitea.workspace }}

View File

@ -207,7 +207,7 @@ class TestPublicCloudConfigInfoModule(unittest.TestCase):
captured_output = json.loads(e.value.args[0])
assert "msg" in captured_output
assert not captured_output["msg"] == "Request timeout"
assert captured_output["msg"] == "Request timeout"
mock_fail_json.assert_called_once()
@patch(