-
Notifications
You must be signed in to change notification settings - Fork 0
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
Add preset tests #1
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#TODO still need to add mock request for test_response = self.session.get(f"{self.config.connect_uri}/version")
@@ -108,7 +108,7 @@ class SupersetConfig( | |||
api_key: Optional[str] = Field(default=None, description="Preset.io API key.") | |||
api_secret: Optional[str] = Field(default=None, description="Preset.io API secret.") | |||
manager_uri: str = Field( | |||
default="https://api.app.preset.io/", description="Preset.io API URL" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think I need to do some refactoring. I don't think api_key, api_secret and manager_uri should belong to SupersetConfig class since it is only relevant to PresetConfig. Ill put up a separate PR to remove those fields from SupersetConfig and you can rebase against master after it gets merged.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I think the only preset portion this is used might be the authentication endpoint?
Preset API is split to preset specific/superset:
https://api-docs.preset.io/#cdf2f4d7-1842-4a3e-bd15-a747295704ee
Checklist
Adding Preset Integration and unit tests for the Preset ingestion method.
Test setup:
https://datahubproject.io/docs/metadata-ingestion/developing/#:~:text=all dev requirements.-,pip install -e '.[dev]',-%23 For running integration
linting: ./gradlew :metadata-ingestion:lintFix
Need to first install dependencies:
For pytest:
run pytest tests/integration/preset/test_preset.py
run pytest tests/unit/test_preset_source.py
The PR conforms to DataHub's Contributing Guideline (particularly Commit Message Format)
Links to related issues (if applicable)
Tests for the changes have been added/updated (if applicable)
Docs related to the changes have been added/updated (if applicable). If a new feature has been added a Usage Guide has been added for the same.
For any breaking change/potential downtime/deprecation/big changes an entry has been made in Updating DataHub