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

Testing only #83

Closed
Closed
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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
6 changes: 4 additions & 2 deletions .github/workflows/check_format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -87,10 +87,12 @@ jobs:
- name: "Install dependencies"
run: |
sudo DEBIAN_FRONTEND=noninteractive apt-get -qy update
sudo DEBIAN_FRONTEND=noninteractive apt-get -qy install tox lintian
sudo DEBIAN_FRONTEND=noninteractive apt-get -qy install tox
- name: "Spellcheck"
run: |
make check_spelling
tox
env:
TOXENV: doc-spelling
- name: "Build docs"
env:
TOXENV: doc
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ defaults:
shell: sh -ex {0}

env:
RELEASE: bionic
RELEASE: focal

jobs:
package-build:
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/linkcheck.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ jobs:
broken_count=$(grep -c "broken" output.txt)
if [[ $broken_count -ge 5 ]]; then
echo "Too many broken links detected: $broken_count"
broken_matches=$(grep "broken" output.txt)
echo "Broken links \n$broken_matches"
exit 1
else
echo "Number of broken links is below threshold: $broken_count"
Expand Down
18 changes: 13 additions & 5 deletions .github/workflows/unit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,29 +14,37 @@ jobs:
unittests:
strategy:
matrix:
python-version: [ "3.7", "3.8", "3.9", "3.10", "3.11", "3.12" ]
toxenv: [ py3 ]
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12"]
toxenv: [py3]
experimental: [false]
check-latest: [false]
continue-on-error: [false]
include:
- python-version: "3.6"
toxenv: lowest-supported
continue-on-error: false
check-latest: false
experimental: false
- python-version: "3.13-dev"
toxenv: py3
check-latest: true
experimental: true
continue-on-error: true
name: unittest / ${{ matrix.toxenv }} / python ${{matrix.python-version}}
runs-on: ubuntu-20.04
continue-on-error: ${{ matrix.experimental }}
steps:
- name: "Checkout"
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
# Fetch all tags for tools/read-version
fetch-depth: 0
- name: Install Python ${{matrix.python-version}}
uses: actions/setup-python@v4
with:
python-version: ${{matrix.python-version}}
check-latest: ${{matrix.check-latest}}
- name: Install tox
run: pip install tox
- name: Run unittest
env:
PYTEST_ADDOPTS: -v
run: tox -e ${{ matrix.toxenv }}
3 changes: 3 additions & 0 deletions .pc/applied-patches
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,10 @@ expire-on-hashed-users.patch
retain-netplan-world-readable.patch
netplan99-cannot-use-default.patch
retain-old-groups.patch
keep-dhclient-as-priority-client.patch
revert-551f560d-cloud-config-after-snap-seeding.patch
do-not-block-user-login.patch
status-do-not-remove-duplicated-data.patch
retain-apt-pre-deb822.patch
status-retain-recoverable-error-exit-code.patch
retain-ec2-default-net-update-events.patch
2 changes: 1 addition & 1 deletion .pc/expire-on-hashed-users.patch/cloudinit/features.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
NETPLAN_CONFIG_ROOT_READ_ONLY = True
"""
If ``NETPLAN_CONFIG_ROOT_READ_ONLY`` is True, then netplan configuration will
be written as a single root readon-only file /etc/netplan/50-cloud-init.yaml.
be written as a single root read-only file /etc/netplan/50-cloud-init.yaml.
This prevents wifi passwords in network v2 configuration from being
world-readable. Prior to 23.1, netplan configuration is world-readable.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,11 @@
get_schema,
validate_cloudconfig_schema,
)
from tests.unittests.helpers import does_not_raise, skipUnlessJsonSchema
from tests.unittests.helpers import (
SCHEMA_EMPTY_ERROR,
does_not_raise,
skipUnlessJsonSchema,
)
from tests.unittests.util import get_cloud

MODPATH = "cloudinit.config.cc_set_passwords."
Expand Down Expand Up @@ -718,7 +722,8 @@ class TestSetPasswordsSchema:
(
{"chpasswd": {"list": []}},
pytest.raises(
SchemaValidationError, match=r"\[\] is too short"
SchemaValidationError,
match=rf"\[\] {SCHEMA_EMPTY_ERROR}",
),
),
],
Expand Down
Loading
Loading