From f016bc6d367ca5380c55d6a11eccf987e6cc514c Mon Sep 17 00:00:00 2001 From: Igor Ilic <30923996+dexters1@users.noreply.github.com> Date: Wed, 17 Sep 2025 10:59:24 +0200 Subject: [PATCH] fix: Resolve issue with server start test (#1408) ## Description ## Type of Change - [ ] Bug fix (non-breaking change that fixes an issue) - [ ] New feature (non-breaking change that adds functionality) - [ ] Breaking change (fix or feature that would cause existing functionality to change) - [ ] Documentation update - [ ] Code refactoring - [ ] Performance improvement - [ ] Other (please specify): ## Changes Made - - - ## Testing ## Screenshots/Videos (if applicable) ## Pre-submission Checklist - [ ] **I have tested my changes thoroughly before submitting this PR** - [ ] **This PR contains minimal changes necessary to address the issue/feature** - [ ] My code follows the project's coding standards and style guidelines - [ ] I have added tests that prove my fix is effective or that my feature works - [ ] I have added necessary documentation (if applicable) - [ ] All new and existing tests pass - [ ] I have searched existing PRs to ensure this change hasn't been submitted already - [ ] I have linked any relevant issues in the description - [ ] My commits have clear and descriptive messages ## Related Issues ## Additional Notes ## DCO Affirmation I affirm that all code in every commit of this pull request conforms to the terms of the Topoteretes Developer Certificate of Origin. --- cognee/tests/test_cognee_server_start.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/cognee/tests/test_cognee_server_start.py b/cognee/tests/test_cognee_server_start.py index 1681b7867..40ae96548 100644 --- a/cognee/tests/test_cognee_server_start.py +++ b/cognee/tests/test_cognee_server_start.py @@ -48,7 +48,7 @@ class TestCogneeServerStart(unittest.TestCase): """Test that the server is running and can accept connections.""" # Test health endpoint health_response = requests.get("http://localhost:8000/health", timeout=15) - self.assertIn(health_response.status_code, [200, 503]) + self.assertIn(health_response.status_code, [200]) # Test root endpoint root_response = requests.get("http://localhost:8000/", timeout=15) @@ -88,7 +88,7 @@ class TestCogneeServerStart(unittest.TestCase): payload = {"datasets": [dataset_name]} add_response = requests.post(url, headers=headers, data=form_data, files=file, timeout=50) - if add_response.status_code not in [200, 201, 409]: + if add_response.status_code not in [200, 201]: add_response.raise_for_status() # Cognify request @@ -99,7 +99,7 @@ class TestCogneeServerStart(unittest.TestCase): } cognify_response = requests.post(url, headers=headers, json=payload, timeout=150) - if cognify_response.status_code not in [200, 201, 409]: + if cognify_response.status_code not in [200, 201]: cognify_response.raise_for_status() # TODO: Add test to verify cognify pipeline is complete before testing search @@ -115,7 +115,7 @@ class TestCogneeServerStart(unittest.TestCase): payload = {"searchType": "GRAPH_COMPLETION", "query": "What's in the document?"} search_response = requests.post(url, headers=headers, json=payload, timeout=50) - if search_response.status_code not in [200, 201, 409]: + if search_response.status_code not in [200, 201]: search_response.raise_for_status()