Skip to content

Commit a0f57de

Browse files
SNOW-2110470: Check if integ test would work
1 parent a87ae01 commit a0f57de

File tree

3 files changed

+23
-3
lines changed

3 files changed

+23
-3
lines changed

.github/workflows/build_test.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -172,16 +172,16 @@ jobs:
172172
run: python -m pip install tox>=4
173173
- name: Run tests
174174
# To run a single test on GHA use the below command:
175-
# run: python -m tox run -e `echo py${PYTHON_VERSION/\./}-single-ci | sed 's/ /,/g'`
176-
run: python -m tox run -e `echo py${PYTHON_VERSION/\./}-{extras,unit,integ,pandas,sso}-ci | sed 's/ /,/g'`
175+
run: python -m tox run -e `echo py${PYTHON_VERSION/\./}-single-ci | sed 's/ /,/g'`
176+
# run: python -m tox run -e `echo py${PYTHON_VERSION/\./}-{extras,unit,integ,pandas,sso}-ci | sed 's/ /,/g'`
177177

178178
env:
179179
PYTHON_VERSION: ${{ matrix.python-version }}
180180
cloud_provider: ${{ matrix.cloud-provider }}
181181
PYTEST_ADDOPTS: --color=yes --tb=short
182182
TOX_PARALLEL_NO_SPINNER: 1
183183
# To specify the test name (in single test mode) pass this env variable:
184-
# SINGLE_TEST_NAME: test/file/path::test_name
184+
SINGLE_TEST_NAME: test/auth/test_snowflake_authorization_code::test_snowflake_authorization_code_local_application_successful
185185
shell: bash
186186
- name: Combine coverages
187187
run: python -m tox run -e coverage --skip-missing-interpreters false

test/auth/authorization_parameters.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -216,3 +216,8 @@ def get_pat_connection_parameters(self) -> dict[str, str]:
216216
config["user"] = _get_env_variable("SNOWFLAKE_AUTH_TEST_BROWSER_USER")
217217

218218
return config
219+
220+
def get_snowflake_authorization_code_local_application_connection_parameters(self):
221+
config = self.get_snowflake_authorization_code_connection_parameters()
222+
config["oauth_client_id"] = ""
223+
config["oauth_client_secret"] = ""

test/auth/test_snowflake_authorization_code.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,21 @@ def test_snowflake_authorization_code_successful():
3838
assert test_helper.error_msg == "", "Error message should be empty"
3939

4040

41+
@pytest.mark.auth
42+
def test_snowflake_authorization_code_local_application_successful():
43+
connection_parameters = (
44+
AuthConnectionParameters().get_snowflake_authorization_code_local_application_connection_parameters()
45+
)
46+
test_helper = AuthorizationTestHelper(connection_parameters)
47+
browser_login, browser_password = get_soteria_okta_login_credentials().values()
48+
49+
test_helper.connect_and_provide_credentials(
50+
Scenario.INTERNAL_OAUTH_SNOWFLAKE_SUCCESS, browser_login, browser_password
51+
)
52+
53+
assert test_helper.error_msg == "", "Error message should be empty"
54+
55+
4156
@pytest.mark.auth
4257
def test_snowflake_authorization_code_mismatched_user():
4358
connection_parameters = (

0 commit comments

Comments
 (0)