From 57fa9e6c5bf553a5a4f3124c611f097700ae554f Mon Sep 17 00:00:00 2001 From: GuyAfik Date: Mon, 18 Dec 2023 17:44:44 +0200 Subject: [PATCH] export graph and do not remove neo4j service --- .../content_graph/tests/create_content_graph_test.py | 12 ------------ .../content_graph/tests/format_with_graph_test.py | 1 - .../content_graph/tests/generate_docs_script_test.py | 1 - .../content_graph/tests/graph_validator_test.py | 2 +- .../content_graph/tests/pack_metadata_graph_test.py | 1 - .../tests/prepare_content_graph_test.py | 1 - .../content_graph/tests/update_content_graph_test.py | 1 - 7 files changed, 1 insertion(+), 18 deletions(-) diff --git a/demisto_sdk/commands/content_graph/tests/create_content_graph_test.py b/demisto_sdk/commands/content_graph/tests/create_content_graph_test.py index 1a1d88e438e..12bebdd6314 100644 --- a/demisto_sdk/commands/content_graph/tests/create_content_graph_test.py +++ b/demisto_sdk/commands/content_graph/tests/create_content_graph_test.py @@ -60,7 +60,6 @@ def setup_method(mocker, repo: Repo): } }, ) - neo4j_service.stop() @pytest.fixture @@ -1093,17 +1092,6 @@ def test_create_content_graph_empty_repository( create_content_graph(interface) assert not interface.search() - def test_stop_content_graph(self): - """ - Given: - - A running content graph service. - When: - - Running neo4j_service.stop() - Then: - - Make sure no exception is raised. - """ - neo4j_service.stop() - def test_create_content_graph_incident_to_alert_scripts( self, repo: Repo, tmp_path: Path, mocker ): diff --git a/demisto_sdk/commands/content_graph/tests/format_with_graph_test.py b/demisto_sdk/commands/content_graph/tests/format_with_graph_test.py index 1659daee923..3fe694d2b38 100644 --- a/demisto_sdk/commands/content_graph/tests/format_with_graph_test.py +++ b/demisto_sdk/commands/content_graph/tests/format_with_graph_test.py @@ -52,7 +52,6 @@ def setup_method(mocker, repo): } }, ) - neo4j_service.stop() @pytest.fixture diff --git a/demisto_sdk/commands/content_graph/tests/generate_docs_script_test.py b/demisto_sdk/commands/content_graph/tests/generate_docs_script_test.py index 5bfe1f88f38..73298071899 100644 --- a/demisto_sdk/commands/content_graph/tests/generate_docs_script_test.py +++ b/demisto_sdk/commands/content_graph/tests/generate_docs_script_test.py @@ -39,7 +39,6 @@ def setup_method(mocker, repo): bc.CONTENT_PATH = Path(repo.path) mocker.patch.object(neo4j_service, "REPO_PATH", Path(repo.path)) mocker.patch.object(ContentGraphInterface, "repo_path", Path(repo.path)) - neo4j_service.stop() @pytest.fixture diff --git a/demisto_sdk/commands/content_graph/tests/graph_validator_test.py b/demisto_sdk/commands/content_graph/tests/graph_validator_test.py index ce1e35cac7e..a7aa000e5e1 100644 --- a/demisto_sdk/commands/content_graph/tests/graph_validator_test.py +++ b/demisto_sdk/commands/content_graph/tests/graph_validator_test.py @@ -46,7 +46,7 @@ def setup_method(mocker): bc.CONTENT_PATH = GIT_PATH mocker.patch.object(neo4j_service, "REPO_PATH", GIT_PATH) mocker.patch.object(ContentGraphInterface, "repo_path", GIT_PATH) - mocker.patch.object(ContentGraphInterface, "export", return_value=None) + mocker.patch.object(ContentGraphInterface, "export_graph", return_value=None) mocker.patch( "demisto_sdk.commands.common.docker_images_metadata.get_remote_file_from_api", return_value={ diff --git a/demisto_sdk/commands/content_graph/tests/pack_metadata_graph_test.py b/demisto_sdk/commands/content_graph/tests/pack_metadata_graph_test.py index e7e4bb954fd..8382de6a632 100644 --- a/demisto_sdk/commands/content_graph/tests/pack_metadata_graph_test.py +++ b/demisto_sdk/commands/content_graph/tests/pack_metadata_graph_test.py @@ -31,7 +31,6 @@ def setup_method(mocker, repo: Repo): bc.CONTENT_PATH = Path(repo.path) mocker.patch.object(ContentGraphInterface, "repo_path", Path(repo.path)) mocker.patch.object(neo4j_service, "REPO_PATH", Path(repo.path)) - neo4j_service.stop() @pytest.fixture diff --git a/demisto_sdk/commands/content_graph/tests/prepare_content_graph_test.py b/demisto_sdk/commands/content_graph/tests/prepare_content_graph_test.py index bd0f2ba6f04..e0e51757439 100644 --- a/demisto_sdk/commands/content_graph/tests/prepare_content_graph_test.py +++ b/demisto_sdk/commands/content_graph/tests/prepare_content_graph_test.py @@ -50,7 +50,6 @@ def setup_method(mocker, repo: Repo): } }, ) - neo4j_service.stop() @pytest.fixture diff --git a/demisto_sdk/commands/content_graph/tests/update_content_graph_test.py b/demisto_sdk/commands/content_graph/tests/update_content_graph_test.py index 55bc97026c4..9508817dc61 100644 --- a/demisto_sdk/commands/content_graph/tests/update_content_graph_test.py +++ b/demisto_sdk/commands/content_graph/tests/update_content_graph_test.py @@ -58,7 +58,6 @@ def setup_method(mocker): } }, ) - neo4j_service.stop() @pytest.fixture