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

SAT: support yaml files in spec_path #12228

Merged
merged 4 commits into from
Apr 20, 2022
Merged

Conversation

pedroslopez
Copy link
Contributor

What

We now support loading the spec from a yaml file in the CDK (#12104), but the SAT still expects a json file as spec_path for one of the tests.

How

Check if spec_path is a .json or .yaml file and load accordingly.

@pedroslopez pedroslopez marked this pull request as ready for review April 20, 2022 22:54
Comment on lines 119 to +121
def connector_spec_fixture(connector_spec_path) -> ConnectorSpecification:
return ConnectorSpecification.parse_file(connector_spec_path)
spec_obj = load_yaml_or_json_path(connector_spec_path)
return ConnectorSpecification.parse_obj(spec_obj)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks like we can't test these fixtures directly, so moved the yaml/json logic into a utility method

Copy link
Contributor

@sherifnada sherifnada left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

awesome!

@pedroslopez
Copy link
Contributor Author

pedroslopez commented Apr 20, 2022

/publish connector=bases/source-acceptance-test

🕑 bases/source-acceptance-test https://github.com/airbytehq/airbyte/actions/runs/2198822290
🚀 Successfully published bases/source-acceptance-test
❌ Couldn't auto-bump version for bases/source-acceptance-test

@pedroslopez pedroslopez merged commit 12bf4d4 into master Apr 20, 2022
@pedroslopez pedroslopez deleted the pedroslopez/sat-yaml-spec branch April 20, 2022 23:27
suhomud pushed a commit that referenced this pull request May 23, 2022
* support yaml files as spec_path

* no unnecessary f-string

* move to util for better testing

* bump version, update changelog
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.

None yet

2 participants