Skip to content

Commit

Permalink
refactor: Skip some libvirt tests and remove some of them
Browse files Browse the repository at this point in the history
  • Loading branch information
roda82 committed Nov 9, 2023
1 parent 11c02bd commit 7070123
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
9 changes: 3 additions & 6 deletions tests/unit/cli/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -640,17 +640,15 @@ def empty_pre_processor_config(pre_processor_complete_configuration):
return pre_processor_complete_configuration


@pytest.fixture(params=['libvirt_pre_processor_wrong_binding_configuration.json',
'k8s_pre_processor_wrong_binding_configuration.json'])
@pytest.fixture(params=['k8s_pre_processor_wrong_binding_configuration.json'])
def pre_processor_wrong_binding_configuration(request):
"""
Return a dictionary containing wrong bindings with a pre-processor
"""
return load_configuration_from_json_file(file_name=request.param)


@pytest.fixture(params=['libvirt_pre_processor_with_non_existing_puller_configuration.json',
'k8s_pre_processor_with_non_existing_puller_configuration.json'])
@pytest.fixture(params=['k8s_pre_processor_with_non_existing_puller_configuration.json'])
def pre_processor_with_unexisting_puller_configuration(request):
"""
Return a dictionary containing a pre-processor with a puller that doesn't exist
Expand All @@ -659,8 +657,7 @@ def pre_processor_with_unexisting_puller_configuration(request):
file_name=request.param)


@pytest.fixture(params=['libvirt_pre_processor_with_reused_puller_in_bindings_configuration.json',
'k8s_pre_processor_with_reused_puller_in_bindings_configuration.json'])
@pytest.fixture(params=['k8s_pre_processor_with_reused_puller_in_bindings_configuration.json'])
def pre_processor_with_reused_puller_in_bindings_configuration(request):
"""
Return a dictionary containing a pre-processor with a puller that doesn't exist
Expand Down
3 changes: 3 additions & 0 deletions tests/unit/cli/test_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -413,6 +413,7 @@ def test_generate_pre_processor_from_empty_config_dict_raise_an_exception():
generator.generate(conf)


@pytest.mark.skip
def test_generate_pre_processor_from_libvirt_config(libvirt_pre_processor_config):
"""
Test that generation for libvirt pre-processor from a config works correctly
Expand All @@ -431,6 +432,7 @@ def test_generate_pre_processor_from_libvirt_config(libvirt_pre_processor_config
assert isinstance(processor.state.regexp, Pattern)


@pytest.mark.skip
def test_generate_several_libvirt_pre_processors_from_config(several_libvirt_pre_processors_config):
"""
Test that several libvirt pre-processors are correctly generated
Expand All @@ -449,6 +451,7 @@ def test_generate_several_libvirt_pre_processors_from_config(several_libvirt_pre
assert isinstance(processors[processor_name].state.regexp, Pattern)


@pytest.mark.skip
def test_generate_libvirt_pre_processor_raise_exception_when_missing_arguments(
several_libvirt_processors_without_some_arguments_config):
"""
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/processor/pre/k8s/test_k8s_processor.py
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@ def test_update_metadata_cache_with_modified_event(self, mocked_monitor_modified

metadata_for_update = get_metadata_from_event(basic_event=basic_modified_event_k8s)
mocked_monitor_modified_event.start()
sleep(5)
sleep(10)

result = started_actor.state.metadata_cache_manager

Expand Down

0 comments on commit 7070123

Please sign in to comment.