Skip to content

Bump actions/checkout from 5 to 6#1313

Open
dependabot[bot] wants to merge 1 commit into
mainfrom
dependabot/github_actions/actions/checkout-6
Open

Bump actions/checkout from 5 to 6#1313
dependabot[bot] wants to merge 1 commit into
mainfrom
dependabot/github_actions/actions/checkout-6

Bump actions/checkout from 5 to 6

1fd9f32
Select commit
Loading
Failed to load commit list.
Sign in for the full log view
GitHub Actions / unit-test-results failed Apr 29, 2026 in 0s

1 fail, 16 pass in 1m 12s

  6 files   6 suites   1m 12s ⏱️
 17 tests 16 ✅ 0 💤 1 ❌
102 runs  94 ✅ 2 💤 6 ❌

Results for commit 1fd9f32.

Annotations

Check warning on line 0 in test.unit_tests.hooks_test

See this annotation in the file changed.

@github-actions github-actions / unit-test-results

All 6 runs failed: test_pfx (test.unit_tests.hooks_test)

artifacts/unit-test-results-macos-latest-3.10/test-results.xml [took 0s]
artifacts/unit-test-results-macos-latest-3.14/test-results.xml [took 0s]
artifacts/unit-test-results-ubuntu-latest-3.10/test-results.xml [took 0s]
artifacts/unit-test-results-ubuntu-latest-3.14/test-results.xml [took 0s]
artifacts/unit-test-results-windows-latest-3.10/test-results.xml [took 0s]
artifacts/unit-test-results-windows-latest-3.14/test-results.xml [took 0s]
Raw output
OSError: [Errno 22] Invalid argument: '/tmp/pytest-of-runner/pytest-0/test_pfx0/live/test.example.com/cert.pem'
_autorestart = <MagicMock name='_autorestart' id='139860473440736'>
_autocmd = <MagicMock name='_autocmd' id='139860469269360'>
_fix_permissions = <MagicMock name='_fix_permissions' id='139860475164704'>
fake_env = {'archive': PosixPath('/tmp/pytest-of-runner/pytest-0/test_pfx0/archive/test.example.com'), 'live': PosixPath('/tmp/pytest-of-runner/pytest-0/test_pfx0/live/test.example.com')}
fake_config = PosixPath('/tmp/pytest-of-runner/pytest-0/test_pfx0/config.yml')

    @patch("dnsrobocert.core.hooks._fix_permissions")
    @patch("dnsrobocert.core.hooks._autocmd")
    @patch("dnsrobocert.core.hooks._autorestart")
    def test_pfx(
        _autorestart: MagicMock,
        _autocmd: MagicMock,
        _fix_permissions: MagicMock,
        fake_env: dict[str, Path],
        fake_config: Path,
    ) -> None:
        archive_path = fake_env["archive"]
        key = rsa.generate_private_key(
            public_exponent=65537, key_size=2048, backend=default_backend()
        )
        with open(archive_path / "privkey.pem", "wb") as f:
            f.write(
                key.private_bytes(
                    encoding=serialization.Encoding.PEM,
                    format=serialization.PrivateFormat.TraditionalOpenSSL,
                    encryption_algorithm=serialization.NoEncryption(),
                )
            )
    
        subject = issuer = x509.Name(
            [x509.NameAttribute(NameOID.COMMON_NAME, "example.com")]
        )
        cert = (
            x509.CertificateBuilder()
            .subject_name(subject)
            .issuer_name(issuer)
            .public_key(key.public_key())
            .serial_number(x509.random_serial_number())
            .not_valid_before(datetime.now(timezone.utc))
            .not_valid_after(datetime.now(timezone.utc) + timedelta(days=10))
            .sign(key, hashes.SHA256(), default_backend())
        )
    
        with open(archive_path / "cert.pem", "wb") as f:
            f.write(cert.public_bytes(serialization.Encoding.PEM))
        with open(archive_path / "chain.pem", "wb") as f:
            f.write(cert.public_bytes(serialization.Encoding.PEM))
    
>       hooks.deploy(config.load(fake_config), LINEAGE)

test/unit_tests/hooks_test.py:174: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
src/dnsrobocert/core/hooks.py:148: in deploy
    _pfx_export(certificate, lineage_path, lineage)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

certificate = {'autocmd': [{'cmd': ['echo', 'Hello World!'], 'containers': ['foo', 'bar']}, {'cmd': 'echo test', 'containers': ['dum...r2']}, {'swarm_services': ['service1', 'service2']}], 'domains': ['test.example.com'], 'name': 'test.example.com', ...}
lineage_path = '/tmp/pytest-of-runner/pytest-0/test_pfx0/live/test.example.com'
lineage = 'test.example.com'

    def _pfx_export(certificate: dict[str, Any], lineage_path: str, lineage: str) -> None:
        pfx = certificate.get("pfx", {})
        if pfx.get("export"):
            with open(os.path.join(lineage_path, "privkey.pem"), "rb") as f:
                key = serialization.load_pem_private_key(f.read(), None)
            with open(os.path.join(lineage_path, "cert.pem"), "rb") as f:
                cert = x509.load_pem_x509_certificate(f.read())
            with open(os.path.join(lineage_path, "chain.pem"), "rb") as f:
                ca_certs = x509.load_pem_x509_certificates(f.read())
    
            passphrase: str = pfx.get("passphrase")
            p12 = pkcs12.serialize_key_and_certificates(
                lineage.encode("utf-8"),
                cast(
                    CertificateIssuerPrivateKeyTypes, key
                ),  # By construction, Certbot will generate only RSA/ECDSA private keys.
                cert,
                ca_certs,
                (
                    serialization.BestAvailableEncryption(passphrase.encode("utf-8"))
                    if passphrase
                    else serialization.NoEncryption()
                ),
            )
    
>           cert_path = os.readlink(os.path.join(lineage_path, "cert.pem"))
E           OSError: [Errno 22] Invalid argument: '/tmp/pytest-of-runner/pytest-0/test_pfx0/live/test.example.com/cert.pem'

src/dnsrobocert/core/hooks.py:182: OSError

Check notice on line 0 in .github

See this annotation in the file changed.

@github-actions github-actions / unit-test-results

17 tests found

There are 17 tests, see "Raw output" for the full list of tests.
Raw output
test.integration_tests.dnsrobocert_test ‑ test_it
test.unit_tests.config_test ‑ test_bad_config_duplicated_cert_name
test.unit_tests.config_test ‑ test_bad_config_non_existent_profile
test.unit_tests.config_test ‑ test_bad_config_wrong_posix_mode
test.unit_tests.config_test ‑ test_bad_config_wrong_schema
test.unit_tests.config_test ‑ test_environment_variable_injection
test.unit_tests.config_test ‑ test_good_config_minimal
test.unit_tests.config_test ‑ test_wildcard_lineage
test.unit_tests.hooks_test ‑ test_auth_cli
test.unit_tests.hooks_test ‑ test_autocmd
test.unit_tests.hooks_test ‑ test_autorestart
test.unit_tests.hooks_test ‑ test_cleanup_cli
test.unit_tests.hooks_test ‑ test_deploy_cli
test.unit_tests.hooks_test ‑ test_fix_permissions
test.unit_tests.hooks_test ‑ test_pfx
test.unit_tests.legacy_test ‑ test_legacy_migration
test.unit_tests.main_test ‑ test_main_loop