|
4 | 4 | import logging |
5 | 5 | import secrets |
6 | 6 | import string |
| 7 | +from asyncio import gather |
7 | 8 |
|
8 | 9 | import psycopg2 |
9 | 10 | import pytest |
|
26 | 27 | async def test_relations(ops_test: OpsTest, charm): |
27 | 28 | """Test that check relation data.""" |
28 | 29 | async with ops_test.fast_forward(): |
29 | | - await ops_test.model.deploy( |
30 | | - charm, |
31 | | - application_name=DATABASE_APP_NAME, |
32 | | - num_units=1, |
33 | | - base=CHARM_BASE, |
34 | | - config={"profile": "testing"}, |
| 30 | + await gather( |
| 31 | + ops_test.model.deploy( |
| 32 | + charm, |
| 33 | + application_name=DATABASE_APP_NAME, |
| 34 | + num_units=1, |
| 35 | + base=CHARM_BASE, |
| 36 | + config={"profile": "testing"}, |
| 37 | + ), |
| 38 | + # Creating first time relation with user role |
| 39 | + # Base is ignored |
| 40 | + ops_test.model.deploy(DATA_INTEGRATOR_APP_NAME, series="jammy"), |
35 | 41 | ) |
36 | | - await ops_test.model.wait_for_idle(apps=[DATABASE_APP_NAME], status="active", timeout=3000) |
37 | | - |
38 | | - # Creating first time relation with user role |
39 | | - await ops_test.model.deploy(DATA_INTEGRATOR_APP_NAME, base=CHARM_BASE) |
40 | 42 | await ops_test.model.applications[DATA_INTEGRATOR_APP_NAME].set_config({ |
41 | 43 | "database-name": DATA_INTEGRATOR_APP_NAME.replace("-", "_"), |
42 | 44 | }) |
43 | 45 | await ops_test.model.add_relation(DATA_INTEGRATOR_APP_NAME, DATABASE_APP_NAME) |
44 | | - await ops_test.model.wait_for_idle(apps=APP_NAMES, status="active") |
| 46 | + await ops_test.model.wait_for_idle(apps=APP_NAMES, status="active", timeout=1500) |
45 | 47 |
|
46 | 48 | connection_string = await build_connection_string( |
47 | 49 | ops_test, |
|
0 commit comments