[Bug 2283066] Review Request: python-steampunk-spotter - Scan, analyze, enhance, and provide insights for your playbooks using Spotter

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



https://bugzilla.redhat.com/show_bug.cgi?id=2283066

Benson Muite <benson_muite@xxxxxxxxxxxxx> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |benson_muite@xxxxxxxxxxxxx



--- Comment #8 from Benson Muite <benson_muite@xxxxxxxxxxxxx> ---
Some tests fail on Rawhide:


============================= test session starts
==============================
platform linux -- Python 3.14.0b4, pytest-8.3.5, pluggy-1.6.0
rootdir:
/builddir/build/BUILD/python-steampunk-spotter-5.5.1-build/spotter-cli-5.5.1
configfile: pyproject.toml
plugins: xdist-3.7.0
collected 230 items
tests/unit/spotter/test_api.py ....................                      [  8%]
tests/unit/spotter/test_environment.py .........................         [ 19%]
tests/unit/spotter/test_parsing.py ..................................... [ 35%]
............................................                             [ 54%]
tests/unit/spotter/test_reporting.py ........                            [ 58%]
tests/unit/spotter/test_rewriting.py ......................              [ 67%]
tests/unit/spotter/test_scanning.py .................................... [ 83%]
FFF.....                                                                 [ 86%]
tests/unit/spotter/test_storage.py ..............                        [ 93%]
tests/unit/spotter/test_utils.py ................                        [100%]
=================================== FAILURES
===================================
_
TestScanning.test_output_formatting[YamlFormatter-True-True-True-scan_output_dict.yml]
_
self = <tests.unit.spotter.test_scanning.TestScanning object at 0x7ff4acf81cc0>
formatter_class = <class
'spotter.library.formatting.yaml_formatter.YamlFormatter'>
docs_url = True, scan_url = True, colors = True
reference_file = 'scan_output_dict.yml'
    @pytest.mark.parametrize(
        "formatter_class, docs_url, scan_url, colors, reference_file",
        [
            (TextFormatter, True, True, True, "scan_output_full.txt"),
            (TextFormatter, True, True, False, "scan_output_no_colors.txt"),
            (TextFormatter, False, True, True, "scan_output_no_docs.txt"),
            (TextFormatter, True, False, True, "scan_output_no_scan_url.txt"),
            (TextFormatter, False, True, False,
"scan_output_no_colors_no_docs.txt"),
            (TextFormatter, False, False, False,
"scan_output_no_colors_no_docs_no_scan_url.txt"),
            (JsonFormatter, True, True, True, "scan_output_dict.json"),
            (JsonFormatter, False, True, True,
"scan_output_dict_no_docs.json"),
            (JsonFormatter, True, False, True,
"scan_output_dict_no_web_urls.json"),
            (YamlFormatter, True, True, True, "scan_output_dict.yml"),
            (YamlFormatter, False, True, True, "scan_output_dict_no_docs.yml"),
            (YamlFormatter, True, False, True,
"scan_output_dict_no_web_urls.yml"),
            (JUnitFormatter, True, True, True, "scan_output_junit.xml"),
            (JUnitFormatter, False, True, True,
"scan_output_junit_no_docs.xml"),
        ],
    )
    def test_output_formatting(
        self, formatter_class: Type[OutputFormatter], docs_url: bool, scan_url:
bool, colors: bool, reference_file: str
    ) -> None:
        output = formatter_class().format(
            self.TEST_SCAN_RESULT,
            self.TEST_PARSING_RESULT,
            OutputFormatOptions(
                show_docs_url=docs_url, show_scan_url=scan_url,
show_colors=colors, rewriting_enabled=False
            ),
        )

        encoding = "unicode_escape" if colors else "utf-8"
        with (Path("tests/unit/data/scanning/") / reference_file).open("r",
encoding=encoding) as f:
            reference_output = f.read()
