Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: Add tomtom integration test (refs in path params) #2

Merged
merged 1 commit into from
Dec 14, 2024

Conversation

vblagoje
Copy link
Owner

@vblagoje vblagoje commented Dec 14, 2024

Why:

This Pull Request addresses the need for integrating the TOMTOM API with the existing system, aiming to expand the suite of supported services for geographical search functionalities. The addition enhances the application's capability to search geographic locations, providing users more comprehensive location-based services. By introducing this integration, the system can leverage TOMTOM's extensive geographic datasets to increase its data offering, aligning with the goal of supporting diverse API services.

What:

  • Modified the GitHub Actions workflow file (tests.yml) to include a new environment variable for the TOMTOM_API_KEY, ensuring the availability of necessary credentials for testing.
  • Added a new integration test in test_openapi_client_live_openai.py:
    • Created a test method test_tomtom to verify the integration with the TOMTOM API.
    • The test uses the TOMTOM and OpenAI APIs to conduct a category search and validate the functionality by asserting expected elements in the response.

How can it be used:

  • The newly integrated TOMTOM API can be utilized to search for specific categories in geographical locations using the integrated client.
  • Example usage within an application:
    • Configure the OpenAI service to route search queries through the TOMTOM API by specifying the relevant operation and credentials.
    • Perform searches, e.g., "Search for pizza in San Francisco" without requiring longitude/latitude, utilizing TOMTOM's geographic data.

How did you test it:

  • Integration tests were implemented in the test suite to confirm functionality:
    • The test_tomtom validates the API credentials, performs a geographic search, and checks whether the response contains expected properties.
    • Test cases ensure the TOMTOM and OpenAI APIs interact correctly and produce valid responses, confirming the integration works as intended.
  • Environment variables for API keys are checked to ensure tests run in systems with appropriate configurations.

Notes for the reviewer:

  • Pay close attention to the test_tomtom integration test to ensure it correctly validates responses and interacts with both the TOMTOM and OpenAI APIs efficiently.
  • Ensure the newly added TOMTOM_API_KEY in the workflows file does not inadvertently affect other testing components.
  • Consider the test coverage for error cases where the response may not contain expected data, potentially enhancing robustness with additional edge case checks.

@coveralls
Copy link

Pull Request Test Coverage Report for Build 12331860751

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 79.446%

Totals Coverage Status
Change from base Build 12331823956: 0.0%
Covered Lines: 344
Relevant Lines: 433

💛 - Coveralls

@vblagoje vblagoje merged commit add8b1f into main Dec 14, 2024
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants