Initial commit

This commit is contained in:
2026-02-06 23:52:26 +01:00
commit f1c539519e
14 changed files with 1320 additions and 0 deletions

View File

@@ -0,0 +1,26 @@
# Copyright 2026 Valentin Haudiquet
# See LICENSE file for licensing details.
#
# The integration tests use the Jubilant library. See https://documentation.ubuntu.com/jubilant/
# To learn more about testing, see https://documentation.ubuntu.com/ops/latest/explanation/testing/
import logging
import pathlib
import jubilant
logger = logging.getLogger(__name__)
def test_deploy(charm: pathlib.Path, juju: jubilant.Juju):
"""Deploy the charm under test."""
juju.deploy(charm.resolve(), app="charmed-server")
juju.wait(jubilant.all_active)
def test_workload_version_is_set(charm: pathlib.Path, juju: jubilant.Juju):
"""Check that the correct version of the workload is running."""
version = juju.status().apps["charmed-server"].version
assert version is not None
assert len(version) > 0
assert version == "nginx/1.18.0 (Ubuntu)"