Starting lpcraft, version 0.0.50 Logging execution to '/home/buildd/.local/state/lpcraft/log/lpcraft-20230412-001008.520323.log' Launching environment for focal/amd64 Checking for instance 'lpcraft-tree-519475-focal-amd64' in project 'lpcraft' in remote 'local' Instance exists and is not running. Starting instance. Running ['apt', 'update'] :: :: WARNING: apt does not have a stable CLI interface. Use with caution in scripts. :: :: Hit:1 http://security.ubuntu.com/ubuntu focal-security InRelease :: Hit:2 http://archive.ubuntu.com/ubuntu focal InRelease :: Hit:3 http://archive.ubuntu.com/ubuntu focal-updates InRelease :: Hit:4 http://archive.ubuntu.com/ubuntu focal-backports InRelease :: Reading package lists... :: Building dependency tree... :: Reading state information... :: 94 packages can be upgraded. Run 'apt list --upgradable' to see them. Installing system packages Running ['apt', 'install', '-y', 'tox'] :: :: WARNING: apt does not have a stable CLI interface. Use with caution in scripts. :: :: Reading package lists... :: Building dependency tree... :: Reading state information... :: tox is already the newest version (3.13.2-2). :: 0 upgraded, 0 newly installed, 0 to remove and 94 not upgraded. Running command for the job... Running ['bash', '--noprofile', '--norc', '-ec', 'tox -e unit\n'] :: unit create: /build/lpcraft/project/.tox/unit :: unit installdeps: -r/build/lpcraft/project/tests/unit/requirements.txt, -r/build/lpcraft/project/requirements.txt :: unit installed: charmhelpers==1.2.1,charms.reactive==1.5.2,coverage==7.2.3,exceptiongroup==1.1.1,iniconfig==2.0.0,Jinja2==3.1.2,MarkupSafe==2.1.2,mock==5.0.1,netaddr==0.8.0,packaging==23.0,pbr==5.11.1,pluggy==1.0.0,pyaml==21.10.1,pytest==7.3.0,pytest-cov==4.0.0,PyYAML==6.0,tomli==2.0.1 :: unit run-test-pre: PYTHONHASHSEED='888470748' :: unit run-test: commands[0] | pytest -v --cov=lib --cov=reactive --cov=actions --cov-branch --cov-report=term-missing --cov-report=html :: ============================= test session starts ============================== :: platform linux -- Python 3.8.10, pytest-7.3.0, pluggy-1.0.0 -- /build/lpcraft/project/.tox/unit/bin/python :: cachedir: .tox/unit/.pytest_cache :: rootdir: /build/lpcraft/project :: configfile: pytest.ini :: plugins: cov-4.0.0 :: collecting ... collected 101 items :: :: tests/unit/test_smtp_relay.py::TestCharm::test__calculate_offset PASSED [ 0%] :: tests/unit/test_smtp_relay.py::TestCharm::test__copy_file PASSED [ 1%] :: tests/unit/test_smtp_relay.py::TestCharm::test__create_update_map PASSED [ 2%] :: tests/unit/test_smtp_relay.py::TestCharm::test__create_update_map_eno_content PASSED [ 3%] :: tests/unit/test_smtp_relay.py::TestCharm::test__create_update_map_manual PASSED [ 4%] :: tests/unit/test_smtp_relay.py::TestCharm::test__generate_fqdn PASSED [ 5%] :: tests/unit/test_smtp_relay.py::TestCharm::test__get_autocert_cn PASSED [ 6%] :: tests/unit/test_smtp_relay.py::TestCharm::test__get_autocert_cn_multiple_files PASSED [ 7%] :: tests/unit/test_smtp_relay.py::TestCharm::test__get_autocert_cn_non_exists PASSED [ 8%] :: tests/unit/test_smtp_relay.py::TestCharm::test__get_milters PASSED [ 9%] :: tests/unit/test_smtp_relay.py::TestCharm::test__get_milters_map_offset PASSED [ 10%] :: tests/unit/test_smtp_relay.py::TestCharm::test__get_milters_map_second PASSED [ 11%] :: tests/unit/test_smtp_relay.py::TestCharm::test__get_milters_map_wrap_around PASSED [ 12%] :: tests/unit/test_smtp_relay.py::TestCharm::test__get_milters_map_wrap_around_twice PASSED [ 13%] :: tests/unit/test_smtp_relay.py::TestCharm::test__get_milters_multiple PASSED [ 14%] :: tests/unit/test_smtp_relay.py::TestCharm::test__get_milters_no_map_milter_units PASSED [ 15%] :: tests/unit/test_smtp_relay.py::TestCharm::test__get_milters_no_milter_relation PASSED [ 16%] :: tests/unit/test_smtp_relay.py::TestCharm::test__get_peers PASSED [ 17%] :: tests/unit/test_smtp_relay.py::TestCharm::test__get_peers_duplicates PASSED [ 18%] :: tests/unit/test_smtp_relay.py::TestCharm::test__get_peers_no_peer_relation PASSED [ 19%] :: tests/unit/test_smtp_relay.py::TestCharm::test__get_peers_no_peers PASSED [ 20%] :: tests/unit/test_smtp_relay.py::TestCharm::test__get_peers_single_peer PASSED [ 21%] :: tests/unit/test_smtp_relay.py::TestCharm::test__get_peers_single_sorted PASSED [ 22%] :: tests/unit/test_smtp_relay.py::TestCharm::test__update_aliases PASSED [ 23%] :: tests/unit/test_smtp_relay.py::TestCharm::test__write_file PASSED [ 24%] :: tests/unit/test_smtp_relay.py::TestCharm::test__write_file_owner_group PASSED [ 25%] :: tests/unit/test_smtp_relay.py::TestCharm::test_config_changed PASSED [ 26%] :: tests/unit/test_smtp_relay.py::TestCharm::test_config_changed_policyd_spf PASSED [ 27%] :: tests/unit/test_smtp_relay.py::TestCharm::test_config_changed_smtp_auth PASSED [ 28%] :: tests/unit/test_smtp_relay.py::TestCharm::test_config_changed_syslog_forwarders PASSED [ 29%] :: tests/unit/test_smtp_relay.py::TestCharm::test_configure_policyd_spf PASSED [ 30%] :: tests/unit/test_smtp_relay.py::TestCharm::test_configure_policyd_spf_disabled PASSED [ 31%] :: tests/unit/test_smtp_relay.py::TestCharm::test_configure_policyd_spf_skip_addresses PASSED [ 32%] :: tests/unit/test_smtp_relay.py::TestCharm::test_configure_smtp_auth_relay PASSED [ 33%] :: tests/unit/test_smtp_relay.py::TestCharm::test_configure_smtp_auth_relay_config PASSED [ 34%] :: tests/unit/test_smtp_relay.py::TestCharm::test_configure_smtp_auth_relay_config_auth_disabled PASSED [ 35%] :: tests/unit/test_smtp_relay.py::TestCharm::test_configure_smtp_auth_relay_config_auth_users PASSED [ 36%] :: tests/unit/test_smtp_relay.py::TestCharm::test_configure_smtp_auth_relay_config_auth_users_manual PASSED [ 37%] :: tests/unit/test_smtp_relay.py::TestCharm::test_configure_smtp_auth_relay_flags PASSED [ 38%] :: tests/unit/test_smtp_relay.py::TestCharm::test_configure_smtp_auth_relay_flags_auth_disabled PASSED [ 39%] :: tests/unit/test_smtp_relay.py::TestCharm::test_configure_smtp_auth_relay_ports PASSED [ 40%] :: tests/unit/test_smtp_relay.py::TestCharm::test_configure_smtp_auth_relay_ports_auth_disabled PASSED [ 41%] :: tests/unit/test_smtp_relay.py::TestCharm::test_configure_smtp_relay PASSED [ 42%] :: tests/unit/test_smtp_relay.py::TestCharm::test_configure_smtp_relay_config PASSED [ 43%] :: tests/unit/test_smtp_relay.py::TestCharm::test_configure_smtp_relay_config_additional_smtpd_recipient_restrictions PASSED [ 44%] :: tests/unit/test_smtp_relay.py::TestCharm::test_configure_smtp_relay_config_append_x_envelope_to PASSED [ 45%] :: tests/unit/test_smtp_relay.py::TestCharm::test_configure_smtp_relay_config_auth_disabled PASSED [ 46%] :: tests/unit/test_smtp_relay.py::TestCharm::test_configure_smtp_relay_config_auth_sender_login_maps PASSED [ 47%] :: tests/unit/test_smtp_relay.py::TestCharm::test_configure_smtp_relay_config_domain PASSED [ 48%] :: tests/unit/test_smtp_relay.py::TestCharm::test_configure_smtp_relay_config_header_checks PASSED [ 49%] :: tests/unit/test_smtp_relay.py::TestCharm::test_configure_smtp_relay_config_rate_limits PASSED [ 50%] :: tests/unit/test_smtp_relay.py::TestCharm::test_configure_smtp_relay_config_rate_limits_auth_disabled PASSED [ 51%] :: tests/unit/test_smtp_relay.py::TestCharm::test_configure_smtp_relay_config_reject_unknown_recipient_domain PASSED [ 52%] :: tests/unit/test_smtp_relay.py::TestCharm::test_configure_smtp_relay_config_reject_unknown_sender_domain PASSED [ 53%] :: tests/unit/test_smtp_relay.py::TestCharm::test_configure_smtp_relay_config_relay_access_sources PASSED [ 54%] :: tests/unit/test_smtp_relay.py::TestCharm::test_configure_smtp_relay_config_relay_access_sources_auth_disabled PASSED [ 55%] :: tests/unit/test_smtp_relay.py::TestCharm::test_configure_smtp_relay_config_relay_domains PASSED [ 56%] :: tests/unit/test_smtp_relay.py::TestCharm::test_configure_smtp_relay_config_relay_domains_with_relay_recipient_maps PASSED [ 57%] :: tests/unit/test_smtp_relay.py::TestCharm::test_configure_smtp_relay_config_relay_domains_with_relay_recipient_maps_combined PASSED [ 58%] :: tests/unit/test_smtp_relay.py::TestCharm::test_configure_smtp_relay_config_relay_domains_with_relay_recipient_maps_manual PASSED [ 59%] :: tests/unit/test_smtp_relay.py::TestCharm::test_configure_smtp_relay_config_restrict_both_senders_and_recpients PASSED [ 60%] :: tests/unit/test_smtp_relay.py::TestCharm::test_configure_smtp_relay_config_restrict_recpients PASSED [ 61%] :: tests/unit/test_smtp_relay.py::TestCharm::test_configure_smtp_relay_config_restrict_sender_access PASSED [ 62%] :: tests/unit/test_smtp_relay.py::TestCharm::test_configure_smtp_relay_config_restrict_sender_access_reset PASSED [ 63%] :: tests/unit/test_smtp_relay.py::TestCharm::test_configure_smtp_relay_config_restrict_sender_manual PASSED [ 64%] :: tests/unit/test_smtp_relay.py::TestCharm::test_configure_smtp_relay_config_restrict_senders PASSED [ 65%] :: tests/unit/test_smtp_relay.py::TestCharm::test_configure_smtp_relay_config_restrict_senders_with_reject_unknown_recipient_domain PASSED [ 66%] :: tests/unit/test_smtp_relay.py::TestCharm::test_configure_smtp_relay_config_smtp_header_checks PASSED [ 67%] :: tests/unit/test_smtp_relay.py::TestCharm::test_configure_smtp_relay_config_spf PASSED [ 68%] :: tests/unit/test_smtp_relay.py::TestCharm::test_configure_smtp_relay_config_spf_with_restrict_senders PASSED [ 69%] :: tests/unit/test_smtp_relay.py::TestCharm::test_configure_smtp_relay_config_spf_with_spf_check_maps PASSED [ 70%] :: tests/unit/test_smtp_relay.py::TestCharm::test_configure_smtp_relay_config_spf_with_spf_check_maps_and_restrict_senders PASSED [ 71%] :: tests/unit/test_smtp_relay.py::TestCharm::test_configure_smtp_relay_config_tls_cert_key PASSED [ 72%] :: tests/unit/test_smtp_relay.py::TestCharm::test_configure_smtp_relay_config_tls_dhparam_exists PASSED [ 73%] :: tests/unit/test_smtp_relay.py::TestCharm::test_configure_smtp_relay_config_tls_dhparam_non_exists PASSED [ 74%] :: tests/unit/test_smtp_relay.py::TestCharm::test_configure_smtp_relay_config_tls_no_ciphers_and_protocols PASSED [ 75%] :: tests/unit/test_smtp_relay.py::TestCharm::test_configure_smtp_relay_config_tls_policy_map PASSED [ 76%] :: tests/unit/test_smtp_relay.py::TestCharm::test_configure_smtp_relay_config_transport_maps PASSED [ 77%] :: tests/unit/test_smtp_relay.py::TestCharm::test_configure_smtp_relay_config_transport_maps_with_header_checks PASSED [ 78%] :: tests/unit/test_smtp_relay.py::TestCharm::test_configure_smtp_relay_config_transport_maps_with_virtual_alias_maps PASSED [ 79%] :: tests/unit/test_smtp_relay.py::TestCharm::test_configure_smtp_relay_config_virtual_alias_maps_type PASSED [ 80%] :: tests/unit/test_smtp_relay.py::TestCharm::test_configure_smtp_relay_config_with_milter PASSED [ 81%] :: tests/unit/test_smtp_relay.py::TestCharm::test_configure_smtp_relay_config_with_milter_auth_disabled PASSED [ 82%] :: tests/unit/test_smtp_relay.py::TestCharm::test_configure_smtp_relay_flags PASSED [ 83%] :: tests/unit/test_smtp_relay.py::TestCharm::test_configure_syslog_forwarders PASSED [ 84%] :: tests/unit/test_smtp_relay.py::TestCharm::test_configure_syslog_forwarders_disabled PASSED [ 85%] :: tests/unit/test_smtp_relay.py::TestCharm::test_hook_install PASSED [ 86%] :: tests/unit/test_smtp_relay.py::TestCharm::test_hook_relation_milter_flags PASSED [ 87%] :: tests/unit/test_smtp_relay.py::TestCharm::test_hook_relation_peers_flags PASSED [ 88%] :: tests/unit/test_smtp_relay.py::TestCharm::test_hook_upgrade_charm PASSED [ 89%] :: tests/unit/test_smtp_relay.py::TestCharm::test_set_active PASSED [ 90%] :: tests/unit/test_smtp_relay.py::TestCharm::test_set_active_dirty_revno PASSED [ 91%] :: tests/unit/test_smtp_relay.py::TestCharm::test_set_active_revno PASSED [ 92%] :: tests/unit/test_smtp_relay.py::TestCharm::test_set_active_shortened_revno PASSED [ 93%] :: tests/unit/test_smtp_relay.py::TestCharm::test_update_logrotate PASSED [ 94%] :: tests/unit/test_utils.py::TestLibUtils::test_logrotate_frequency PASSED [ 95%] :: tests/unit/test_utils.py::TestLibUtils::test_logrotate_non_exists PASSED [ 96%] :: tests/unit/test_utils.py::TestLibUtils::test_logrotate_retention PASSED [ 97%] :: tests/unit/test_utils.py::TestLibUtils::test_logrotate_retention_no_dateext PASSED [ 98%] :: tests/unit/test_utils.py::TestLibUtils::test_rsyslog_default_conf PASSED [ 99%] :: tests/unit/test_utils.py::TestLibUtils::test_rsyslog_default_conf_non_exists PASSED [100%] :: :: ---------- coverage: platform linux, python 3.8.10-final-0 ----------- :: Name Stmts Miss Branch BrPart Cover Missing :: -------------------------------------------------------------------- :: lib/utils.py 42 0 20 0 100% :: reactive/smtp_relay.py 326 0 98 0 100% :: -------------------------------------------------------------------- :: TOTAL 368 0 118 0 100% :: Coverage HTML written to dir htmlcov :: :: :: ============================= 101 passed in 1.89s ============================== :: /build/lpcraft/project/.tox/unit/lib/python3.8/site-packages/coverage/inorout.py:507: CoverageWarning: Module actions was never imported. (module-not-imported) :: self.warn(f"Module {pkg} was never imported.", slug="module-not-imported") :: ___________________________________ summary ____________________________________ :: unit: commands succeeded :: congratulations :)