Bump dns-lexicon from 3.14.1 to 3.17.0 #1078
Closed
This check has been archived and is scheduled for deletion.
Learn more about checks retention
GitHub Actions / unit-test-results
failed
Nov 7, 2023 in 0s
1 fail, 16 pass in 1m 19s
Annotations
Check warning on line 0 in test.unit_tests.legacy_test
github-actions / unit-test-results
All 6 runs failed: test_legacy_migration (test.unit_tests.legacy_test)
artifacts/unit-test-results-macos-latest-3.11/test-results.xml
artifacts/unit-test-results-macos-latest-3.8/test-results.xml
artifacts/unit-test-results-ubuntu-latest-3.11/test-results.xml
artifacts/unit-test-results-ubuntu-latest-3.8/test-results.xml
artifacts/unit-test-results-windows-latest-3.11/test-results.xml
artifacts/unit-test-results-windows-latest-3.8/test-results.xml
Raw output
tmp_path = PosixPath('/tmp/pytest-of-runner/pytest-0/test_legacy_migration0')
monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7f7b404a0850>
def test_legacy_migration(tmp_path, monkeypatch):
config_path = tmp_path / "dnsrobocert" / "config.yml"
legacy_config_domain_file = tmp_path / "old_config" / "domains.conf"
generated_config_path = tmp_path / "dnsrobocert" / "config-generated.yml"
os.mkdir(os.path.dirname(legacy_config_domain_file))
with open(
os.path.join(os.path.dirname(legacy_config_domain_file), "lexicon.yml"), "w"
) as f:
f.write(
"""\
ovh:
auth_application_secret: SECRET
additional_config: ADDITIONAL
"""
)
with open(
os.path.join(os.path.dirname(legacy_config_domain_file), "lexicon_ovh.yml"), "w"
) as f:
f.write(
"""\
auth_consumer_key: CONSUMER_KEY
"""
)
with open(str(legacy_config_domain_file), "w") as f:
f.write(
"""\
test1.sub.example.com test2.sub.example.com autorestart-containers=container1,container2 autocmd-containers=container3:cmd3 arg3,container4:cmd4 arg4a arg4b
*.sub.example.com sub.example.com
"""
)
monkeypatch.setenv("LEXICON_PROVIDER", "ovh")
monkeypatch.setenv("LEXICON_OVH_AUTH_APPLICATION_KEY", "KEY")
monkeypatch.setenv("LEXICON_OPTIONS", "--delegated=sub.example.com")
monkeypatch.setenv(
"LEXICON_PROVIDER_OPTIONS",
"--auth-entrypoint ovh-eu --auth-application-secret=SECRET-OVERRIDE",
)
monkeypatch.setenv("LEXICON_SLEEP_TIME", "60")
monkeypatch.setenv("LEXICON_MAX_CHECKS", "3")
monkeypatch.setenv("LEXICON_TTL", "42")
monkeypatch.setenv("LETSENCRYPT_USER_MAIL", "[email protected]")
monkeypatch.setenv("LETSENCRYPT_STAGING", "true")
monkeypatch.setenv("LETSENCRYPT_ACME_V1", "true")
monkeypatch.setenv("CERTS_DIRS_MODE", "0755")
monkeypatch.setenv("CERTS_FILES_MODE", "0644")
monkeypatch.setenv("CERTS_USER_OWNER", "nobody")
monkeypatch.setenv("CERTS_GROUP_OWNER", "nogroup")
monkeypatch.setenv("PFX_EXPORT", "true")
monkeypatch.setenv("PFX_EXPORT_PASSPHRASE", "PASSPHRASE")
monkeypatch.setenv("DEPLOY_HOOK", "./deploy.sh")
with mock.patch(
"dnsrobocert.core.legacy.LEGACY_CONFIGURATION_PATH",
new=legacy_config_domain_file,
):
legacy.migrate(config_path)
assert config.load(generated_config_path)
with open(generated_config_path) as f:
generated_data = f.read()
> assert (
generated_data
== """\
acme:
api_version: 1
certs_permissions:
dirs_mode: 493
files_mode: 420
group: nogroup
user: nobody
email_account: [email protected]
staging: true
certificates:
- autocmd:
- cmd: cmd3 arg3
containers:
- container3
- cmd: cmd4 arg4a arg4b
containers:
- container4
autorestart:
- containers:
- container1
- container2
deploy_hook: ./deploy.sh
domains:
- test1.sub.example.com
- test2.sub.example.com
name: test1.sub.example.com
pfx:
export: true
passphrase: PASSPHRASE
profile: ovh
- deploy_hook: ./deploy.sh
domains:
- '*.sub.example.com'
- sub.example.com
name: sub.example.com
pfx:
export: true
passphrase: PASSPHRASE
profile: ovh
profiles:
- delegated_subdomain: sub.example.com
max_checks: 3
name: ovh
provider: ovh
provider_options:
additional_config: ADDITIONAL
auth_application_key: KEY
auth_application_secret: SECRET-OVERRIDE
auth_consumer_key: CONSUMER_KEY
auth_entrypoint: ovh-eu
sleep_time: 60
ttl: 42
"""
)
E AssertionError: assert 'acme:\n api...\n ttl: 42\n' == 'acme:\n api...\n ttl: 42\n'
E Skipping 1010 identical leading characters in diff, use -v to show
E ovh-eu
E + resolve_zone_name: false
E sleep_time: 60
E ttl: 42
test/unit_tests/legacy_test.py:72: AssertionError
Check notice on line 0 in .github
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
Loading