Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tests: build charms sequentially #534

Draft
wants to merge 1 commit into
base: track/1.17
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions tests/test_bundle.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,13 +80,14 @@ async def test_kubectl_access(ops_test: OpsTest):
async def test_build_and_deploy_istio_charms(ops_test: OpsTest):
# Build, deploy, and relate istio charms
charms_path = "./charms/istio"
istio_charms = await ops_test.build_charms(f"{charms_path}-gateway", f"{charms_path}-pilot")
istio_pilot = await ops_test.build_charm(f"{charms_path}-pilot")
istio_gateway = await ops_test.build_charm(f"{charms_path}-gateway")

await ops_test.model.deploy(
istio_charms["istio-pilot"], application_name=ISTIO_PILOT, series="focal", trust=True
istio_pilot, application_name=ISTIO_PILOT, series="focal", trust=True
)
await ops_test.model.deploy(
istio_charms["istio-gateway"],
istio_gateway,
application_name=ISTIO_GATEWAY_APP_NAME,
series="focal",
config={"kind": "ingress"},
Expand Down
12 changes: 5 additions & 7 deletions tests/test_bundle_tls_provider.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,18 +29,16 @@ def lightkube_client() -> lightkube.Client:
async def test_build_and_deploy_istio_charms(ops_test: OpsTest):
"""Build and deploy istio-operators with TLS configuration."""
charms_path = "./charms/istio"
istio_charms = await ops_test.build_charms(f"{charms_path}-gateway", f"{charms_path}-pilot")
istio_pilot = await ops_test.build_charm(f"{charms_path}-pilot")
istio_gateway = await ops_test.build_charm(f"{charms_path}-gateway")

await ops_test.model.deploy(
istio_charms["istio-pilot"],
application_name=ISTIO_PILOT,
config={"default-gateway": DEFAULT_GATEWAY_NAME},
trust=True,
istio_pilot, application_name=ISTIO_PILOT, series="focal", trust=True
)

await ops_test.model.deploy(
istio_charms["istio-gateway"],
istio_gateway,
application_name=ISTIO_GATEWAY_APP_NAME,
series="focal",
config={"kind": "ingress"},
trust=True,
)
Expand Down
12 changes: 5 additions & 7 deletions tests/test_bundle_tls_secret.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,18 +26,16 @@ def lightkube_client() -> lightkube.Client:
async def test_build_and_deploy_istio_charms(ops_test: OpsTest):
"""Build and deploy istio-operators with TLS configuration."""
charms_path = "./charms/istio"
istio_charms = await ops_test.build_charms(f"{charms_path}-gateway", f"{charms_path}-pilot")
istio_pilot = await ops_test.build_charm(f"{charms_path}-pilot")
istio_gateway = await ops_test.build_charm(f"{charms_path}-gateway")

await ops_test.model.deploy(
istio_charms["istio-pilot"],
application_name=ISTIO_PILOT,
config={"default-gateway": DEFAULT_GATEWAY_NAME},
trust=True,
istio_pilot, application_name=ISTIO_PILOT, series="focal", trust=True
)

await ops_test.model.deploy(
istio_charms["istio-gateway"],
istio_gateway,
application_name=ISTIO_GATEWAY_APP_NAME,
series="focal",
config={"kind": "ingress"},
trust=True,
)
Expand Down
7 changes: 4 additions & 3 deletions tests/test_cos_integration.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,14 @@
async def test_build_and_deploy_istio_charms(ops_test: OpsTest):
# Build, deploy, and relate istio charms
charms_path = "./charms/istio"
istio_charms = await ops_test.build_charms(f"{charms_path}-gateway", f"{charms_path}-pilot")
istio_pilot = await ops_test.build_charm(f"{charms_path}-pilot")
istio_gateway = await ops_test.build_charm(f"{charms_path}-gateway")

await ops_test.model.deploy(
istio_charms["istio-pilot"], application_name=ISTIO_PILOT, series="focal", trust=True
istio_pilot, application_name=ISTIO_PILOT, series="focal", trust=True
)
await ops_test.model.deploy(
istio_charms["istio-gateway"],
istio_gateway,
application_name=ISTIO_GATEWAY_APP_NAME,
series="focal",
config={"kind": "ingress"},
Expand Down
Loading