Skip to content

Commit

Permalink
refac: Update xfail for bionic test download feed
Browse files Browse the repository at this point in the history
  • Loading branch information
jmv74211 committed May 30, 2022
1 parent 70109ae commit d170c61
Showing 1 changed file with 20 additions and 23 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -121,26 +121,23 @@ def test_download_feeds(configuration, metadata, set_wazuh_configuration_vdt, tr
- r'Starting .* database update'
- r'The update of the .* feed finished successfully'
'''
try:
# Check that the feed update has started
evm.check_provider_database_update_start_log(metadata['provider_name'])
# Check that the feed has been updated successfully
evm.check_provider_database_update_finish_log(provider_name=metadata['provider_name'],
timeout=metadata['download_timeout'])

if 'provider_json_name' in metadata:
evm.check_provider_database_update_start_log(metadata['provider_json_name'])
evm.check_provider_database_update_finish_log(provider_name=metadata['provider_json_name'],
timeout=metadata['download_timeout'])

# Check that the timestamp of the feed metadata does not exceed the established threshold limit.
if metadata['update_treshold_weeks'] != 'None':
assert vd.feed_is_recently_updated(provider_name=metadata['provider_name'],
provider_os=metadata['provider_os'],
threshold_weeks=metadata['update_treshold_weeks']), '' \
f"The {metadata['provider_os']} feed has not been recently updated"
except TimeoutError as e:
if metadata['provider_os'] == 'BIONIC':
pytest.xfail(reason='Ubuntu Bionic feed parsing error - Wazuh/Wazuh Issue #13556')
else:
pytest.fail()
if metadata['provider_os'] == 'BIONIC':
pytest.xfail(reason='Ubuntu Bionic feed parsing error - Wazuh/Wazuh Issue #13556')

# Check that the feed update has started
evm.check_provider_database_update_start_log(metadata['provider_name'])
# Check that the feed has been updated successfully
evm.check_provider_database_update_finish_log(provider_name=metadata['provider_name'],
timeout=metadata['download_timeout'])

if 'provider_json_name' in metadata:
evm.check_provider_database_update_start_log(metadata['provider_json_name'])
evm.check_provider_database_update_finish_log(provider_name=metadata['provider_json_name'],
timeout=metadata['download_timeout'])

# Check that the timestamp of the feed metadata does not exceed the established threshold limit.
if metadata['update_treshold_weeks'] != 'None':
assert vd.feed_is_recently_updated(provider_name=metadata['provider_name'],
provider_os=metadata['provider_os'],
threshold_weeks=metadata['update_treshold_weeks']), '' \
f"The {metadata['provider_os']} feed has not been recently updated"

0 comments on commit d170c61

Please sign in to comment.