Skip to content

Commit

Permalink
Fixes for building charm (#201)
Browse files Browse the repository at this point in the history
* Ping pluggy version

* Fix tls tests

* Unpin pluggy version and change version of

data-platfom-workflow used in building charm

* Update configurations to work with the new GH runners

workflow

* Update pyproject.toml

Co-authored-by: Carl Csaposs <carl.csaposs@canonical.com>

---------

Co-authored-by: Carl Csaposs <carl.csaposs@canonical.com>
  • Loading branch information
dmitry-ratushnyy and carlcsaposs-canonical authored Sep 25, 2023
1 parent 3321534 commit 5610ceb
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 38 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:

build:
name: Build charms
uses: canonical/data-platform-workflows/.github/workflows/build_charms_with_cache.yaml@v2
uses: canonical/data-platform-workflows/.github/workflows/build_charms_with_cache.yaml@v5
with:
charmcraft-snap-revision: 1349 # version 2.3.0

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ We have also supported TLS for the MongoDB k8s charm. To enable TLS:

```shell
# deploy the TLS charm
juju deploy tls-certificates-operator --channel=edge
juju deploy tls-certificates-operator --channel=stable
# add the necessary configurations for TLS
juju config tls-certificates-operator generate-self-signed-certificates="true" ca-common-name="Test CA"
# to enable TLS relate the two applications
Expand Down
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ pytest = "^7.3.1"
pytest-mock = "^3.11.1"
pytest-operator = "^0.27.0"
juju = "2.9.44.0 || 3.2.0.1"
pytest-operator-cache = {git = "https://github.com/canonical/data-platform-workflows", tag = "v5", subdirectory = "python/pytest_plugins/pytest_operator_cache"}

[build-system]
requires = ["poetry-core>=1.0.0"]
Expand Down
28 changes: 0 additions & 28 deletions tests/integration/conftest.py

This file was deleted.

2 changes: 1 addition & 1 deletion tests/integration/tls_tests/test_tls.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ async def test_build_and_deploy(ops_test: OpsTest) -> None:

config = {"generate-self-signed-certificates": "true", "ca-common-name": "Test CA"}
await ops_test.model.deploy(
TLS_CERTIFICATES_APP_NAME, channel="beta", config=config, series="jammy"
TLS_CERTIFICATES_APP_NAME, channel="stable", config=config, series="jammy"
)
await ops_test.model.wait_for_idle(
apps=[TLS_CERTIFICATES_APP_NAME], status="active", timeout=1000
Expand Down
11 changes: 4 additions & 7 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,13 @@ commands =

[testenv:integration]
description = Run integration tests
set_env =
{[testenv]set_env}
# Workaround for https://github.com/python-poetry/poetry/issues/6958
POETRY_INSTALLER_PARALLEL = false
pass_env =
{[testenv]pass_env}
CI
CI_PACKED_CHARMS
commands_pre =
poetry install --with integration
poetry run pip install juju==2.9.44.0
Expand All @@ -76,7 +79,6 @@ description = Run HA integration tests
pass_env =
{[testenv]pass_env}
CI
CI_PACKED_CHARMS
commands_pre =
poetry install --with integration
poetry run pip install juju==2.9.44.0
Expand All @@ -88,7 +90,6 @@ description = Run metric integration tests
pass_env =
{[testenv]pass_env}
CI
CI_PACKED_CHARMS
commands_pre =
poetry install --with integration
poetry run pip install juju==2.9.44.0
Expand All @@ -101,7 +102,6 @@ description = Run tls integration tests
pass_env =
{[testenv]pass_env}
CI
CI_PACKED_CHARMS
commands_pre =
poetry install --with integration
poetry run pip install juju==2.9.44.0
Expand All @@ -113,7 +113,6 @@ description = Run relation integration tests
pass_env =
{[testenv]pass_env}
CI
CI_PACKED_CHARMS
commands_pre =
poetry install --with integration
poetry run pip install juju==2.9.44.0
Expand All @@ -125,7 +124,6 @@ description = Run tls integration tests
pass_env =
{[testenv]pass_env}
CI
CI_PACKED_CHARMS
commands_pre =
poetry install --with integration
poetry run pip install juju==2.9.44.0
Expand All @@ -137,7 +135,6 @@ description = Run backup integration tests
pass_env =
{[testenv]pass_env}
CI
CI_PACKED_CHARMS
commands_pre =
poetry install --with integration
poetry run pip install juju==3.2.0.1
Expand Down

0 comments on commit 5610ceb

Please sign in to comment.