Skip to content

fix(report): Parse data from sarif as URI, instead of treating it as … #13

fix(report): Parse data from sarif as URI, instead of treating it as …

fix(report): Parse data from sarif as URI, instead of treating it as … #13

GitHub Actions / Unit Test Results failed Sep 17, 2024 in 0s

2 fail, 3 skipped, 708 pass in 19m 22s

713 tests   708 ✔️  19m 22s ⏱️
    1 suites      3 💤
    1 files        2

Results for commit 31d3924.

Annotations

Check warning on line 0 in tests.test_p4_exception_handling

See this annotation in the file changed.

@github-actions github-actions / Unit Test Results

test_p4_print_exception_wrong_shelve (tests.test_p4_exception_handling) failed

artifacts/junit_results.xml
Raw output
perforce_environment = <tests.perforce_utils.P4TestEnvironment object at 0x7f69ddf5e8b0>
stdout_checker = <tests.conftest.FuzzyCallChecker object at 0x7f69dce24c40>

    def test_p4_print_exception_wrong_shelve(perforce_environment: P4TestEnvironment, stdout_checker: FuzzyCallChecker):
        cl = perforce_environment.vcs_client.make_a_change()
        perforce_environment.settings.PerforceMainVcs.shelve_cls = [cl]
    
        # This is not the 'already committed' case of Swarm review, so it actually should fail
        perforce_environment.run(expect_failure=True)
>       stdout_checker.assert_has_calls_with_param(
            f"Errors during command execution( \"p4 unshelve -s {cl} -f\" )")

tests/test_p4_exception_handling.py:100: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <tests.conftest.FuzzyCallChecker object at 0x7f69dce24c40>
pattern_to_search = 'Errors during command execution( "p4 unshelve -s 35 -f" )'
is_regexp = False

    def assert_has_calls_with_param(self, pattern_to_search, is_regexp=False):
>       assert self._find_call_with_param(pattern_to_search, is_regexp), \
            'Pattern is not found in call list. ' + \
            self._assertion_message(pattern_to_search)
E       AssertionError: Pattern is not found in call list. 
E         Expected param: Errors during command execution( "p4 unshelve -s 35 -f" )
E         Actual list: [call('==> Universum 0.19.20 started execution'),
E          call('1.', ' ', '\x1b[1;34m', 'Connecting', '\x1b[00m'),
E          call('', ' |   ', no_enter=True),
E          call('1.1.', ' ', '\x1b[1;34m', 'Disconnecting', '\x1b[00m'),
E          call('', ' |   ', no_enter=True),
E          call('  ', ' └ ', '\x1b[1;32m', '[Success]', '\x1b[00m'),
E          call('', ' |   ', no_enter=True),
E          call(),
E          call('', ' └ ', '\x1b[1;32m', '[Success]', '\x1b[00m'),
E          call(),
E          call('2.', ' ', '\x1b[1;34m', 'Preparing repository', '\x1b[00m'),
E          call('', ' |   ', no_enter=True),
E          call('==> Adding file /tmp/pytest-of-runner/pytest-0/test_p4_print_exception_wrong_0/artifacts/REPOSITORY_STATE.txt to artifacts...'),
E          call('', ' |   ', no_enter=True),
E          call('2.1.', ' ', '\x1b[1;34m', 'Connecting', '\x1b[00m'),
E          call('', ' |   ', no_enter=True),
E          call('  ', ' |   ', no_enter=True),
E          call('2.1.1.', ' ', '\x1b[1;34m', 'Disconnecting', '\x1b[00m'),
E          call('', ' |   ', no_enter=True),
E          call('  ', ' |   ', no_enter=True),
E          call('    ', ' └ ', '\x1b[1;32m', '[Success]', '\x1b[00m'),
E          call('', ' |   ', no_enter=True),
E          call('  ', ' |   ', no_enter=True),
E          call(),
E          call('', ' |   ', no_enter=True),
E          call('  ', ' └ ', '\x1b[1;32m', '[Success]', '\x1b[00m'),
E          call('', ' |   ', no_enter=True),
E          call(),
E          call('', ' |   ', no_enter=True),
E          call('2.2.', ' ', '\x1b[1;34m', 'Creating workspace', '\x1b[00m'),
E          call('', ' |   ', no_enter=True),
E          call('  ', ' |   ', no_enter=True),
E          call('2.2.1.', ' ', '\x1b[1;34m', 'Cleaning workspace', '\x1b[00m'),
E          call('', ' |   ', no_enter=True),
E          call('  ', ' |   ', no_enter=True),
E          call('    ', ' |   ', no_enter=True),
E          call('==> No client to delete'),
E          call('', ' |   ', no_enter=True),
E          call('  ', ' |   ', no_enter=True),
E          call('    ', ' └ ', '\x1b[1;32m', '[Success]', '\x1b[00m'),
E          call('', ' |   ', no_enter=True),
E          call('  ', ' |   ', no_enter=True),
E          call(),
E          call('', ' |   ', no_enter=True),
E          call('  ', ' |   ', no_enter=True),
E          call("==> Workspace 'p4_disposable_workspace' created/updated."),
E          call('', ' |   ', no_enter=True),
E          call('  ', ' └ ', '\x1b[1;32m', '[Success]', '\x1b[00m'),
E          call('', ' |   ', no_enter=True),
E          call(),
E          call('', ' |   ', no_enter=True),
E          call('2.3.', ' ', '\x1b[1;34m', 'Downloading', '\x1b[00m'),
E          call('', ' |   ', no_enter=True),
E          call('  ', ' |   ', no_enter=True),
E          call("==> Getting latest CL number for '//depot/...'"),
E          call('', ' |   ', no_enter=True),
E          call('  ', ' |   ', no_enter=True),
E          call('==> Latest CL: 35'),
E          call('', ' |   ', no_enter=True),
E          call('  ', ' |   ', no_enter=True),
E          call('==> Downloading //depot/...@35'),
E          call('', ' |   ', no_enter=True),
E          call('  ', ' |   ', no_enter=True),
E          call('==> Downloaded 2 files.'),
E          call('', ' |   ', no_enter=True),
E          call('  ', ' └ ', '\x1b[1;32m', '[Success]', '\x1b[00m'),
E          call('', ' |   ', no_enter=True),
E          call(),
E          call('', ' |   ', no_enter=True),
E          call('2.4.', ' ', '\x1b[1;34m', 'Unshelving', '\x1b[00m'),
E          call('', ' |   ', no_enter=True),
E          call('  ', ' |   ', no_enter=True),
E          call('==> Unshelve CL 35'),
E          call('', ' |   ', no_enter=True),
E          call('  ', ' |   ', no_enter=True),
E          call('\x1b[0;31mError: \x1b[00mChange 35 is already committed.'),
E          call('', ' |   ', no_enter=True),
E          call('  ', ' └ ', '\x1b[1;31m', '[Failed]', '\x1b[00m'),
E          call('', ' |   ', no_enter=True),
E          call(),
E          call('', ' └ ', '\x1b[1;32m', '[Success]', '\x1b[00m'),
E          call(),
E          call('3.', ' ', '\x1b[1;34m', 'Finalizing', '\x1b[00m'),
E          call('', ' |   ', no_enter=True),
E          call('3.1.', ' ', '\x1b[1;34m', 'Connecting', '\x1b[00m'),
E          call('', ' |   ', no_enter=True),
E          call('  ', ' |   ', no_enter=True),
E          call('3.1.1.', ' ', '\x1b[1;34m', 'Disconnecting', '\x1b[00m'),
E          call('', ' |   ', no_enter=True),
E          call('  ', ' |   ', no_enter=True),
E          call('    ', ' └ ', '\x1b[1;32m', '[Success]', '\x1b[00m'),
E          call('', ' |   ', no_enter=True),
E          call('  ', ' |   ', no_enter=True),
E          call(),
E          call('', ' |   ', no_enter=True),
E          call('  ', ' └ ', '\x1b[1;32m', '[Success]', '\x1b[00m'),
E          call('', ' |   ', no_enter=True),
E          call(),
E          call('', ' |   ', no_enter=True),
E          call('3.2.', ' ', '\x1b[1;34m', 'Cleaning workspace', '\x1b[00m'),
E          call('', ' |   ', no_enter=True),
E          call('  ', ' |   ', no_enter=True),
E          call('==> Default CL is empty'),
E          call('', ' |   ', no_enter=True),
E          call('  ', ' |   ', no_enter=True),
E          call("==> Client 'p4_disposable_workspace' deleted"),
E          call('', ' |   ', no_enter=True),
E          call('  ', ' └ ', '\x1b[1;32m', '[Success]', '\x1b[00m'),
E          call('', ' |   ', no_enter=True),
E          call(),
E          call('', ' |   ', no_enter=True),
E          call('3.3.', ' ', '\x1b[1;34m', 'Disconnecting', '\x1b[00m'),
E          call('', ' |   ', no_enter=True),
E          call('  ', ' └ ', '\x1b[1;32m', '[Success]', '\x1b[00m'),
E          call('', ' |   ', no_enter=True),
E          call(),
E          call('', ' |   ', no_enter=True),
E          call('3.4.', ' ', '\x1b[1;34m', 'Disconnecting', '\x1b[00m'),
E          call('', ' |   ', no_enter=True),
E          call('  ', ' └ ', '\x1b[1;32m', '[Success]', '\x1b[00m'),
E          call('', ' |   ', no_enter=True),
E          call(),
E          call('', ' |   ', no_enter=True),
E          call('3.5.', ' ', '\x1b[1;34m', 'Cleaning copied sources', '\x1b[00m'),
E          call('', ' |   ', no_enter=True),
E          call('  ', ' └ ', '\x1b[1;32m', '[Success]', '\x1b[00m'),
E          call('', ' |   ', no_enter=True),
E          call(),
E          call('', ' └ ', '\x1b[1;32m', '[Success]', '\x1b[00m'),
E          call(),
E          call('==> Universum 0.19.20 finished execution')]
E       assert False
E        +  where False = _find_call_with_param('Errors during command execution( "p4 unshelve -s 35 -f" )', False)
E        +    where _find_call_with_param = <tests.conftest.FuzzyCallChecker object at 0x7f69dce24c40>._find_call_with_param

tests/conftest.py:38: AssertionError

Check warning on line 0 in tests.test_poll

See this annotation in the file changed.

@github-actions github-actions / Unit Test Results

test_p4_error_command_line_wrong_port (tests.test_poll) failed

artifacts/junit_results.xml
Raw output
stdout_checker = <tests.conftest.FuzzyCallChecker object at 0x7f69dcbf8eb0>
perforce_workspace = <tests.perforce_utils.PerforceWorkspace object at 0x7f69dcc09250>
tmp_path = PosixPath('/tmp/pytest-of-runner/pytest-0/test_p4_error_command_line_wro0')

    def test_p4_error_command_line_wrong_port(stdout_checker: FuzzyCallChecker,
                                              perforce_workspace: PerforceWorkspace,
                                              tmp_path: pathlib.Path):
        db_file = tmp_path / "p4poll.json"
        result = __main__.main(["poll", "-ot", "term",
                                "-vt", "p4",
                                "-f", str(db_file),
                                "-p4p", "127.0.0.1:1024",
                                "-p4u", perforce_workspace.server.user,
                                "-p4P", perforce_workspace.server.password,
                                "-p4d", perforce_workspace.depot,
                                "-jtu", "https://localhost/?%s"])
        assert result != 0
>       stdout_checker.assert_has_calls_with_param("TCP connect to 127.0.0.1:1024 failed.")

tests/test_poll.py:62: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <tests.conftest.FuzzyCallChecker object at 0x7f69dcbf8eb0>
pattern_to_search = 'TCP connect to 127.0.0.1:1024 failed.', is_regexp = False

    def assert_has_calls_with_param(self, pattern_to_search, is_regexp=False):
>       assert self._find_call_with_param(pattern_to_search, is_regexp), \
            'Pattern is not found in call list. ' + \
            self._assertion_message(pattern_to_search)
E       AssertionError: Pattern is not found in call list. 
E         Expected param: TCP connect to 127.0.0.1:1024 failed.
E         Actual list: [call('==> Universum 0.19.20 started execution'),
E          call('1.', ' ', '\x1b[1;34m', 'Enumerating changes', '\x1b[00m'),
E          call('', ' |   ', no_enter=True),
E          call('1.1.', ' ', '\x1b[1;34m', 'Connecting', '\x1b[00m'),
E          call('', ' |   ', no_enter=True),
E          call('  ', ' |   ', no_enter=True),
E          call('1.1.1.', ' ', '\x1b[1;34m', 'Disconnecting', '\x1b[00m'),
E          call('', ' |   ', no_enter=True),
E          call('  ', ' |   ', no_enter=True),
E          call('    ', ' └ ', '\x1b[1;32m', '[Success]', '\x1b[00m'),
E          call('', ' |   ', no_enter=True),
E          call('  ', ' |   ', no_enter=True),
E          call(),
E          call('', ' |   ', no_enter=True),
E          call('  ', ' |   ', no_enter=True),
E          call('\x1b[0;31mError: \x1b[00mConnect to server failed; check $P4PORT.'),
E          call('', ' |   ', no_enter=True),
E          call('  ', ' └ ', '\x1b[1;31m', '[Failed]', '\x1b[00m'),
E          call('', ' |   ', no_enter=True),
E          call(),
E          call('', ' └ ', '\x1b[1;32m', '[Success]', '\x1b[00m'),
E          call(),
E          call('2.', ' ', '\x1b[1;34m', 'Finalizing', '\x1b[00m'),
E          call('', ' |   ', no_enter=True),
E          call('2.1.', ' ', '\x1b[1;34m', 'Disconnecting', '\x1b[00m'),
E          call('', ' |   ', no_enter=True),
E          call('  ', ' └ ', '\x1b[1;32m', '[Success]', '\x1b[00m'),
E          call('', ' |   ', no_enter=True),
E          call(),
E          call('', ' └ ', '\x1b[1;32m', '[Success]', '\x1b[00m'),
E          call(),
E          call('==> Universum 0.19.20 finished execution')]
E       assert False
E        +  where False = _find_call_with_param('TCP connect to 127.0.0.1:1024 failed.', False)
E        +    where _find_call_with_param = <tests.conftest.FuzzyCallChecker object at 0x7f69dcbf8eb0>._find_call_with_param

tests/conftest.py:38: AssertionError