Starting lpcraft, version 0.0.35 Logging execution to '/root/snap/lpcraft/common/cache/lpcraft/log/lpcraft-20221103-084703.408062.log' Launching environment for focal/amd64 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... :: 93 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 93 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: attrs==22.1.0,charmhelpers==1.2.1,charms.reactive==1.5.1,coverage==6.5.0,exceptiongroup==1.0.0,iniconfig==1.1.1,Jinja2==3.1.2,MarkupSafe==2.1.1,mock==4.0.3,netaddr==0.8.0,packaging==21.3,pbr==5.11.0,pluggy==1.0.0,pyaml==21.10.1,pyparsing==3.0.9,pytest==7.2.0,pytest-cov==4.0.0,PyYAML==6.0,tomli==2.0.1 :: unit run-test-pre: PYTHONHASHSEED='4181899367' :: unit run-test: commands[0] | pytest -v --cov=lib --cov=reactive --cov-branch --cov-report=term-missing --cov-report=html :: ============================= test session starts ============================== :: platform linux -- Python 3.8.10, pytest-7.2.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 28 items :: :: tests/unit/test_stunnel.py::TestCharm::test__calculate_offset PASSED [ 3%] :: tests/unit/test_stunnel.py::TestCharm::test__copy_file PASSED [ 7%] :: tests/unit/test_stunnel.py::TestCharm::test__generate_services PASSED [ 10%] :: tests/unit/test_stunnel.py::TestCharm::test__generate_services_multiple PASSED [ 14%] :: tests/unit/test_stunnel.py::TestCharm::test__generate_services_none PASSED [ 17%] :: tests/unit/test_stunnel.py::TestCharm::test__get_autocert_cn PASSED [ 21%] :: tests/unit/test_stunnel.py::TestCharm::test__get_autocert_cn_multiple_files PASSED [ 25%] :: tests/unit/test_stunnel.py::TestCharm::test__get_autocert_cn_non_exists PASSED [ 28%] :: tests/unit/test_stunnel.py::TestCharm::test__update_aliases PASSED [ 32%] :: tests/unit/test_stunnel.py::TestCharm::test__write_file PASSED [ 35%] :: tests/unit/test_stunnel.py::TestCharm::test__write_file_owner_group PASSED [ 39%] :: tests/unit/test_stunnel.py::TestCharm::test_config_changed PASSED [ 42%] :: tests/unit/test_stunnel.py::TestCharm::test_configure_stunnel PASSED [ 46%] :: tests/unit/test_stunnel.py::TestCharm::test_configure_stunnel_config PASSED [ 50%] :: tests/unit/test_stunnel.py::TestCharm::test_configure_stunnel_flags PASSED [ 53%] :: tests/unit/test_stunnel.py::TestCharm::test_hook_install PASSED [ 57%] :: tests/unit/test_stunnel.py::TestCharm::test_hook_upgrade_charm PASSED [ 60%] :: tests/unit/test_stunnel.py::TestCharm::test_set_active PASSED [ 64%] :: tests/unit/test_stunnel.py::TestCharm::test_set_active_dirty_revno PASSED [ 67%] :: tests/unit/test_stunnel.py::TestCharm::test_set_active_revno PASSED [ 71%] :: tests/unit/test_stunnel.py::TestCharm::test_set_active_shortened_revno PASSED [ 75%] :: tests/unit/test_stunnel.py::TestCharm::test_update_logrotate PASSED [ 78%] :: tests/unit/test_utils.py::TestLibUtils::test_logrotate_frequency PASSED [ 82%] :: tests/unit/test_utils.py::TestLibUtils::test_logrotate_non_exists PASSED [ 85%] :: tests/unit/test_utils.py::TestLibUtils::test_logrotate_retention PASSED [ 89%] :: tests/unit/test_utils.py::TestLibUtils::test_logrotate_retention_no_dateext PASSED [ 92%] :: tests/unit/test_utils.py::TestLibUtils::test_rsyslog_default_conf PASSED [ 96%] :: 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/stunnel.py 136 0 40 0 100% :: ----------------------------------------------------------------- :: TOTAL 178 0 60 0 100% :: Coverage HTML written to dir htmlcov :: :: :: ============================== 28 passed in 0.35s ============================== :: ___________________________________ summary ____________________________________ :: unit: commands succeeded :: congratulations :)