mirror of
https://git.launchpad.net/~vhaudiquet/+git/flutter-artifacts-proxy
synced 2026-02-12 01:25:53 +00:00
27 lines
864 B
Python
27 lines
864 B
Python
# 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)"
|