Skip to content

Commit

Permalink
adapt test_subordinates to remove ubuntu pro charm
Browse files Browse the repository at this point in the history
  • Loading branch information
lucasgameiroborges committed Nov 22, 2024
1 parent e27901a commit e4b8953
Showing 1 changed file with 3 additions and 16 deletions.
19 changes: 3 additions & 16 deletions tests/integration/test_subordinates.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@

DATABASE_APP_NAME = "pg"
LS_CLIENT = "landscape-client"
UBUNTU_PRO_APP_NAME = "ubuntu-advantage"

logger = logging.getLogger(__name__)

Expand All @@ -30,13 +29,6 @@ async def test_deploy(ops_test: OpsTest, charm: str, github_secrets):
num_units=3,
base=CHARM_BASE,
),
ops_test.model.deploy(
UBUNTU_PRO_APP_NAME,
config={"token": github_secrets["UBUNTU_PRO_TOKEN"]},
channel="latest/edge",
num_units=0,
base=CHARM_BASE,
),
ops_test.model.deploy(
LS_CLIENT,
config={
Expand All @@ -51,20 +43,15 @@ async def test_deploy(ops_test: OpsTest, charm: str, github_secrets):

await ops_test.model.wait_for_idle(apps=[DATABASE_APP_NAME], status="active", timeout=2000)
await ops_test.model.relate(f"{DATABASE_APP_NAME}:juju-info", f"{LS_CLIENT}:container")
await ops_test.model.relate(
f"{DATABASE_APP_NAME}:juju-info", f"{UBUNTU_PRO_APP_NAME}:juju-info"
)
await ops_test.model.wait_for_idle(
apps=[LS_CLIENT, UBUNTU_PRO_APP_NAME, DATABASE_APP_NAME], status="active"
)
await ops_test.model.wait_for_idle(apps=[LS_CLIENT, DATABASE_APP_NAME], status="active")


@pytest.mark.group(1)
async def test_scale_up(ops_test: OpsTest, github_secrets):
await scale_application(ops_test, DATABASE_APP_NAME, 4)

await ops_test.model.wait_for_idle(
apps=[LS_CLIENT, UBUNTU_PRO_APP_NAME, DATABASE_APP_NAME], status="active", timeout=1500
apps=[LS_CLIENT, DATABASE_APP_NAME], status="active", timeout=1500
)


Expand All @@ -73,5 +60,5 @@ async def test_scale_down(ops_test: OpsTest, github_secrets):
await scale_application(ops_test, DATABASE_APP_NAME, 3)

await ops_test.model.wait_for_idle(
apps=[LS_CLIENT, UBUNTU_PRO_APP_NAME, DATABASE_APP_NAME], status="active", timeout=1500
apps=[LS_CLIENT, DATABASE_APP_NAME], status="active", timeout=1500
)

0 comments on commit e4b8953

Please sign in to comment.