fix: Resolve issue with server start test (#1408)

<!-- .github/pull_request_template.md -->

## Description
<!-- 
Please provide a clear, human-generated description of the changes in
this PR.
DO NOT use AI-generated descriptions. We want to understand your thought
process and reasoning.
-->

## Type of Change
<!-- Please check the relevant option -->
- [ ] 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
<!-- List the specific changes made in this PR -->
- 
- 
- 

## Testing
<!-- Describe how you tested your changes -->

## Screenshots/Videos (if applicable)
<!-- Add screenshots or videos to help explain your changes -->

## Pre-submission Checklist
<!-- Please check all boxes that apply before submitting your PR -->
- [ ] **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
<!-- Link any related issues using "Fixes #issue_number" or "Relates to
#issue_number" -->

## Additional Notes
<!-- Add any additional notes, concerns, or context for reviewers -->

## 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.
This commit is contained in:
Igor Ilic 2025-09-17 10:59:24 +02:00 committed by GitHub
parent e849e12567
commit f016bc6d36
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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()