Starting lpci, version 0.2.6 Logging execution to '/home/buildd/.local/state/lpci/log/lpci-20240321-005512.909749.log' Launching environment for focal/amd64 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... :: 100 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 100 not upgraded. Running command for the job... Running ['bash', '--noprofile', '--norc', '-ec', 'tox -e unit\n'] :: unit create: /build/lpci/project/.tox/unit :: unit installdeps: -r/build/lpci/project/tests/unit/requirements.txt, -r/build/lpci/project/requirements.txt :: unit installed: backoff==1.7.0,certifi==2024.2.2,charmhelpers==1.2.1,charms.reactive==1.5.2,charset-normalizer==3.3.2,coverage==7.4.4,exceptiongroup==1.2.0,freezegun==1.4.0,idna==3.6,iniconfig==2.0.0,Jinja2==3.1.3,looseversion==1.3.0,MarkupSafe==2.1.5,mock==5.1.0,netaddr==1.2.1,nose==1.3.7,packaging==24.0,pbr==6.0.0,pluggy==1.4.0,pyaml==23.12.0,pytest==8.1.1,pytest-cov==4.1.0,python-dateutil==2.9.0.post0,PyYAML==6.0.1,requests==2.31.0,six==1.16.0,tomli==2.0.1,urllib3==2.2.1 :: unit run-test-pre: PYTHONHASHSEED='494938138' :: unit run-test: commands[0] | pytest --ignore /build/lpci/project/tests/functional -v --cov=actions --cov=files --cov=lib --cov=reactive --cov-branch --cov-report=term-missing --cov-report=html :: ============================= test session starts ============================== :: platform linux -- Python 3.8.10, pytest-8.1.1, pluggy-1.4.0 -- /build/lpci/project/.tox/unit/bin/python :: cachedir: .tox/unit/.pytest_cache :: rootdir: /build/lpci/project :: configfile: pytest.ini :: plugins: cov-4.1.0 :: collecting ... collected 49 items :: :: lib/ubuntu_repository_cache/tests/test_apache.py::ApacheTestCase::test_tune_mpm_configs PASSED [ 2%] :: lib/ubuntu_repository_cache/tests/test_metadata_sync.py::MirrorTestCase::test_main_all_variables PASSED [ 4%] :: lib/ubuntu_repository_cache/tests/test_metadata_sync.py::MirrorTestCase::test_main_calls_juju_run PASSED [ 6%] :: lib/ubuntu_repository_cache/tests/test_metadata_sync.py::MirrorTestCase::test_parse_release_file_no_sha256 PASSED [ 8%] :: lib/ubuntu_repository_cache/tests/test_metadata_sync.py::MirrorTestCase::test_parse_release_file_with_sha256 PASSED [ 10%] :: lib/ubuntu_repository_cache/tests/test_metadata_sync.py::MirrorTestCase::test_rsync_sends_rsync_command PASSED [ 12%] :: lib/ubuntu_repository_cache/tests/test_metadata_sync.py::MirrorTestCase::test_rsync_should_retry_do_retry PASSED [ 14%] :: lib/ubuntu_repository_cache/tests/test_metadata_sync.py::MirrorTestCase::test_rsync_should_retry_fail PASSED [ 16%] :: lib/ubuntu_repository_cache/tests/test_metadata_sync.py::MirrorTestCase::test_rsync_should_retry_unknown PASSED [ 18%] :: lib/ubuntu_repository_cache/tests/test_metadata_sync.py::test_main_missing_environment_variable XFAIL [ 20%] :: lib/ubuntu_repository_cache/tests/test_squid.py::SquidTestCase::test_squid_cache_mem PASSED [ 22%] :: lib/ubuntu_repository_cache/tests/test_squid.py::SquidTestCase::test_squid_cache_size PASSED [ 24%] :: lib/ubuntu_repository_cache/tests/test_util.py::SemaphoreTest::test_semaphore_cleans_up_afer_itself PASSED [ 26%] :: lib/ubuntu_repository_cache/tests/test_util.py::SemaphoreTest::test_semaphore_creates_file PASSED [ 28%] :: lib/ubuntu_repository_cache/tests/test_util.py::TouchTest::test_touch_creates_file PASSED [ 30%] :: tests/unit/test_actions.py::TestCharm::test_maintenance_mode_start PASSED [ 32%] :: tests/unit/test_actions.py::TestCharm::test_maintenance_mode_status PASSED [ 34%] :: tests/unit/test_actions.py::TestCharm::test_maintenance_mode_stop PASSED [ 36%] :: tests/unit/test_apache.py::TestCharm::test_configure_health_check PASSED [ 38%] :: tests/unit/test_apache.py::TestCharm::test_configure_remoteip_logging PASSED [ 40%] :: tests/unit/test_apache.py::TestCharm::test_create_metadata_site PASSED [ 42%] :: tests/unit/test_apache.py::TestCharm::test_create_metadata_site_in_failover PASSED [ 44%] :: tests/unit/test_apache.py::TestCharm::test_create_metadata_site_no_failover PASSED [ 46%] :: tests/unit/test_apache.py::TestCharm::test_create_mpm_workerfile PASSED [ 48%] :: tests/unit/test_apache.py::TestCharm::test_create_security PASSED [ 51%] :: tests/unit/test_apache.py::TestCharm::test_start PASSED [ 53%] :: tests/unit/test_health_check.py::TestCharm::test_check_metadata_age PASSED [ 55%] :: tests/unit/test_health_check.py::TestCharm::test_check_url PASSED [ 57%] :: tests/unit/test_health_check.py::TestCharm::test_generate_uuid PASSED [ 59%] :: tests/unit/test_health_check.py::TestCharm::test_health_check PASSED [ 61%] :: tests/unit/test_health_check.py::TestCharm::test_health_check_disabled PASSED [ 63%] :: tests/unit/test_health_check.py::TestCharm::test_health_check_missing_metadata PASSED [ 65%] :: tests/unit/test_health_check.py::TestCharm::test_render_influx PASSED [ 67%] :: tests/unit/test_health_check.py::TestCharm::test_send_to_influx PASSED [ 69%] :: tests/unit/test_ubuntu_repository_cache.py::TestCharm::test__copy_file PASSED [ 71%] :: tests/unit/test_ubuntu_repository_cache.py::TestCharm::test__update_aliases PASSED [ 73%] :: tests/unit/test_ubuntu_repository_cache.py::TestCharm::test__write_file PASSED [ 75%] :: tests/unit/test_ubuntu_repository_cache.py::TestCharm::test__write_file_owner_group PASSED [ 77%] :: tests/unit/test_ubuntu_repository_cache.py::TestCharm::test_reduce_cron_spam PASSED [ 79%] :: tests/unit/test_ubuntu_repository_cache.py::TestCharm::test_reduce_cron_spam_bzrignore PASSED [ 81%] :: tests/unit/test_ubuntu_repository_cache.py::TestCharm::test_reduce_cron_spam_etckeeper PASSED [ 83%] :: tests/unit/test_ubuntu_repository_cache.py::TestCharm::test_reduce_cron_spam_ieee_data PASSED [ 85%] :: tests/unit/test_ubuntu_repository_cache.py::TestCharm::test_reduce_cron_spam_update_notifier PASSED [ 87%] :: tests/unit/test_ubuntu_repository_cache.py::TestCharm::test_set_active PASSED [ 89%] :: tests/unit/test_ubuntu_repository_cache.py::TestCharm::test_update_systemd_mtr PASSED [ 91%] :: tests/unit/test_ubuntu_repository_cache.py::TestCharm::test_update_systemd_mtr_ipv4 PASSED [ 93%] :: tests/unit/test_ubuntu_repository_cache.py::TestCharm::test_update_systemd_mtr_required PASSED [ 95%] :: tests/unit/test_ubuntu_repository_cache.py::TestCharm::test_upgrade_charm PASSED [ 97%] :: tests/unit/test_util.py::TestCharm::test_get_cloud_name PASSED [100%] :: :: =============================== warnings summary =============================== :: lib/ubuntu_repository_cache/tests/test_metadata_sync.py:209 :: lib/ubuntu_repository_cache/tests/test_metadata_sync.py:209: PytestCollectionWarning: yield tests were removed in pytest 4.0 - test_main_missing_environment_variable will be ignored :: def test_main_missing_environment_variable(): :: :: -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html :: :: ---------- coverage: platform linux, python 3.8.10-final-0 ----------- :: Name Stmts Miss Branch BrPart Cover Missing :: ------------------------------------------------------------------------------------------------ :: actions/maintenance_mode.py 28 10 12 0 60% 33-44 :: files/health_check.py 153 17 36 4 87% 95, 185, 189-203, 233 :: lib/ubuntu_repository_cache/__init__.py 0 0 0 0 100% :: lib/ubuntu_repository_cache/apache.py 217 54 86 10 74% 29-46, 55, 72-77, 137, 169-171, 182, 209, 238->241, 249, 261->264, 272, 283, 316-338, 344-362 :: lib/ubuntu_repository_cache/metadata_cleanup.py 26 26 2 0 0% 3-47 :: lib/ubuntu_repository_cache/metadata_peers_sync.py 68 68 10 0 0% 3-109 :: lib/ubuntu_repository_cache/metadata_sync.py 329 232 95 6 27% 82, 84, 100-103, 114-122, 132, 147-272, 298-299, 329-342, 346-354, 397-447, 457-487, 503-524, 530-553, 579, 586-620, 627-658 :: lib/ubuntu_repository_cache/mirror.py 221 196 64 0 9% 34-45, 51-87, 99-153, 160-166, 178-247, 253-342, 356-371, 377-387 :: lib/ubuntu_repository_cache/service.py 183 144 42 0 17% 38-45, 50, 55, 61-113, 130-142, 148-156, 162-166, 172-176, 182, 218-229, 240-306, 312-335 :: lib/ubuntu_repository_cache/squid.py 128 64 28 2 49% 32-42, 57, 64-65, 93-117, 124-129, 136-139, 146, 152-155, 197-250, 260-261 :: lib/ubuntu_repository_cache/storage.py 113 98 26 0 11% 20-25, 31-41, 47-56, 73-95, 111-171, 183-185, 191-194, 200-210 :: lib/ubuntu_repository_cache/util.py 154 72 34 3 46% 36, 62-64, 70, 80-108, 154->157, 167-168, 178-188, 194-200, 209-216, 221-227, 234-248, 256-265, 270->272, 282-283 :: reactive/ubuntu_repository_cache.py 307 106 78 0 67% 35-40, 47-50, 59, 65-83, 120-130, 136-139, 159-190, 197-198, 205-207, 214-226, 233-240, 247-253, 260-261, 267, 276-277, 283-289, 302-308, 321-325, 450-455 :: ------------------------------------------------------------------------------------------------ :: TOTAL 1927 1087 513 25 42% :: Coverage HTML written to dir htmlcov :: :: =================== 48 passed, 1 xfailed, 1 warning in 1.47s =================== :: ___________________________________ summary ____________________________________ :: unit: commands succeeded :: congratulations :)