Skip to content

Commit 6b47d09

Browse files
Avoid running data integration tests when focal only
1 parent 61e2c8c commit 6b47d09

File tree

3 files changed

+5
-14
lines changed

3 files changed

+5
-14
lines changed

.github/workflows/ci.yaml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,7 @@ jobs:
116116
- juju-snap-channel: "2.9/stable"
117117
agent-version: "2.9.45"
118118
libjuju-version: "2.9.44.1"
119+
if: ${{ ! (matrix.groups.path_to_test_file == "tests/integration/test_data_integrator.py" && matrix.ubuntu-versions.series == "focal") }}
119120
name: ${{ matrix.juju-snap-channel }} - (GH hosted) ${{ matrix.groups.job_name }} | ${{ matrix.ubuntu-versions.series }}
120121
needs:
121122
- lint
@@ -156,7 +157,9 @@ jobs:
156157
echo "mark_expression=not unstable" >> "$GITHUB_OUTPUT"
157158
fi
158159
- name: Run integration tests
159-
run: tox run -e integration -- "${{ matrix.groups.path_to_test_file }}" --group="${{ matrix.groups.group_number }}" -m '${{ steps.select-test-stability.outputs.mark_expression }}' --mysql-router-charm-series=${{ matrix.ubuntu-versions.series }} --mysql-router-charm-bases-index=${{ matrix.ubuntu-versions.bases-index }}
160+
if:
161+
run:
162+
tox run -e integration -- "${{ matrix.groups.path_to_test_file }}" --group="${{ matrix.groups.group_number }}" -m '${{ steps.select-test-stability.outputs.mark_expression }}' --mysql-router-charm-series=${{ matrix.ubuntu-versions.series }} --mysql-router-charm-bases-index=${{ matrix.ubuntu-versions.bases-index }}
160163
env:
161164
LIBJUJU_VERSION_SPECIFIER: ${{ matrix.libjuju-version }}
162165
SECRETS_FROM_GITHUB: |

tests/integration/markers.py

Lines changed: 0 additions & 10 deletions
This file was deleted.

tests/integration/test_data_integrator.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
import pytest
1010
from pytest_operator.plugin import OpsTest
1111

12-
from . import juju_, markers
12+
from . import juju_
1313
from .helpers import execute_queries_against_unit, get_tls_certificate_issuer
1414

1515
logger = logging.getLogger(__name__)
@@ -41,7 +41,6 @@ async def get_data_integrator_credentials(ops_test: OpsTest) -> typing.Dict:
4141

4242
@pytest.mark.group(1)
4343
@pytest.mark.abort_on_fail
44-
@markers.only_with_juju_secrets
4544
async def test_external_connectivity_with_data_integrator(
4645
ops_test: OpsTest, mysql_router_charm_series: str
4746
) -> None:
@@ -104,7 +103,6 @@ async def test_external_connectivity_with_data_integrator(
104103

105104
@pytest.mark.group(1)
106105
@pytest.mark.abort_on_fail
107-
@markers.only_with_juju_secrets
108106
async def test_external_connectivity_with_data_integrator_and_tls(ops_test: OpsTest) -> None:
109107
"""Test data integrator along with TLS operator"""
110108
logger.info("Ensuring no data exists in the test database")

0 commit comments

Comments
 (0)