Skip to content

Commit a713477

Browse files
authored
[DPE-9479] Test app channel and base/series (14/edge) (#1324)
* Test app channel and base/series * Typo * Switch to series * Switch base to series * Revert spread changes (storage is still in mnt) * Base to series * Typo * Remove test file
1 parent 24c7929 commit a713477

13 files changed

+22
-44
lines changed

tests/integration/ha_tests/test_async_replication.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
from .. import architecture, markers
1818
from ..helpers import (
1919
APPLICATION_NAME,
20-
CHARM_BASE,
2120
DATABASE_APP_NAME,
2221
build_and_deploy,
2322
get_leader_unit,
@@ -110,11 +109,9 @@ async def test_deploy_async_replication_setup(
110109
await build_and_deploy(ops_test, charm, CLUSTER_SIZE, wait_for_idle=False)
111110
await build_and_deploy(ops_test, charm, CLUSTER_SIZE, wait_for_idle=False, model=second_model)
112111
await ops_test.model.deploy(
113-
APPLICATION_NAME, channel="latest/edge", num_units=1, base=CHARM_BASE
114-
)
115-
await second_model.deploy(
116-
APPLICATION_NAME, channel="latest/edge", num_units=1, base=CHARM_BASE
112+
APPLICATION_NAME, channel="latest/edge", num_units=1, series="jammy"
117113
)
114+
await second_model.deploy(APPLICATION_NAME, channel="latest/edge", num_units=1, series="jammy")
118115

119116
async with ops_test.fast_forward(), fast_forward(second_model):
120117
await gather(

tests/integration/ha_tests/test_replication.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99

1010
from ..helpers import (
1111
APPLICATION_NAME,
12-
CHARM_BASE,
1312
DATABASE_APP_NAME,
1413
app_name,
1514
build_and_deploy,
@@ -43,8 +42,8 @@ async def test_build_and_deploy(ops_test: OpsTest, charm) -> None:
4342
await ops_test.model.deploy(
4443
APPLICATION_NAME,
4544
application_name=APPLICATION_NAME,
46-
base=CHARM_BASE,
47-
channel="edge",
45+
channel="latest/edge",
46+
series="jammy",
4847
)
4948

5049
if wait_for_apps:

tests/integration/ha_tests/test_restart.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,9 @@ async def test_deploy(ops_test: OpsTest, charm) -> None:
3636
"""Build and deploy a PostgreSQL cluster and a test application."""
3737
await build_and_deploy(ops_test, charm, CLUSTER_SIZE, wait_for_idle=False)
3838
if not await app_name(ops_test, APPLICATION_NAME):
39-
await ops_test.model.deploy(APPLICATION_NAME, num_units=1)
39+
await ops_test.model.deploy(
40+
APPLICATION_NAME, num_units=1, channel="latest/edge", series="jammy"
41+
)
4042

4143
await ops_test.model.relate(DATABASE_APP_NAME, f"{APPLICATION_NAME}:database")
4244

tests/integration/ha_tests/test_self_healing_1.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
from .. import markers
1212
from ..helpers import (
1313
APPLICATION_NAME,
14-
CHARM_BASE,
1514
DATABASE_APP_NAME,
1615
METADATA,
1716
app_name,
@@ -67,8 +66,8 @@ async def test_build_and_deploy(ops_test: OpsTest, charm) -> None:
6766
await ops_test.model.deploy(
6867
APPLICATION_NAME,
6968
application_name=APPLICATION_NAME,
70-
base=CHARM_BASE,
71-
channel="edge",
69+
channel="latest/edge",
70+
series="jammy",
7271
)
7372

7473
if wait_for_apps:

tests/integration/ha_tests/test_self_healing_2.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77

88
from ..helpers import (
99
APPLICATION_NAME,
10-
CHARM_BASE,
1110
DATABASE_APP_NAME,
1211
METADATA,
1312
app_name,
@@ -48,8 +47,8 @@ async def test_build_and_deploy(ops_test: OpsTest, charm) -> None:
4847
await ops_test.model.deploy(
4948
APPLICATION_NAME,
5049
application_name=APPLICATION_NAME,
51-
base=CHARM_BASE,
52-
channel="edge",
50+
channel="latest/edge",
51+
series="jammy",
5352
)
5453

5554
if wait_for_apps:

tests/integration/ha_tests/test_upgrade.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,7 @@ async def test_deploy_latest(ops_test: OpsTest) -> None:
4747
base=CHARM_BASE,
4848
),
4949
ops_test.model.deploy(
50-
APPLICATION_NAME,
51-
num_units=1,
52-
channel="latest/edge",
53-
base=CHARM_BASE,
50+
APPLICATION_NAME, num_units=1, channel="latest/edge", series="jammy"
5451
),
5552
)
5653
await ops_test.model.relate(DATABASE_APP_NAME, f"{APPLICATION_NAME}:database")

tests/integration/ha_tests/test_upgrade_from_stable.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,7 @@ async def test_deploy_stable(ops_test: OpsTest) -> None:
4444
base=CHARM_BASE,
4545
),
4646
ops_test.model.deploy(
47-
APPLICATION_NAME,
48-
num_units=1,
49-
channel="latest/edge",
50-
base=CHARM_BASE,
47+
APPLICATION_NAME, num_units=1, channel="latest/edge", series="jammy"
5148
),
5249
)
5350
await ops_test.model.relate(DATABASE_APP_NAME, f"{APPLICATION_NAME}:database")

tests/integration/new_relations/test_new_relations_1.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,8 @@ async def test_database_relation_with_charm_libraries(ops_test: OpsTest, charm):
4848
APPLICATION_APP_NAME,
4949
application_name=APPLICATION_APP_NAME,
5050
num_units=2,
51-
base=CHARM_BASE,
5251
channel="latest/edge",
52+
series="jammy",
5353
config={"extra_user_roles": "CREATEDB,CREATEROLE"},
5454
),
5555
ops_test.model.deploy(
@@ -187,8 +187,8 @@ async def test_two_applications_doesnt_share_the_same_relation_data(ops_test: Op
187187
await ops_test.model.deploy(
188188
APPLICATION_APP_NAME,
189189
application_name=another_application_app_name,
190-
base=CHARM_BASE,
191-
channel="edge",
190+
channel="latest/edge",
191+
series="jammy",
192192
)
193193

194194
# Relate the new application with the database

tests/integration/new_relations/test_new_relations_2.py

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,20 +16,12 @@
1616

1717
logger = logging.getLogger(__name__)
1818

19-
APPLICATION_APP_NAME = "postgresql-test-app"
2019
DATABASE_APP_NAME = "database"
2120
ANOTHER_DATABASE_APP_NAME = "another-database"
2221
DATA_INTEGRATOR_APP_NAME = "data-integrator"
2322
DISCOURSE_APP_NAME = "discourse-k8s"
2423
REDIS_APP_NAME = "redis-k8s"
25-
APP_NAMES = [APPLICATION_APP_NAME, DATABASE_APP_NAME, ANOTHER_DATABASE_APP_NAME]
2624
DATABASE_APP_METADATA = yaml.safe_load(Path("./metadata.yaml").read_text())
27-
FIRST_DATABASE_RELATION_NAME = "database"
28-
SECOND_DATABASE_RELATION_NAME = "second-database"
29-
MULTIPLE_DATABASE_CLUSTERS_RELATION_NAME = "multiple-database-clusters"
30-
ALIASED_MULTIPLE_DATABASE_CLUSTERS_RELATION_NAME = "aliased-multiple-database-clusters"
31-
NO_DATABASE_RELATION_NAME = "no-database"
32-
INVALID_EXTRA_USER_ROLE_BLOCKING_MESSAGE = "invalid role(s) for extra user roles"
3325

3426

3527
@pytest.mark.abort_on_fail

tests/integration/new_relations/test_relations_coherence.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717

1818
logger = logging.getLogger(__name__)
1919

20-
APPLICATION_APP_NAME = "postgresql-test-app"
2120
APP_NAMES = [DATABASE_APP_NAME, DATA_INTEGRATOR_APP_NAME]
2221
FIRST_DATABASE_RELATION_NAME = "database"
2322

0 commit comments

Comments
 (0)