1414
1515import uuid
1616from pathlib import Path
17+ from typing import List
1718
1819import pytest
1920
2324 rows_from_snowflake_session ,
2425)
2526from tests_integration .testing_utils import assert_that_result_is_successful
26- from typing import List
2727
2828
2929@pytest .mark .integration
@@ -141,7 +141,17 @@ def _assert_file_names_on_stage(expected_files: List[str]) -> None:
141141 with project_directory (f"streamlit_v2" ) as project_root :
142142 # deploy streamlit with legacy flag to use ROOT_LOCATION stages
143143 result = runner .invoke_with_connection (
144- ["streamlit" , "deploy" , "my_streamlit" , "--replace" , "--legacy" ]
144+ [
145+ "streamlit" ,
146+ "deploy" ,
147+ "my_streamlit" ,
148+ "--replace" ,
149+ "--legacy" ,
150+ "--database" ,
151+ test_database ,
152+ "--schema" ,
153+ "public" ,
154+ ]
145155 )
146156 assert result .exit_code == 0 , result .output
147157 _assert_file_names_on_stage (["streamlit_app.py" ])
@@ -162,7 +172,17 @@ def _assert_file_names_on_stage(expected_files: List[str]) -> None:
162172
163173 # deploy streamlit again without prune - unexpected file should remain on stage
164174 result = runner .invoke_with_connection (
165- ["streamlit" , "deploy" , "my_streamlit" , "--replace" , "--legacy" ]
175+ [
176+ "streamlit" ,
177+ "deploy" ,
178+ "my_streamlit" ,
179+ "--replace" ,
180+ "--legacy" ,
181+ "--database" ,
182+ test_database ,
183+ "--schema" ,
184+ "public" ,
185+ ]
166186 )
167187 assert result .exit_code == 0 , result .output
168188 _assert_file_names_on_stage (
@@ -174,7 +194,18 @@ def _assert_file_names_on_stage(expected_files: List[str]) -> None:
174194
175195 # deploy with --prune flag - unexpected file should be removed
176196 result = runner .invoke_with_connection (
177- ["streamlit" , "deploy" , "my_streamlit" , "--replace" , "--legacy" , "--prune" ]
197+ [
198+ "streamlit" ,
199+ "deploy" ,
200+ "my_streamlit" ,
201+ "--replace" ,
202+ "--legacy" ,
203+ "--prune" ,
204+ "--database" ,
205+ test_database ,
206+ "--schema" ,
207+ "public" ,
208+ ]
178209 )
179210 assert result .exit_code == 0 , result .output
180211 _assert_file_names_on_stage (["streamlit_app.py" ])
0 commit comments