From 843c5d8be39f4b54309947f63727dfee722cb105 Mon Sep 17 00:00:00 2001 From: Dima Tisnek Date: Wed, 16 Oct 2024 14:53:58 +0900 Subject: [PATCH] ci: don't merge, testing juju 3.6 only --- .github/workflows/test.yaml | 8 ++++---- juju/client/connection.py | 1 + tests/integration/test_application.py | 22 ++++++++++++++++++++++ 3 files changed, 27 insertions(+), 4 deletions(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 276005f6..2c092411 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -97,6 +97,7 @@ jobs: timeout-minutes: 150 runs-on: ubuntu-latest strategy: + fail-fast: false matrix: python: # We will reduce the workload to 3.10 to @@ -113,8 +114,7 @@ jobs: # * test_destroy_unit # * test_ssh # * ... - # - "3.6/beta" - continue-on-error: false # ultimately fail a run if one of the matrix combinations fails + - "3.6/beta" steps: - name: Check out code uses: actions/checkout@v4 @@ -166,6 +166,7 @@ jobs: timeout-minutes: 150 runs-on: ubuntu-latest strategy: + fail-fast: false matrix: python: - "3.10" @@ -174,10 +175,9 @@ jobs: - "3.3/stable" - "3.4/stable" - "3.5/stable" - continue-on-error: false # ultimately fail the run if one of the matrix combinations fails steps: - name: Check out code - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Setup Python uses: actions/setup-python@v5 with: diff --git a/juju/client/connection.py b/juju/client/connection.py index c39e0d77..a048fbd9 100644 --- a/juju/client/connection.py +++ b/juju/client/connection.py @@ -579,6 +579,7 @@ async def rpc(self, msg, encoder=None): raise result = await self._recv(msg['request-id']) log.debug('connection id : {} <--- {}'.format(id(self), result)) + log.warning("DUMP\n%s\n%s", outgoing, result) if not result: return result diff --git a/tests/integration/test_application.py b/tests/integration/test_application.py index b33d9975..810a35bb 100644 --- a/tests/integration/test_application.py +++ b/tests/integration/test_application.py @@ -102,10 +102,32 @@ async def test_add_units(): assert isinstance(unit, Unit) +@pytest.mark.parametrize("thebase", [ + None, + "ubuntu@15.04", + "ubuntu@15.04/stable", + "ubuntu@19.04", + "ubuntu@19.04/stable", + "ubuntu@20.04", + "ubuntu@20.04/stable", + "ubuntu@24.04", + "ubuntu@24.04/stable", + ]) +@base.bootstrapped +async def test_deploy_charmhub_charm_ex(thebase: str): + async with base.CleanModel() as model: + app = await model.deploy('ubuntu', base=thebase) + assert False, "fail on purpose to get the logs" + await model.block_until(lambda: (len(app.units) > 0 and + app.units[0].machine)) + assert 'ubuntu' in app.data['charm-url'] + + @base.bootstrapped async def test_deploy_charmhub_charm(): async with base.CleanModel() as model: app = await model.deploy('ubuntu') + assert False, "fail on purpose to get the logs" await model.block_until(lambda: (len(app.units) > 0 and app.units[0].machine)) assert 'ubuntu' in app.data['charm-url']