feat/dns-zone-info #1
@ -46,9 +46,22 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
python-version: "3.10"
|
python-version: "3.10"
|
||||||
|
|
||||||
- name: Run unit tests
|
- name: Install requirements
|
||||||
uses: ansible-community/ansible-test-gh-action@release/v1
|
run: pip3 install -r tests/requirements.txt
|
||||||
with:
|
shell: bash
|
||||||
ansible-core-version: stable-2.14
|
working-directory: ${{ gitea.workspace }}
|
||||||
target-python-version: 3.10
|
|
||||||
testing-type: units
|
- 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 }}
|
||||||
|
@ -207,7 +207,7 @@ class TestPublicCloudConfigInfoModule(unittest.TestCase):
|
|||||||
|
|
||||||
captured_output = json.loads(e.value.args[0])
|
captured_output = json.loads(e.value.args[0])
|
||||||
assert "msg" in captured_output
|
assert "msg" in captured_output
|
||||||
assert not captured_output["msg"] == "Request timeout"
|
assert captured_output["msg"] == "Request timeout"
|
||||||
mock_fail_json.assert_called_once()
|
mock_fail_json.assert_called_once()
|
||||||
|
|
||||||
@patch(
|
@patch(
|
||||||
|
Loading…
Reference in New Issue
Block a user