diff --git a/.github/renovate.json5 b/.github/renovate.json5 index 31a6b6d08c..64aa6c35bd 100644 --- a/.github/renovate.json5 +++ b/.github/renovate.json5 @@ -4,88 +4,9 @@ "reviewers": ["dragomirp", "marceloneppel", "taurus-forever"], "packageRules": [ // Later rules override earlier rules - { - "matchManagers": ["poetry", "pip_requirements", "regex"], - "matchDatasources": ["pypi"], - "excludePackageNames": ["juju", "libjuju 2", "libjuju 3"], - "groupName": "Python dependencies" - }, { - "matchManagers": ["github-actions"], - "groupName": "GitHub actions" - }, { - "matchDepNames": ["Juju 3"], - "matchPackageNames": ["juju/juju"], - "allowedVersions": "<3.2.0", - "extractVersion": "^juju-(?.*)$", - "groupName": "Juju 3" - }, { - "matchDepNames": ["Juju 2"], - "matchPackageNames": ["juju/juju"], - "allowedVersions": "<3.0.0", - "extractVersion": "^juju-(?.*)$", - "groupName": "Juju 2" - }, { - "matchDepNames": ["libjuju 3"], - "matchPackageNames": ["juju"], - "matchDatasources": ["pypi"], - "allowedVersions": "<4.0.0", - "groupName": "Juju 3" - }, { - "matchDepNames": ["libjuju 2"], - "matchPackageNames": ["juju"], - "matchDatasources": ["pypi"], - "allowedVersions": "<3.0.0", - "groupName": "Juju 2" - }, { - # Doesn't build on focal, pinned in charm libs - "matchPackageNames": ["pydantic"], - "allowedVersions": "<2.0.0" - } ], "regexManagers": [ { - "fileMatch": ["^(workflow-templates|\\.github/workflows)/[^/]+\\.ya?ml$"], - "matchStrings": ["(- | agent-versions: )\"(?.*?)\" +# renovate: latest juju 2"], - "depNameTemplate": "Juju 2", - "packageNameTemplate": "juju/juju", - "datasourceTemplate": "github-releases", - "versioningTemplate": "loose", - "extractVersionTemplate": "Juju release" - }, { - "fileMatch": ["^(workflow-templates|\\.github/workflows)/[^/]+\\.ya?ml$"], - "matchStrings": ["(- | agent-versions: )\"(?.*?)\" +# renovate: latest juju 3"], - "depNameTemplate": "Juju 3", - "packageNameTemplate": "juju/juju", - "datasourceTemplate": "github-releases", - "versioningTemplate": "loose", - "extractVersionTemplate": "Juju release" - }, { - "fileMatch": [ - "(^|/)pyproject\\.toml$", - "(^|/)tox\\.ini$" - ], - "matchStrings": [ - "juju = \".* \\|\\| (?.*?)\" *# renovate libjuju", - "LIBJUJU=\"(?.*?)\" *# libjuju3" - ], - "depNameTemplate": "libjuju 3", - "packageNameTemplate": "juju", - "datasourceTemplate": "pypi", - "versioningTemplate": "loose", - }, { - "fileMatch": [ - "(^|/)pyproject\\.toml$", - "(^|/)tox\\.ini$" - ], - "matchStrings": [ - "juju = \"(?.*?) \\|\\| .*\" *# renovate libjuju", - "LIBJUJU=\"(?.*?)\" *# libjuju2" - ], - "depNameTemplate": "libjuju 2", - "packageNameTemplate": "juju", - "datasourceTemplate": "pypi", - "versioningTemplate": "loose", - }, { "fileMatch": ["(^|/)([\\w-]*)charmcraft\\.ya?ml$"], "matchStrings": ["- (?.*?)(?:\\[.*?\\])?==(?.*?) +# renovate"], "datasourceTemplate": "pypi", diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 59fff5aa1d..663683ef8e 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -46,69 +46,39 @@ jobs: permissions: actions: write # Needed to manage GitHub Actions cache - gh-hosted-collect-integration-tests: - name: (GH hosted) Collect integration test groups - needs: - - lint - - unit-test - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v3 - - name: Install tox & poetry - run: | - pipx install tox - pipx install poetry - - name: Select test stability level - id: select-test-stability - run: | - if [[ "${{ github.event_name }}" == "schedule" ]] - then - echo Running unstable and stable tests - echo "mark_expression=" >> "$GITHUB_OUTPUT" - else - echo Skipping unstable tests - echo "mark_expression=not unstable" >> "$GITHUB_OUTPUT" - fi - - name: Collect test groups - id: collect-groups - run: tox run -e integration -- tests/integration -m '${{ steps.select-test-stability.outputs.mark_expression }}' --collect-groups - outputs: - groups: ${{ steps.collect-groups.outputs.groups }} - gh-hosted-integration-test: strategy: fail-fast: false matrix: - groups: ${{ fromJSON(needs.gh-hosted-collect-integration-tests.outputs.groups) }} + tox-environment: + - backup-integration + - charm-integration + - db-relation-integration + - ha-replication-integration + - ha-self-healing-integration + - ha-restore-cluster-integration + - password-rotation-integration + - plugins-integration + - tls-integration + - upgrade-integration + - upgrade-from-stable-integration + - database-relation-integration + - db-admin-relation-integration juju-snap-channel: ["2.9/stable", "3.1/stable"] + free-disk-space: + - false include: - juju-snap-channel: "3.1/stable" agent-version: "3.1.6" libjuju-version: "3.2.2" - juju-snap-channel: "2.9/stable" agent-version: "2.9.45" - libjuju-version: "2.9.44.1" - exclude: - # Disabling HA tests, as long as we want to have a limited pipeline on Juju3 - - juju-snap-channel: "3.1/stable" - groups: - job_name: "high_availability/test_replication.py | group 1" - - juju-snap-channel: "3.1/stable" - groups: - job_name: "high_availability/test_self_healing.py | group 1" - - juju-snap-channel: "3.1/stable" - groups: - job_name: "high_availability/test_upgrade.py | group 1" - - juju-snap-channel: "3.1/stable" - groups: - job_name: "high_availability/test_upgrade_from_stable.py | group 1" - name: ${{ matrix.juju-snap-channel }} - (GH hosted) ${{ matrix.groups.job_name }} + libjuju-version: "2.9.45.0" + name: ${{ matrix.juju-snap-channel }} - (GH hosted) ${{ matrix.tox-environment }} needs: - lint - unit-test - build - - gh-hosted-collect-integration-tests runs-on: ubuntu-latest timeout-minutes: 120 steps: @@ -118,6 +88,13 @@ jobs: run: | pipx install tox pipx install poetry + - name: Free up disk space + run: | + # From https://github.com/actions/runner-images/issues/2840#issuecomment-790492173 + sudo rm -rf /usr/share/dotnet + sudo rm -rf /opt/ghc + sudo rm -rf /usr/local/share/boost + sudo rm -rf "$AGENT_TOOLSDIRECTORY" - name: Setup operator environment uses: charmed-kubernetes/actions-operator@main with: @@ -126,7 +103,7 @@ jobs: bootstrap-options: "--agent-version ${{ matrix.agent-version }}" juju-channel: ${{ matrix.juju-snap-channel }} - name: Update python-libjuju version - if: ${{ matrix.libjuju-version == '2.9.44.1' }} + if: ${{ matrix.libjuju-version == '2.9.45.0' }} run: poetry add --lock --group integration juju@'${{ matrix.libjuju-version }}' - name: Download packed charm(s) uses: actions/download-artifact@v3 @@ -144,7 +121,7 @@ jobs: echo "mark_expression=and not unstable" >> "$GITHUB_OUTPUT" fi - name: Run integration tests - run: tox run -e integration -- "${{ matrix.groups.path_to_test_file }}" --group="${{ matrix.groups.group_number }}" -m '${{ steps.select-test-stability.outputs.mark_expression }}' + run: tox run -e ${{ matrix.tox-environment }} -- -m 'test ${{ steps.select-test-stability.outputs.mark_expression }}' --keep-models env: LIBJUJU_VERSION_SPECIFIER: ${{ matrix.libjuju-version }} SECRETS_FROM_GITHUB: | diff --git a/poetry.lock b/poetry.lock index bf77ceaeac..6d068732c6 100644 --- a/poetry.lock +++ b/poetry.lock @@ -13,20 +13,21 @@ files = [ [[package]] name = "asttokens" -version = "2.4.0" +version = "2.4.1" description = "Annotate AST trees with source code positions" optional = false python-versions = "*" files = [ - {file = "asttokens-2.4.0-py2.py3-none-any.whl", hash = "sha256:cf8fc9e61a86461aa9fb161a14a0841a03c405fa829ac6b202670b3495d2ce69"}, - {file = "asttokens-2.4.0.tar.gz", hash = "sha256:2e0171b991b2c959acc6c49318049236844a5da1d65ba2672c4880c1c894834e"}, + {file = "asttokens-2.4.1-py2.py3-none-any.whl", hash = "sha256:051ed49c3dcae8913ea7cd08e46a606dba30b79993209636c4875bc1d637bc24"}, + {file = "asttokens-2.4.1.tar.gz", hash = "sha256:b03869718ba9a6eb027e134bfdf69f38a236d681c83c160d510768af11254ba0"}, ] [package.dependencies] six = ">=1.12.0" [package.extras] -test = ["astroid", "pytest"] +astroid = ["astroid (>=1,<2)", "astroid (>=2,<4)"] +test = ["astroid (>=1,<2)", "astroid (>=2,<4)", "pytest"] [[package]] name = "attrs" @@ -135,17 +136,17 @@ uvloop = ["uvloop (>=0.15.2)"] [[package]] name = "boto3" -version = "1.28.70" +version = "1.28.72" description = "The AWS SDK for Python" optional = false python-versions = ">= 3.7" files = [ - {file = "boto3-1.28.70-py3-none-any.whl", hash = "sha256:22ec3b54801c81746657827c7b1c4a3b2e4cfa7c21be3b96218d32e9390ee5eb"}, - {file = "boto3-1.28.70.tar.gz", hash = "sha256:89002e1d8411c7c54110f9f8fc4a11d57d6d7977c0cb4ba064887ca5d4c788f7"}, + {file = "boto3-1.28.72-py3-none-any.whl", hash = "sha256:73e2b56dcbe1b856274185c908dcb5973b007d62c74b646e6bd2ac09a303983a"}, + {file = "boto3-1.28.72.tar.gz", hash = "sha256:cc7d939cdbb4ad3980274c96c589e95f028f740ac49a3547c8f4aaec6a7a6409"}, ] [package.dependencies] -botocore = ">=1.31.70,<1.32.0" +botocore = ">=1.31.72,<1.32.0" jmespath = ">=0.7.1,<2.0.0" s3transfer = ">=0.7.0,<0.8.0" @@ -154,13 +155,13 @@ crt = ["botocore[crt] (>=1.21.0,<2.0a0)"] [[package]] name = "botocore" -version = "1.31.70" +version = "1.31.72" description = "Low-level, data-driven core of boto 3." optional = false python-versions = ">= 3.7" files = [ - {file = "botocore-1.31.70-py3-none-any.whl", hash = "sha256:049bbf526c95b6169f59617a5ff1b0061cb7a0e44992b8c27c6955832b383988"}, - {file = "botocore-1.31.70.tar.gz", hash = "sha256:5f49def4ec2e4216dd0195d23d9811027d02ee6c8a37b031e2b2fe38e8c77ddc"}, + {file = "botocore-1.31.72-py3-none-any.whl", hash = "sha256:1a0f5063a9a5e1ef40907c67778625cf14a8c47c8e09cd2b3f9dc53a8adb52cf"}, + {file = "botocore-1.31.72.tar.gz", hash = "sha256:37763f40c2fcc48114015fe43bbd75ec1aabef48b418e1a5e28cb1c350967260"}, ] [package.dependencies] @@ -766,12 +767,12 @@ referencing = ">=0.28.0" [[package]] name = "juju" -version = "3.2.2" +version = "3.2.3.0" description = "Python library for Juju" optional = false python-versions = "*" files = [ - {file = "juju-3.2.2.tar.gz", hash = "sha256:b6f51c62b605bc8bd56842892d31cdb91d26879e49641380cd67c423f69fb1bb"}, + {file = "juju-3.2.3.0.tar.gz", hash = "sha256:d24973a232b0bcd32aaa732f9367d199a133063cf85b2ebf2b8497e31490bf8a"}, ] [package.dependencies] @@ -1170,6 +1171,8 @@ files = [ {file = "psycopg2-2.9.9-cp310-cp310-win_amd64.whl", hash = "sha256:426f9f29bde126913a20a96ff8ce7d73fd8a216cfb323b1f04da402d452853c3"}, {file = "psycopg2-2.9.9-cp311-cp311-win32.whl", hash = "sha256:ade01303ccf7ae12c356a5e10911c9e1c51136003a9a1d92f7aa9d010fb98372"}, {file = "psycopg2-2.9.9-cp311-cp311-win_amd64.whl", hash = "sha256:121081ea2e76729acfb0673ff33755e8703d45e926e416cb59bae3a86c6a4981"}, + {file = "psycopg2-2.9.9-cp312-cp312-win32.whl", hash = "sha256:d735786acc7dd25815e89cc4ad529a43af779db2e25aa7c626de864127e5a024"}, + {file = "psycopg2-2.9.9-cp312-cp312-win_amd64.whl", hash = "sha256:a7653d00b732afb6fc597e29c50ad28087dcb4fbfb28e86092277a559ae4e693"}, {file = "psycopg2-2.9.9-cp37-cp37m-win32.whl", hash = "sha256:5e0d98cade4f0e0304d7d6f25bbfbc5bd186e07b38eac65379309c4ca3193efa"}, {file = "psycopg2-2.9.9-cp37-cp37m-win_amd64.whl", hash = "sha256:7e2dacf8b009a1c1e843b5213a87f7c544b2b042476ed7755be813eaf4e8347a"}, {file = "psycopg2-2.9.9-cp38-cp38-win32.whl", hash = "sha256:ff432630e510709564c01dafdbe996cb552e0b9f3f065eb89bdce5bd31fabf4c"}, @@ -1511,6 +1514,7 @@ files = [ {file = "PyYAML-6.0.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:69b023b2b4daa7548bcfbd4aa3da05b3a74b772db9e23b982788168117739938"}, {file = "PyYAML-6.0.1-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:81e0b275a9ecc9c0c0c07b4b90ba548307583c125f54d5b6946cfee6360c733d"}, {file = "PyYAML-6.0.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ba336e390cd8e4d1739f42dfe9bb83a3cc2e80f567d8805e11b46f4a943f5515"}, + {file = "PyYAML-6.0.1-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:326c013efe8048858a6d312ddd31d56e468118ad4cdeda36c719bf5bb6192290"}, {file = "PyYAML-6.0.1-cp310-cp310-win32.whl", hash = "sha256:bd4af7373a854424dabd882decdc5579653d7868b8fb26dc7d0e99f823aa5924"}, {file = "PyYAML-6.0.1-cp310-cp310-win_amd64.whl", hash = "sha256:fd1592b3fdf65fff2ad0004b5e363300ef59ced41c2e6b3a99d4089fa8c5435d"}, {file = "PyYAML-6.0.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:6965a7bc3cf88e5a1c3bd2e0b5c22f8d677dc88a455344035f03399034eb3007"}, @@ -1518,8 +1522,15 @@ files = [ {file = "PyYAML-6.0.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:42f8152b8dbc4fe7d96729ec2b99c7097d656dc1213a3229ca5383f973a5ed6d"}, {file = "PyYAML-6.0.1-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:062582fca9fabdd2c8b54a3ef1c978d786e0f6b3a1510e0ac93ef59e0ddae2bc"}, {file = "PyYAML-6.0.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d2b04aac4d386b172d5b9692e2d2da8de7bfb6c387fa4f801fbf6fb2e6ba4673"}, + {file = "PyYAML-6.0.1-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:e7d73685e87afe9f3b36c799222440d6cf362062f78be1013661b00c5c6f678b"}, {file = "PyYAML-6.0.1-cp311-cp311-win32.whl", hash = "sha256:1635fd110e8d85d55237ab316b5b011de701ea0f29d07611174a1b42f1444741"}, {file = "PyYAML-6.0.1-cp311-cp311-win_amd64.whl", hash = "sha256:bf07ee2fef7014951eeb99f56f39c9bb4af143d8aa3c21b1677805985307da34"}, + {file = "PyYAML-6.0.1-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:855fb52b0dc35af121542a76b9a84f8d1cd886ea97c84703eaa6d88e37a2ad28"}, + {file = "PyYAML-6.0.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:40df9b996c2b73138957fe23a16a4f0ba614f4c0efce1e9406a184b6d07fa3a9"}, + {file = "PyYAML-6.0.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6c22bec3fbe2524cde73d7ada88f6566758a8f7227bfbf93a408a9d86bcc12a0"}, + {file = "PyYAML-6.0.1-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:8d4e9c88387b0f5c7d5f281e55304de64cf7f9c0021a3525bd3b1c542da3b0e4"}, + {file = "PyYAML-6.0.1-cp312-cp312-win32.whl", hash = "sha256:d483d2cdf104e7c9fa60c544d92981f12ad66a457afae824d146093b8c294c54"}, + {file = "PyYAML-6.0.1-cp312-cp312-win_amd64.whl", hash = "sha256:0d3304d8c0adc42be59c5f8a4d9e3d7379e6955ad754aa9d6ab7a398b59dd1df"}, {file = "PyYAML-6.0.1-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:50550eb667afee136e9a77d6dc71ae76a44df8b3e51e41b77f6de2932bfe0f47"}, {file = "PyYAML-6.0.1-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:1fe35611261b29bd1de0070f0b2f47cb6ff71fa6595c077e42bd0c419fa27b98"}, {file = "PyYAML-6.0.1-cp36-cp36m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:704219a11b772aea0d8ecd7058d0082713c3562b4e271b849ad7dc4a5c90c13c"}, @@ -1536,6 +1547,7 @@ files = [ {file = "PyYAML-6.0.1-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a0cd17c15d3bb3fa06978b4e8958dcdc6e0174ccea823003a106c7d4d7899ac5"}, {file = "PyYAML-6.0.1-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:28c119d996beec18c05208a8bd78cbe4007878c6dd15091efb73a30e90539696"}, {file = "PyYAML-6.0.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7e07cbde391ba96ab58e532ff4803f79c4129397514e1413a7dc761ccd755735"}, + {file = "PyYAML-6.0.1-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:49a183be227561de579b4a36efbb21b3eab9651dd81b1858589f796549873dd6"}, {file = "PyYAML-6.0.1-cp38-cp38-win32.whl", hash = "sha256:184c5108a2aca3c5b3d3bf9395d50893a7ab82a38004c8f61c258d4428e80206"}, {file = "PyYAML-6.0.1-cp38-cp38-win_amd64.whl", hash = "sha256:1e2722cc9fbb45d9b87631ac70924c11d3a401b2d7f410cc0e3bbf249f2dca62"}, {file = "PyYAML-6.0.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:9eb6caa9a297fc2c2fb8862bc5370d0303ddba53ba97e71f08023b6cd73d16a8"}, @@ -1543,6 +1555,7 @@ files = [ {file = "PyYAML-6.0.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:5773183b6446b2c99bb77e77595dd486303b4faab2b086e7b17bc6bef28865f6"}, {file = "PyYAML-6.0.1-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:b786eecbdf8499b9ca1d697215862083bd6d2a99965554781d0d8d1ad31e13a0"}, {file = "PyYAML-6.0.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:bc1bf2925a1ecd43da378f4db9e4f799775d6367bdb94671027b73b393a7c42c"}, + {file = "PyYAML-6.0.1-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:04ac92ad1925b2cff1db0cfebffb6ffc43457495c9b3c39d3fcae417d7125dc5"}, {file = "PyYAML-6.0.1-cp39-cp39-win32.whl", hash = "sha256:faca3bdcf85b2fc05d06ff3fbc1f83e1391b3e724afa3feba7d13eeab355484c"}, {file = "PyYAML-6.0.1-cp39-cp39-win_amd64.whl", hash = "sha256:510c9deebc5c0225e8c96813043e62b680ba2f9c50a08d3724c7f28a747d1486"}, {file = "PyYAML-6.0.1.tar.gz", hash = "sha256:bfdf460b1736c775f2ba9f6a92bca30bc2095067b8a9d77876d1fad6cc3b4a43"}, @@ -2002,4 +2015,4 @@ files = [ [metadata] lock-version = "2.0" python-versions = "^3.10.6" -content-hash = "f81c2dfb58d697ef369886ec085c4771b01a2227a2ae23ea3626dea2380f9084" +content-hash = "e4ccca3c7ae12b98b5f393832a8280a3e407b9fb40ff29bebfb5e6fefd34b3ac" diff --git a/pyproject.toml b/pyproject.toml index aca910a22a..818c99ac48 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -69,6 +69,8 @@ pytest-operator = "^0.29.0" pytest-operator-cache = {git = "https://github.com/canonical/data-platform-workflows", tag = "v5.0.0", subdirectory = "python/pytest_plugins/pytest_operator_cache"} pytest-operator-groups = {git = "https://github.com/canonical/data-platform-workflows", tag = "v5.0.0", subdirectory = "python/pytest_plugins/pytest_operator_groups"} juju = "^3.2.2" +boto3 = "^1.28.70" +tenacity = "^8.2.3" landscape-api-py3 = "^0.9.0" mailmanclient = "^3.3.5" psycopg2 = {version = "^2.9.9", extras = ["binary"]} diff --git a/tox.ini b/tox.ini index 08209648ba..27aed443fe 100644 --- a/tox.ini +++ b/tox.ini @@ -12,7 +12,7 @@ all_path = {[vars]src_path} {[vars]tests_path} [testenv] set_env = - PYTHONPATH = {[vars]src_path}:{tox_root}/lib + PYTHONPATH = {tox_root}:{tox_root}/lib:{[vars]src_path} PY_COLORS = 1 allowlist_externals = poetry @@ -64,13 +64,260 @@ commands = -m pytest -v --tb native -s {posargs} {[vars]tests_path}/unit poetry run coverage report +[testenv:backup-integration] +description = Run backup integration tests +set_env = + {[testenv]set_env} + # Workaround for https://github.com/python-poetry/poetry/issues/6958 + POETRY_INSTALLER_PARALLEL = false +pass_env = + CI + GITHUB_OUTPUT + SECRETS_FROM_GITHUB +allowlist_externals = + {[testenv:pack-wrapper]allowlist_externals} +commands_pre = + poetry install --only integration + {[testenv:pack-wrapper]commands_pre} +commands = + poetry run pytest -v --tb native --log-cli-level=INFO -s {posargs} {[vars]tests_path}/integration/test_backups.py +commands_post = + {[testenv:pack-wrapper]commands_post} + +[testenv:charm-integration] +description = Run charm integration tests +set_env = + {[testenv]set_env} + # Workaround for https://github.com/python-poetry/poetry/issues/6958 + POETRY_INSTALLER_PARALLEL = false +pass_env = + CI + GITHUB_OUTPUT +allowlist_externals = + {[testenv:pack-wrapper]allowlist_externals} +commands_pre = + poetry install --only integration + {[testenv:pack-wrapper]commands_pre} +commands = + poetry run pytest -v --tb native --log-cli-level=INFO -s {posargs} {[vars]tests_path}/integration/test_charm.py +commands_post = + {[testenv:pack-wrapper]commands_post} + +[testenv:database-relation-integration] +description = Run database relation integration tests +set_env = + {[testenv]set_env} + # Workaround for https://github.com/python-poetry/poetry/issues/6958 + POETRY_INSTALLER_PARALLEL = false +pass_env = + CI + GITHUB_OUTPUT +allowlist_externals = + {[testenv:pack-wrapper]allowlist_externals} +commands_pre = + poetry install --only integration + {[testenv:pack-wrapper]commands_pre} +commands = + poetry run pytest -v --tb native --log-cli-level=INFO -s {posargs} {[vars]tests_path}/integration/new_relations/test_new_relations.py +commands_post = + {[testenv:pack-wrapper]commands_post} + +[testenv:db-relation-integration] +description = Run db relation integration tests +set_env = + {[testenv]set_env} + # Workaround for https://github.com/python-poetry/poetry/issues/6958 + POETRY_INSTALLER_PARALLEL = false +pass_env = + CI + GITHUB_OUTPUT +allowlist_externals = + {[testenv:pack-wrapper]allowlist_externals} +commands_pre = + poetry install --only integration + {[testenv:pack-wrapper]commands_pre} +commands = + poetry run pytest -v --tb native --log-cli-level=INFO -s {posargs} {[vars]tests_path}/integration/test_db.py +commands_post = + {[testenv:pack-wrapper]commands_post} + +[testenv:db-admin-relation-integration] +description = Run db-admin relation integration tests +set_env = + {[testenv]set_env} + # Workaround for https://github.com/python-poetry/poetry/issues/6958 + POETRY_INSTALLER_PARALLEL = false +pass_env = + CI + GITHUB_OUTPUT +allowlist_externals = + {[testenv:pack-wrapper]allowlist_externals} +commands_pre = + poetry install --only integration + {[testenv:pack-wrapper]commands_pre} +commands = + poetry run pytest -v --tb native --log-cli-level=INFO -s {posargs} {[vars]tests_path}/integration/test_db_admin.py +commands_post = + {[testenv:pack-wrapper]commands_post} + +[testenv:ha-replication-integration] +description = Run high availability replication integration tests +set_env = + {[testenv]set_env} + # Workaround for https://github.com/python-poetry/poetry/issues/6958 + POETRY_INSTALLER_PARALLEL = false +pass_env = + CI + GITHUB_OUTPUT +allowlist_externals = + {[testenv:pack-wrapper]allowlist_externals} +commands_pre = + poetry install --only integration + {[testenv:pack-wrapper]commands_pre} +commands = + poetry run pytest -v --tb native --log-cli-level=INFO -s {posargs} {[vars]tests_path}/integration/ha_tests/test_replication.py +commands_post = + {[testenv:pack-wrapper]commands_post} + +[testenv:ha-self-healing-integration] +description = Run high availability self healing integration tests +set_env = + {[testenv]set_env} + # Workaround for https://github.com/python-poetry/poetry/issues/6958 + POETRY_INSTALLER_PARALLEL = false +pass_env = + CI + GITHUB_OUTPUT +allowlist_externals = + {[testenv:pack-wrapper]allowlist_externals} +commands_pre = + poetry install --only integration + {[testenv:pack-wrapper]commands_pre} +commands = + poetry run pytest -v --tb native --log-cli-level=INFO -s {posargs} {[vars]tests_path}/integration/ha_tests/test_self_healing.py +commands_post = + {[testenv:pack-wrapper]commands_post} + +[testenv:ha-restore-cluster-integration] +description = Run high availability cluster restore integration tests +set_env = + {[testenv]set_env} + # Workaround for https://github.com/python-poetry/poetry/issues/6958 + POETRY_INSTALLER_PARALLEL = false +pass_env = + CI + GITHUB_OUTPUT +allowlist_externals = + {[testenv:pack-wrapper]allowlist_externals} +commands_pre = + poetry install --only integration + {[testenv:pack-wrapper]commands_pre} +commands = + poetry run pytest -v --tb native --log-cli-level=INFO -s {posargs} {[vars]tests_path}/integration/ha_tests/test_restore_cluster.py +commands_post = + {[testenv:pack-wrapper]commands_post} + +[testenv:password-rotation-integration] +description = Run password rotation integration tests +set_env = + {[testenv]set_env} + # Workaround for https://github.com/python-poetry/poetry/issues/6958 + POETRY_INSTALLER_PARALLEL = false +pass_env = + CI + GITHUB_OUTPUT +allowlist_externals = + {[testenv:pack-wrapper]allowlist_externals} +commands_pre = + poetry install --only integration + {[testenv:pack-wrapper]commands_pre} +commands = + poetry run pytest -v --tb native --log-cli-level=INFO -s {posargs} {[vars]tests_path}/integration/test_password_rotation.py +commands_post = + {[testenv:pack-wrapper]commands_post} + +[testenv:plugins-integration] +description = Run plugins integration tests +set_env = + {[testenv]set_env} + # Workaround for https://github.com/python-poetry/poetry/issues/6958 + POETRY_INSTALLER_PARALLEL = false +pass_env = + CI + GITHUB_OUTPUT +allowlist_externals = + {[testenv:pack-wrapper]allowlist_externals} +commands_pre = + poetry install --only integration + {[testenv:pack-wrapper]commands_pre} +commands = + poetry run pytest -v --tb native --log-cli-level=INFO -s {posargs} {[vars]tests_path}/integration/test_plugins.py +commands_post = + {[testenv:pack-wrapper]commands_post} + +[testenv:tls-integration] +description = Run TLS integration tests +set_env = + {[testenv]set_env} + # Workaround for https://github.com/python-poetry/poetry/issues/6958 + POETRY_INSTALLER_PARALLEL = false +pass_env = + CI + GITHUB_OUTPUT +allowlist_externals = + {[testenv:pack-wrapper]allowlist_externals} +commands_pre = + poetry install --only integration + {[testenv:pack-wrapper]commands_pre} +commands = + poetry run pytest -v --tb native --log-cli-level=INFO -s {posargs} {[vars]tests_path}/integration/test_tls.py +commands_post = + {[testenv:pack-wrapper]commands_post} + +[testenv:upgrade-integration] +description = Run upgrade integration tests +set_env = + {[testenv]set_env} + # Workaround for https://github.com/python-poetry/poetry/issues/6958 + POETRY_INSTALLER_PARALLEL = false +pass_env = + CI + GITHUB_OUTPUT +allowlist_externals = + {[testenv:pack-wrapper]allowlist_externals} +commands_pre = + poetry install --only integration + {[testenv:pack-wrapper]commands_pre} +commands = + poetry run pytest -v --tb native --log-cli-level=INFO -s {posargs} {[vars]tests_path}/integration/ha_tests/test_upgrade.py +commands_post = + {[testenv:pack-wrapper]commands_post} + +[testenv:upgrade-from-stable-integration] +description = Run upgrade from stable integration tests +set_env = + {[testenv]set_env} + # Workaround for https://github.com/python-poetry/poetry/issues/6958 + POETRY_INSTALLER_PARALLEL = false +pass_env = + CI + GITHUB_OUTPUT +allowlist_externals = + {[testenv:pack-wrapper]allowlist_externals} +commands_pre = + poetry install --only integration + {[testenv:pack-wrapper]commands_pre} +commands = + poetry run pytest -v --tb native --log-cli-level=INFO -s {posargs} {[vars]tests_path}/integration/ha_tests/test_upgrade_from_stable.py +commands_post = + {[testenv:pack-wrapper]commands_post} + [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 - LIBJUJU_VERSION_SPECIFIER = {env:LIBJUJU_VERSION_SPECIFIER:3.2.2} pass_env = CI GITHUB_OUTPUT