Skip to content

Commit 696e526

Browse files
Use PUBLIC role for grants tests instead of creating test roles
- Removes SECURITYADMIN privilege requirement for CI - Uses existing PUBLIC role to test grants functionality - Simplifies test flow while maintaining functionality validation
1 parent b0cc62e commit 696e526

File tree

1 file changed

+2
-12
lines changed

1 file changed

+2
-12
lines changed

tests_integration/test_streamlit.py

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
import uuid
2-
31
import pytest
42

53
from tests_integration.testing_utils import FlowTestSetup
@@ -144,11 +142,9 @@ def test_streamlit_grants_flow(
144142
alter_snowflake_yml,
145143
):
146144
"""Test that streamlit grants are properly applied during deployment."""
147-
test_role = f"snowcli_streamlit_grants_test_{uuid.uuid4().hex[:8]}"
145+
test_role = "PUBLIC" # Use existing role instead of creating new one
148146
entity_id = "app_1"
149147

150-
_streamlit_test_steps.create_test_role(test_role)
151-
152148
with project_directory("streamlit_v2"):
153149
alter_snowflake_yml(
154150
"snowflake.yml",
@@ -164,8 +160,6 @@ def test_streamlit_grants_flow(
164160

165161
_streamlit_test_steps.drop_should_succeed(entity_id, snowflake_session)
166162

167-
_streamlit_test_steps.cleanup_test_role(test_role)
168-
169163

170164
@pytest.mark.integration
171165
def test_streamlit_grants_experimental_flow(
@@ -175,11 +169,9 @@ def test_streamlit_grants_experimental_flow(
175169
alter_snowflake_yml,
176170
):
177171
"""Test that streamlit grants are properly applied during experimental deployment."""
178-
test_role = f"snowcli_streamlit_grants_exp_test_{uuid.uuid4().hex[:8]}"
172+
test_role = "PUBLIC" # Use existing role instead of creating new one
179173
entity_id = "app_1"
180174

181-
_streamlit_test_steps.create_test_role(test_role)
182-
183175
with project_directory("streamlit_v2"):
184176
alter_snowflake_yml(
185177
"snowflake.yml",
@@ -194,5 +186,3 @@ def test_streamlit_grants_experimental_flow(
194186
_streamlit_test_steps.verify_grants_applied(entity_id, test_role)
195187

196188
_streamlit_test_steps.drop_should_succeed(entity_id, snowflake_session)
197-
198-
_streamlit_test_steps.cleanup_test_role(test_role)

0 commit comments

Comments
 (0)