>       assert output == reference_output
E       AssertionError: assert 'uuid: VzhZjn..._type: TASK\n' == 'uuid:
VzhZjn..._type: TASK\n'
E         
E         Skipping 438 identical leading characters in diff, use -v to show
E         + ject_url: 
E         - ject_url:
https://spotter.xlab.si/organization/organization_url/projects/proj_url/
E         ? ^^^^^^^^^
E         +    
https://spotter.xlab.si/organization/organization_url/projects/proj_url/
E         ? ^^^...
E         
E         ...Full output truncated (105 lines hidden), use '-vv' to show
tests/unit/spotter/test_scanning.py:851: AssertionError
_
TestScanning.test_output_formatting[YamlFormatter-False-True-True-scan_output_dict_no_docs.yml]
_
self = <tests.unit.spotter.test_scanning.TestScanning object at 0x7ff4acf81d60>
formatter_class = <class
'spotter.library.formatting.yaml_formatter.YamlFormatter'>
docs_url = False, scan_url = True, colors = True
reference_file = 'scan_output_dict_no_docs.yml'
    @pytest.mark.parametrize(
        "formatter_class, docs_url, scan_url, colors, reference_file",
        [
            (TextFormatter, True, True, True, "scan_output_full.txt"),
            (TextFormatter, True, True, False, "scan_output_no_colors.txt"),
            (TextFormatter, False, True, True, "scan_output_no_docs.txt"),
            (TextFormatter, True, False, True, "scan_output_no_scan_url.txt"),
            (TextFormatter, False, True, False,
"scan_output_no_colors_no_docs.txt"),
            (TextFormatter, False, False, False,
"scan_output_no_colors_no_docs_no_scan_url.txt"),
            (JsonFormatter, True, True, True, "scan_output_dict.json"),
            (JsonFormatter, False, True, True,
"scan_output_dict_no_docs.json"),
            (JsonFormatter, True, False, True,
"scan_output_dict_no_web_urls.json"),
            (YamlFormatter, True, True, True, "scan_output_dict.yml"),
            (YamlFormatter, False, True, True, "scan_output_dict_no_docs.yml"),
            (YamlFormatter, True, False, True,
"scan_output_dict_no_web_urls.yml"),
            (JUnitFormatter, True, True, True, "scan_output_junit.xml"),
            (JUnitFormatter, False, True, True,
"scan_output_junit_no_docs.xml"),
        ],
    )
    def test_output_formatting(
        self, formatter_class: Type[OutputFormatter], docs_url: bool, scan_url:
bool, colors: bool, reference_file: str
    ) -> None:
        output = formatter_class().format(
            self.TEST_SCAN_RESULT,
            self.TEST_PARSING_RESULT,
            OutputFormatOptions(
                show_docs_url=docs_url, show_scan_url=scan_url,
show_colors=colors, rewriting_enabled=False
            ),
        )

        encoding = "unicode_escape" if colors else "utf-8"
        with (Path("tests/unit/data/scanning/") / reference_file).open("r",
encoding=encoding) as f:
            reference_output = f.read()
