Skip to content

Commit

Permalink
Workaround fixing integration tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Gmerold committed Oct 10, 2023
1 parent 291ddd6 commit c04fba1
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 10 deletions.
2 changes: 1 addition & 1 deletion .github/actions/ec2-github-runner/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,5 +83,5 @@ outputs:
EC2 Instance Id of the created runner.
The id is used to terminate the EC2 instance when the runner is not needed anymore.
runs:
using: node12
using: node16
main: ./dist/index.js
3 changes: 3 additions & 0 deletions .github/workflows/integration-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,9 @@ jobs:
echo "# Install Juju"
snap install juju --channel=3.1/stable
echo "# Install juju-crashdump"
snap install --classic juju-crashdump
echo "# Install charmcraft"
snap install charmcraft --classic
Expand Down
12 changes: 8 additions & 4 deletions tests/integration/fixtures.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,10 +87,14 @@ async def deploy_cos_lite(ops_test: OpsTest):
)

with ops_test.model_context(COS_MODEL_NAME):
await ops_test.model.deploy( # type: ignore[union-attr]
entity_url="https://charmhub.io/cos-lite",
trust=True,
)
deploy_cos_lite_run_args = ["juju", "deploy", "cos-lite", "--trust"]
retcode, stdout, stderr = await ops_test.run(*deploy_cos_lite_run_args)
if retcode != 0:
raise RuntimeError(f"Error: {stderr}")
# await ops_test.model.deploy( # type: ignore[union-attr]
# entity_url="https://charmhub.io/cos-lite",
# trust=True,
# )
await ops_test.model.wait_for_idle( # type: ignore[union-attr]
apps=[*ops_test.model.applications], # type: ignore[union-attr]
raise_on_error=False,
Expand Down
14 changes: 9 additions & 5 deletions tests/integration/test_integration.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,15 @@ async def _deploy_sdcore(self, ops_test: OpsTest):
ops_test: OpsTest
"""
await self._deploy_sdcore_router(ops_test)
await ops_test.model.deploy( # type: ignore[union-attr]
entity_url="https://charmhub.io/sdcore",
channel="latest/edge",
trust=True,
)
deploy_sd_core_run_args = ["juju", "deploy", "sd-core", "--trust", "--channel=edge"]
retcode, stdout, stderr = await ops_test.run(*deploy_sd_core_run_args)
if retcode != 0:
raise RuntimeError(f"Error: {stderr}")
# await ops_test.model.deploy( # type: ignore[union-attr]
# entity_url="https://charmhub.io/sdcore",
# channel="latest/edge",
# trust=True,
# )

await self._create_cross_model_relation(
ops_test,
Expand Down

0 comments on commit c04fba1

Please sign in to comment.