Skip to content

Testsuite failure while building the Debian package #37

@baldurmen

Description

@baldurmen

Sorry to bother you with such a specific problem, but while trying to update the Debian package to the latest version, I've been getting testsuite failures. This happens with both 4.0.0 and 4.1.0.

Maybe you will have an idea of why? Note I cannot reproduce this issue in a virtualenv.

The problem seems to be that stdout isn't really captured. I get a bunch of these failures:

| count_units=386 units_activating=0 units_active=275 units_failed=0 units_inactive=111
_______________________ TestVersion246.test_version_246 ________________________

self = <tests.test_version246.TestVersion246 object at 0x7ffb61c2b990>

    def test_version_246(self) -> None:
        result = execute_main(
            argv=["--no-performance-data"],
            stdout=[
                "systemctl-list-units_v246.txt",
                "systemd-analyze_12.345.txt",
            ],
        )
        result.assert_critical()
>       result.assert_first_line("SYSTEMD CRITICAL - nm-wait-online.service: failed")

tests/test_version246.py:14: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <tests.helper.MockResult object at 0x7ffb61a69390>
first_line = 'SYSTEMD CRITICAL - nm-wait-online.service: failed'

    def assert_first_line(self, first_line: str) -> None:
>       assert self.first_line == first_line
E       AssertionError

tests/helper.py:171: AssertionError
----------------------------- Captured stdout call -----------------------------
SYSTEMD CRITICAL - nm-wait-online.service: failed

I added some code to debug further and did indeed get self.first_line = None and first_line = SYSTEMD CRITICAL - nm-wait-online.service: failed

Here's the full log:

monitoring-plugins-systemd_4.1.0-1_amd64-2024-05-03T21:00:09Z.txt

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions