Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Test failure: tests/common/test_event.py::TestEvent::test_collect_events_should_ignore_invalid_event_files - AssertionError: 3 != 2 #3217

Open
waldiTM opened this issue Sep 17, 2024 · 0 comments
Assignees

Comments

@waldiTM
Copy link

waldiTM commented Sep 17, 2024

Describe the bug: A clear and concise description of what the bug is.

    @skip_if_predicate_true(is_python_version_26_or_34, "Disabled on Python 2.6 and 3.4, they run on containers where the OS commands needed by the test are not present.")
    def test_collect_events_should_ignore_invalid_event_files(self):
        self._create_test_event_file("custom_script_1.tld")  # a valid event
        self._create_test_event_file("custom_script_utf-16.tld")
        self._create_test_event_file("custom_script_invalid_json.tld")
        os.chmod(self._create_test_event_file("custom_script_no_read_access.tld"), 0o200)
        self._create_test_event_file("custom_script_2.tld")  # another valid event
    
        with patch("azurelinuxagent.common.event.add_event") as mock_add_event:
            event_list = self._collect_events()
    
>           self.assertEqual(
                len(event_list), 2)
E           AssertionError: 3 != 2

tests/common/test_event.py:429: AssertionError

Distro and WALinuxAgent details (please complete the following information):
Debian 13

@narrieta narrieta self-assigned this Sep 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants