wazuh / wazuh-packages

Wazuh - Tools for packages creation
https://wazuh.com
GNU General Public License v2.0
105 stars 96 forks source link

Failing checks after merging 4.7.2 into 4.8.0 #2717

Closed pereyra-m closed 5 months ago

pereyra-m commented 10 months ago

Description

In the PR #2715 some checks are failing. Here are some more details:

Wazuh CI / All In One - Ubuntu xenial - Tests https://github.com/wazuh/wazuh-packages/pull/2715/checks?check_run_id=19861910827

=================================== FAILURES ===================================
____________________________ test_check_log_errors _____________________________

    @pytest.mark.wazuh
    def test_check_log_errors():
        found_error = False
        with open('/var/ossec/logs/ossec.log', 'r') as f:
            for line in f.readlines():
                if 'ERROR' in line:
                    if 'ERROR: Cluster error detected' not in line and 'agent-upgrade: ERROR: (8123): There has been an error executing the request in the tasks manager.' not in line:
                        found_error = True
                        break
>       assert found_error == False, line
E       AssertionError: 2023/12/21 13:22:50 wazuh-modulesd:syscollector: ERROR: Can't load syscollector.
E         
E       assert True == False
E         +True
E         -False

test_unattended.py:217: AssertionError
=========================== short test summary info ============================
FAILED test_unattended.py::test_check_log_errors - AssertionError: 2023/12/21...
================== 1 failed, 18 passed, 3 deselected in 7.14s ==================

Wazuh CI / All In One - Ubuntu xenial installation https://github.com/wazuh/wazuh-packages/pull/2715/checks?check_run_id=19881960271

22/12/2023 02:24:55 INFO: Starting Wazuh indexer installation.
Reading package lists... Building dependency tree... Reading state information... E: Unable to locate package wazuh-indexer
22/12/2023 02:24:55 DEBUG: Checking Wazuh installation.
22/12/2023 02:24:56 ERROR: Wazuh indexer installation failed.
22/12/2023 02:24:56 INFO: --- Removing existing Wazuh installation ---
22/12/2023 02:24:56 DEBUG: Removing GPG key from system.
22/12/2023 02:24:56 INFO: Installation cleaned. Check the /var/log/wazuh-install.log file to learn more about the issue.

Wazuh CI / Distributed - Wazuh indexer installation https://github.com/wazuh/wazuh-packages/pull/2715/checks?check_run_id=19882089307

Traceback (most recent call last):
File "/usr/lib/cnf-update-db", line 3, in
import apt_pkg
ModuleNotFoundError: No module named 'apt_pkg'
Reading package lists...
W: http://ppa.launchpad.net/deadsnakes/ppa/ubuntu/dists/jammy/InRelease: Key is stored in legacy trusted.gpg keyring (/etc/apt/trusted.gpg), see the DEPRECATION section in apt-key(8) for details.
E: Problem executing scripts APT::Update::Post-Invoke-Success 'if /usr/bin/test -w /var/lib/command-not-found/ -a -e /usr/lib/cnf-update-db; then /usr/lib/cnf-update-db > /dev/null; fi'
E: Sub-process returned an error code

Wazuh CI / Distributed - Wazuh server installation https://github.com/wazuh/wazuh-packages/pull/2715/checks?check_run_id=19860549242

Get:7 https://packages.wazuh.com/4.x/apt stable/main amd64 Packages [38.4 kB]
Traceback (most recent call last):
File "/usr/lib/cnf-update-db", line 3, in
import apt_pkg
ModuleNotFoundError: No module named 'apt_pkg'
Fetched 55.7 kB in 1s (91.0 kB/s)
Reading package lists...
W: http://ppa.launchpad.net/deadsnakes/ppa/ubuntu/dists/jammy/InRelease: Key is stored in legacy trusted.gpg keyring (/etc/apt/trusted.gpg), see the DEPRECATION section in apt-key(8) for details.
E: Problem executing scripts APT::Update::Post-Invoke-Success 'if /usr/bin/test -w /var/lib/command-not-found/ -a -e /usr/lib/cnf-update-db; then /usr/lib/cnf-update-db > /dev/null; fi'
E: Sub-process returned an error code

Wazuh CI / Distributed Cases - manager_indexer - ubuntu - Wazuh indexer installation https://github.com/wazuh/wazuh-packages/pull/2715/checks?check_run_id=19881991505

### ubuntu_focal_master log
- Missing testing log file: /home/ec2-user/workspace/Test_unattended_distributed_cases/artifacts/Test_unattended_distributed_cases_B2077_ubuntu_focal_master.log. Check Jenkins Build for extra info if 
required.

Wazuh CI / Distributed Cases - manager_indexer - centos - Tests https://github.com/wazuh/wazuh-packages/pull/2715/checks?check_run_id=19882175680

### centos_7_unattended_master log
- Missing testing log file: /home/ec2-user/workspace/Test_unattended_distributed_cases@2/artifacts/Test_unattended_distributed_cases_B2078_centos_7_unattended_master.log. Check Jenkins Build for extra
 info if required.

### centos_7_unattended log
- Missing testing log file: /home/ec2-user/workspace/Test_unattended_distributed_cases@2/artifacts/Test_unattended_distributed_cases_B2078_centos_7_unattended.log. Check Jenkins Build for extra info i
f required.

Wazuh CI / Distributed Cases - manager_indexer - ubuntu - Tests https://github.com/wazuh/wazuh-packages/pull/2715/checks?check_run_id=19859190596

=================================== FAILURES ===================================
_________________ test_check_indexer_cluster_status_not_yellow _________________

    @pytest.mark.indexer_cluster
    def test_check_indexer_cluster_status_not_yellow():
>       assert get_indexer_cluster_status() != "yellow"
E       AssertionError: assert 'yellow' != 'yellow'
E        +  where 'yellow' = get_indexer_cluster_status()

test_unattended.py:198: AssertionError
=========================== short test summary info ============================
FAILED test_unattended.py::test_check_indexer_cluster_status_not_yellow - Ass...
================== 1 failed, 16 passed, 5 deselected in 1.02s ==================

DoD

Dwordcito commented 5 months ago

Test is currently disabled and probably completely refactored in 5.0.0