-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Make connector acceptance test gradle plugin work for destinations #22609
Merged
flash1293
merged 7 commits into
master
from
flash1293/fix-connector-acceptance-test-plugin
Feb 24, 2023
Merged
Changes from 3 commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
a7e0000
fix connector acceptance test gradle plugin
c824672
Merge branch 'master' into flash1293/fix-connector-acceptance-test-pl…
a0f7648
Merge branch 'master' into flash1293/fix-connector-acceptance-test-pl…
f3dcfda
Merge branch 'master' into flash1293/fix-connector-acceptance-test-pl…
39305a8
fix
edc901b
fix
5e7f855
Merge remote-tracking branch 'origin/master' into flash1293/fix-conne…
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
are you sure this isn't a red herring? I don't follow why this fixes the issue
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.
For example with #22393 the acceptance tests run correctly when called this way but fail with “could not find module integration_tests.acceptance” with the old call.
I’m not sure why though, that’s why I pinged you on this.
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.
Ah I think I see the problem.
-p integration_tets.acceptance
tells the running pytest process (CAT in this case) to look at a fileintegration_tests/acceptance.py
to configure tests.In this situation the working directory is always set to the connector's directory. Python connectors always have a
integration_tests/acceptance.py
file, so this works for them. Even the java connectors which implement CAT also have that directory with anacceptance.py
file (eg see postgres).That directory is important because it allows the user to configure setup/teardown actions e.g: create a database and tear it down.
I think the correct way to handle this would be to create an
integration_tests/acceptance.py
directory for the connector in question, or maybe conditionally add this flag depending on whether that directory exists.I think the
--acceptance-test-config
arg is unnecessary. By default SAT looks for anacceptance-test-config.yaml
in the working directory (which is always set to the connector dir) so I think we can remove this arg.