@@ -42,6 +42,7 @@ def test_config_validation(self):
4242 'dbname' : "dummy-value" ,
4343 'user' : "dummy-value" ,
4444 'password' : "dummy-value" ,
45+ 'private_key' : "dummy-value" ,
4546 'warehouse' : "dummy-value" ,
4647 'default_target_schema' : "dummy-value" ,
4748 'file_format' : "dummy-value"
@@ -92,15 +93,18 @@ def test_config_validation(self):
9293 config_with_archive_load_files ['archive_load_files' ] = True
9394 self .assertGreater (len (validator (config_with_external_stage )), 0 )
9495
95- # Configuration without password nor use_browser_authentication=True
96- config_without_password_nor_browser_auth = minimal_config .copy ()
97- config_without_password_nor_browser_auth .pop ("password" )
98- self .assertGreater (len (validator (minimal_config )), 0 )
96+ # Configuration without password nor private_key nor use_browser_authentication=True
97+ config_without_password_nor_private_key_nor_browser_auth = minimal_config .copy ()
98+ config_without_password_nor_private_key_nor_browser_auth .pop ("password" )
99+ config_without_password_nor_private_key_nor_browser_auth .pop ("private_key" )
100+ self .assertGreater (len (validator (config_without_password_nor_private_key_nor_browser_auth )), 0 )
99101
100- # Configuration without password nor use_browser_authentication=True
101- config_without_password_with_browser_auth = minimal_config .copy ()
102- config_without_password_with_browser_auth ["use_browser_authentication" ] = True
103- self .assertEqual (len (validator (minimal_config )), 0 )
102+ # Configuration without password nor private_key and use_browser_authentication=True
103+ config_without_password_nor_private_key_nor_browser_auth = minimal_config .copy ()
104+ config_without_password_nor_private_key_nor_browser_auth .pop ("password" )
105+ config_without_password_nor_private_key_nor_browser_auth .pop ("private_key" )
106+ config_without_password_nor_private_key_nor_browser_auth ["use_browser_authentication" ] = True
107+ self .assertEqual (len (validator (config_without_password_nor_private_key_nor_browser_auth )), 0 )
104108
105109 def test_column_type_mapping (self ):
106110 """Test JSON type to Snowflake column type mappings"""
@@ -218,6 +222,7 @@ def test_parallelism(self, query_patch):
218222 'dbname' : "dummy-value" ,
219223 'user' : "dummy-value" ,
220224 'password' : "dummy-value" ,
225+ 'private_key' : "dummy-value" ,
221226 'warehouse' : "dummy-value" ,
222227 'default_target_schema' : "dummy-value" ,
223228 'file_format' : "dummy-value"
@@ -291,6 +296,7 @@ def test_record_primary_key_string(self, query_patch):
291296 'dbname' : "dummy-value" ,
292297 'user' : "dummy-value" ,
293298 'password' : "dummy-value" ,
299+ 'private_key' : "dummy-value" ,
294300 'warehouse' : "dummy-value" ,
295301 'default_target_schema' : "dummy-value" ,
296302 'file_format' : "dummy-value"
@@ -350,6 +356,7 @@ def test_merge_failure_message(self, load_file_merge_patch, query_patch):
350356 'dbname' : "dummy_dbname" ,
351357 'user' : "dummy_user" ,
352358 'password' : "dummy_password" ,
359+ 'private_key' : "dummy_private_key" ,
353360 'warehouse' : "dummy_warehouse" ,
354361 'default_target_schema' : "dummy_default_target_schema" ,
355362 'file_format' : "dummy_file_format" ,
@@ -388,6 +395,7 @@ def test_copy_failure_message(self, load_file_copy_patch, query_patch):
388395 'dbname' : "dummy_dbname" ,
389396 'user' : "dummy_user" ,
390397 'password' : "dummy_password" ,
398+ 'private_key' : "dummy_private_key" ,
391399 'warehouse' : "dummy_warehouse" ,
392400 'default_target_schema' : "dummy_default_target_schema" ,
393401 'file_format' : "dummy_file_format" ,
@@ -423,6 +431,7 @@ def test_sync_table_with_no_changes_to_pk(self, query_patch):
423431 'dbname' : "dummy-db" ,
424432 'user' : "dummy-user" ,
425433 'password' : "dummy-passwd" ,
434+ 'private_key' : "dummy-private_key" ,
426435 'warehouse' : "dummy-wh" ,
427436 'default_target_schema' : "dummy-schema" ,
428437 'file_format' : "dummy-file-format"
@@ -471,6 +480,7 @@ def test_sync_table_with_new_pk_in_stream(self, query_patch):
471480 'dbname' : "dummy-db" ,
472481 'user' : "dummy-user" ,
473482 'password' : "dummy-passwd" ,
483+ 'private_key' : "dummy-private_key" ,
474484 'warehouse' : "dummy-wh" ,
475485 'default_target_schema' : "dummy-schema" ,
476486 'file_format' : "dummy-file-format"
@@ -542,6 +552,7 @@ def test_sync_table_with_stream_that_changes_to_have_no_pk(self, query_patch):
542552 'dbname' : "dummy-db" ,
543553 'user' : "dummy-user" ,
544554 'password' : "dummy-passwd" ,
555+ 'private_key' : "dummy-private_key" ,
545556 'warehouse' : "dummy-wh" ,
546557 'default_target_schema' : "dummy-schema" ,
547558 'file_format' : "dummy-file-format"
@@ -591,6 +602,7 @@ def test_sync_table_with_stream_that_has_no_pk_but_get_a_new_one(self, query_pat
591602 'dbname' : "dummy-db" ,
592603 'user' : "dummy-user" ,
593604 'password' : "dummy-passwd" ,
605+ 'private_key' : "dummy-private_key" ,
594606 'warehouse' : "dummy-wh" ,
595607 'default_target_schema' : "dummy-schema" ,
596608 'file_format' : "dummy-file-format"
0 commit comments