>       assert output == reference_output
E       AssertionError: assert 'uuid: VzhZjn..._type: TASK\n' == 'uuid:
VzhZjn..._type: TASK\n'
E         
E         Skipping 438 identical leading characters in diff, use -v to show
E         + ject_url: 
E         - ject_url:
https://spotter.xlab.si/organization/organization_url/projects/proj_url/
E         ? ^^^^^^^^^
E         +    
https://spotter.xlab.si/organization/organization_url/projects/proj_url/
E         ? ^^^...
E         
E         ...Full output truncated (101 lines hidden), use '-vv' to show
tests/unit/spotter/test_scanning.py:851: AssertionError
_
TestScanning.test_output_formatting[YamlFormatter-True-False-True-scan_output_dict_no_web_urls.yml]
_
self = <tests.unit.spotter.test_scanning.TestScanning object at 0x7ff4acf81e00>
formatter_class = <class
'spotter.library.formatting.yaml_formatter.YamlFormatter'>
docs_url = True, scan_url = False, colors = True
reference_file = 'scan_output_dict_no_web_urls.yml'
    @pytest.mark.parametrize(
        "formatter_class, docs_url, scan_url, colors, reference_file",
        [
            (TextFormatter, True, True, True, "scan_output_full.txt"),
            (TextFormatter, True, True, False, "scan_output_no_colors.txt"),
            (TextFormatter, False, True, True, "scan_output_no_docs.txt"),
            (TextFormatter, True, False, True, "scan_output_no_scan_url.txt"),
            (TextFormatter, False, True, False,
"scan_output_no_colors_no_docs.txt"),
            (TextFormatter, False, False, False,
"scan_output_no_colors_no_docs_no_scan_url.txt"),
            (JsonFormatter, True, True, True, "scan_output_dict.json"),
            (JsonFormatter, False, True, True,
"scan_output_dict_no_docs.json"),
            (JsonFormatter, True, False, True,
"scan_output_dict_no_web_urls.json"),
            (YamlFormatter, True, True, True, "scan_output_dict.yml"),
            (YamlFormatter, False, True, True, "scan_output_dict_no_docs.yml"),
            (YamlFormatter, True, False, True,
"scan_output_dict_no_web_urls.yml"),
            (JUnitFormatter, True, True, True, "scan_output_junit.xml"),
            (JUnitFormatter, False, True, True,
"scan_output_junit_no_docs.xml"),
        ],
    )
    def test_output_formatting(
        self, formatter_class: Type[OutputFormatter], docs_url: bool, scan_url:
bool, colors: bool, reference_file: str
    ) -> None:
        output = formatter_class().format(
            self.TEST_SCAN_RESULT,
            self.TEST_PARSING_RESULT,
            OutputFormatOptions(
                show_docs_url=docs_url, show_scan_url=scan_url,
show_colors=colors, rewriting_enabled=False
            ),
        )

        encoding = "unicode_escape" if colors else "utf-8"
        with (Path("tests/unit/data/scanning/") / reference_file).open("r",
encoding=encoding) as f:
            reference_output = f.read()
>       assert output == reference_output
E       AssertionError: assert 'uuid: VzhZjn..._type: TASK\n' == 'uuid:
VzhZjn..._type: TASK\n'
E         
E         Skipping 1006 identical leading characters in diff, use -v to show
E         +  doc_url: 
E         -  doc_url:
https://docs.steampunk.si/plugins/sensu/sensu_go/1.13.2/module/user.html
E         ?  ^^^^^^^^
E         +      
https://docs.steampunk.si/plugins/sensu/sensu_go/1.13.2/module/user.html
E         ?  ^^^^...
E         
E         ...Full output truncated (71 lines hidden), use '-vv' to show
tests/unit/spotter/test_scanning.py:851: AssertionError
=========================== short test summary info
============================
FAILED
tests/unit/spotter/test_scanning.py::TestScanning::test_output_formatting[YamlFormatter-True-True-True-scan_output_dict.yml]
FAILED
tests/unit/spotter/test_scanning.py::TestScanning::test_output_formatting[YamlFormatter-False-True-True-scan_output_dict_no_d
ocs.yml]
FAILED
tests/unit/spotter/test_scanning.py::TestScanning::test_output_formatting[YamlFormatter-True-False-True-scan_output_dict_no_w
eb_urls.yml]
======================== 3 failed, 227 passed in 12.92s
========================


-- 
You are receiving this mail because:
You are always notified about changes to this product and component
You are on the CC list for the bug.
https://bugzilla.redhat.com/show_bug.cgi?id=2283066

Report this comment as SPAM: https://bugzilla.redhat.com/enter_bug.cgi?product=Bugzilla&format=report-spam&short_desc=Report%20of%20Bug%202283066%23c8

-- 
_______________________________________________
package-review mailing list -- package-review@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to package-review-leave@xxxxxxxxxxxxxxxxxxxxxxx
Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/package-review@xxxxxxxxxxxxxxxxxxxxxxx
Do not reply to spam, report it: https://pagure.io/fedora-infrastructure/new_issue




[Index of Archives]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite Conditions]     [KDE Users]

  Powered by Linux