Skip to content

Commit

Permalink
feat(#3337): Add regions tests for aws config integration
Browse files Browse the repository at this point in the history
  • Loading branch information
nico-stefani committed Jan 11, 2023
1 parent 7f77bf5 commit df40f26
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,42 @@
only_logs_after: 2022-NOV-20
regions: us-fake-1
expected_results: 0

- name: config_region_with_data
description: Config regions configurations
configuration_parameters:
BUCKET_TYPE: config
BUCKET_NAME: wazuh-config-integration-tests
REGIONS: us-east-1
metadata:
bucket_type: config
bucket_name: wazuh-config-integration-tests
only_logs_after: 2022-NOV-20
regions: us-east-1
expected_results: 3

- name: config_regions_with_data
description: Config regions configurations
configuration_parameters:
BUCKET_TYPE: config
BUCKET_NAME: wazuh-config-integration-tests
REGIONS: us-east-1,us-east-2
metadata:
bucket_type: config
bucket_name: wazuh-config-integration-tests
only_logs_after: 2022-NOV-20
regions: us-east-1,us-east-2
expected_results: 5

- name: config_inexistent_region
description: Config regions configurations
configuration_parameters:
BUCKET_TYPE: config
BUCKET_NAME: wazuh-config-integration-tests
REGIONS: us-fake-1
metadata:
bucket_type: config
bucket_name: wazuh-config-integration-tests
only_logs_after: 2022-NOV-20
regions: us-fake-1
expected_results: 0
4 changes: 2 additions & 2 deletions tests/integration/test_aws/test_regions.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import os

import pytest
from wazuh_testing import global_parameters
from wazuh_testing import T_20, global_parameters
from wazuh_testing.modules.aws import event_monitor
from wazuh_testing.modules.aws.constants import RANDOM_ACCOUNT_ID
from wazuh_testing.modules.aws.db_utils import (
Expand Down Expand Up @@ -132,7 +132,7 @@ def test_regions(

if expected_results:
wazuh_log_monitor.start(
timeout=global_parameters.default_timeout,
timeout=T_20,
callback=event_monitor.callback_detect_event_processed,
error_message='The AWS module did not process the expected number of events',
accum_results=expected_results
Expand Down

0 comments on commit df40f26

Please sign in to comment.