-
Notifications
You must be signed in to change notification settings - Fork 120
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
[Local Testing] SNOW-1063738 Run all tests against Local Testing by default Part 1 #1483
Conversation
069da28
to
e7f82df
Compare
if not local_testing_mode: | ||
test_files = TestFiles(resources_path) | ||
Utils.create_stage(session, tmp_stage_name, is_temporary=True) |
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.
btw there is one change I made in my PR to turn create_stage/drop_stage into no-op for local testing, so that we can reduce some if-else check in the test code
@staticmethod
def create_stage(session: "Session", name: str, is_temporary: bool = True):
if isinstance(session._conn, MockServerConnection):
# no-op in local testing
return
session._run_query(
f"create or replace {'temporary' if is_temporary else ''} stage {quote_name(name)}"
)
@staticmethod
def drop_stage(session: "Session", name: str):
if isinstance(session._conn, MockServerConnection):
# no-op in local testing
return
session._run_query(f"drop stage if exists {quote_name(name)}")
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.
Sounds good, if I merge later I will remove this if block.
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.
minor: ditto on removing if not local_testing_mode:
check
e116ac1
to
14d5af4
Compare
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 marked some of them, but there seems to be a lot of TODOs without ticket numbers.
Co-authored-by: Jamison Rose <[email protected]>
This is a good point, I'll remove the TODOS for items that are not immediate TODOS, i.e. unsupported feature planned to be worked on later. I'll keep the TODOs for bug fixes and create tickets. |
…lakedb/snowpark-python into stan-flip-local-testing-test-setup
This PR is a test only change that aims to run all tests against local testing by default. The changes are to
test_bind_variable.py
session.sql
unnecessarily to run it against Local Testing