Skip to content

[DPE-11496] (PART 4) CI/CD migration to single-kernel: merged common pytest-operator tests - #413

Merged
xavipg003 merged 6 commits into
16/edgefrom
dpe-11496-4
Nov 20, 2026
Merged

xavipg003 merged 6 commits into
16/edgefrom
dpe-11496-4

Conversation

@xavipg003

Copy link
Copy Markdown
Contributor

Description

This PR continues moving the PostgreSQL integration tests from the VM and K8s charm repos into the single kernel library. Builds on #412.

It focuses on the tests that use pytest-operator in both repos. Each test is merged into a single version that runs on both substrates, and stays on pytest-operator for now, as in the charm repos.

What's included

  • Merged tests:
    • ha_tests/: test_smoke, test_replication, test_self_healing_1, test_self_healing_2, test_self_healing_3, test_synchronous_policy, test_logical_replication, test_logical_replication_circular.
    • new_relations/: test_new_relations_1, test_new_relations_2, test_relations_coherence.
  • Shared helpers: the helpers these tests need, merged from both repos.
  • CI: the new tests run on every PR, on VM and K8s.

How the merge was done

  • Where VM and K8s behave differently, the test branches on the substrate, keeping each repo's code as it was.
  • Tests that only existed in one repo run only on that substrate.

Not done yet

  • Migrating these tests from pytest-operator to jubilant will come in a later PR.

@xavipg003
xavipg003 added this pull request to stack #411 November 5, 2026 16:19
@xavipg003 xavipg003 closed this Nov 10, 2026
@xavipg003 xavipg003 reopened this Nov 10, 2026
@xavipg003
xavipg003 marked this pull request as ready for review November 12, 2026 11:32
@xavipg003
xavipg003 requested a review from a team as a code owner November 12, 2026 11:32
@xavipg003
xavipg003 removed the request for review from a team November 12, 2026 11:32
@xavipg003
xavipg003 force-pushed the dpe-11496-4 branch 2 times, most recently from c9a5689 to ad111ab Compare November 16, 2026 13:59
@xavipg003
xavipg003 force-pushed the dpe-11496-4 branch 2 times, most recently from f2a73e7 to bca7f3c Compare November 18, 2026 12:34
Base automatically changed from dpe-11496-3 to 16/edge November 19, 2026 08:13
@xavipg003
xavipg003 force-pushed the dpe-11496-4 branch 2 times, most recently from 9e125a8 to c4abf4a Compare November 19, 2026 09:17
Comment thread pyproject.toml
unit = [
"coverage[toml]==7.16.2",
"pytest==9.1.1"
"pytest==9.1.1",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NB: we should stick to 9.1 until we move away from pytest-operator.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Moving away from pytest-operator starting on PR #431.

Comment on lines -28 to -43
parser.addoption(
"--controller",
default=None,
help="Juju controller to use (defaults to the current one).",
)
parser.addoption(
"--model",
default=None,
help="Use this existing Juju model instead of creating a temporary one.",
)
parser.addoption(
"--keep-models",
action="store_true",
default=False,
help="Keep the temporary models after the tests finish.",
)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do those conflict with the pytest-operator defined ones? If not, I think we should keep them around, since the plan is to remove pytest-operator.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, they conflict. But in #445 they are added again when pytest-operator is removed.

assert application_connection_string != another_application_connection_string


# @pytest.mark.skip(reason="Unstable")

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should check if this is still unstable.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Checking locally, will uncomment on #444 if it seems stable.

@xavipg003
xavipg003 merged commit b1c00c7 into 16/edge Nov 20, 2026
600 of 627 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants