bf2343b7e4
Integration Tests - MySQL + Elasticsearch / Detect Changes (push) Has been cancelled
Integration Tests - MySQL + Elasticsearch / integration-tests-mysql-elasticsearch (push) Has been cancelled
Integration Tests - PostgreSQL + Elasticsearch + Redis / Detect Changes (push) Has been cancelled
Integration Tests - PostgreSQL + Elasticsearch + Redis / integration-tests-postgres-elasticsearch-redis (push) Has been cancelled
Integration Tests - PostgreSQL + OpenSearch / Detect Changes (push) Has been cancelled
Integration Tests - PostgreSQL + OpenSearch / integration-tests-postgres-opensearch (push) Has been cancelled
Java Checkstyle / java-checkstyle (push) Has been cancelled
Maven Collate Tests / maven-collate-ci (push) Has been cancelled
OpenMetadata Service Unit Tests / openmetadata-service-unit-tests-status (push) Has been cancelled
Publish Package to Maven Central Repository / publish-maven-packages (push) Has been cancelled
OpenMetadata Service Unit Tests / Detect Changes (push) Has been cancelled
OpenMetadata Service Unit Tests / openmetadata-service-unit-tests (push) Has been cancelled
OpenMetadata Service Unit Tests / k8s_operator-unit-tests (push) Has been cancelled
SDK Integration Tests
These integration tests verify the SDK fluent API functionality with a running OpenMetadata server.
Prerequisites
-
Running OpenMetadata Server: The tests require an OpenMetadata server running at
http://localhost:8585# Start OpenMetadata server ./docker/run_local_docker.sh -m ui -d mysql -
Valid JWT Token: The tests use the default admin JWT token configured in
_openmetadata_testutils/ometa.py
Running the Tests
Run All SDK Integration Tests
# From the ingestion directory
pytest tests/integration/sdk/test_sdk_integration.py -v
Run Specific Test
# Run a specific test class
pytest tests/integration/sdk/test_sdk_integration.py::TestSDKIntegration -v
# Run a specific test method
pytest tests/integration/sdk/test_sdk_integration.py::TestSDKIntegration::test_tables_crud_operations -v
Run with Coverage
coverage run --rcfile pyproject.toml -m pytest tests/integration/sdk/ -v
coverage report
Test Structure
The integration tests follow the existing OpenMetadata testing patterns:
- Fixtures: Uses the
metadatafixture fromconftest.pywhich provides an authenticated OpenMetadata client - Cleanup: Each test includes proper cleanup to remove created entities
- Naming: Test entities use unique names with UUID suffixes to avoid conflicts
Tests Included
- test_tables_crud_operations: Tests CRUD operations for Tables entity
- test_users_crud_operations: Tests CRUD operations for Users entity
- test_glossary_terms_workflow: Tests Glossary and GlossaryTerms workflow
- test_teams_workflow: Tests Teams entity operations
- test_list_all_with_pagination: Tests automatic pagination in list_all method
- test_database_schemas_operations: Tests DatabaseSchemas entity operations
Troubleshooting
- Server Not Running: Ensure OpenMetadata server is running at localhost:8585
- Authentication Failed: Check that the JWT token in
_openmetadata_testutils/ometa.pyis valid - Port Conflicts: If port 8585 is already in use, update the server URL in the tests
Adding New Tests
To add new integration tests:
- Create test methods in
test_sdk_integration.py - Use the
metadatafixture for OpenMetadata client - Set default client for SDK entities:
EntityClass.set_default_client(metadata) - Include proper cleanup in try/finally blocks
- Use unique names with UUID suffixes for test entities