@@ -504,19 +504,6 @@ def get(obj, arg_string):
504504 (2 , 'grant.namespace' ): ['a' , 'b' , 'c' ],
505505 (2 , 'grant.view_name' ): 'v' ,
506506 })
507- check_arguments (
508- mock_execute (['catalogs' , 'create' , 'my-catalog' , '--type' , 'external' ,
509- '--storage-type' , 'gcs' , '--default-base-location' , 'dbl' ,
510- '--catalog-connection-type' , 'hadoop' , '--hadoop-warehouse' , 'h' ,
511- '--catalog-uri' , 'u' , '--catalog-authentication-type' , 'bearer' ,
512- '--catalog-bearer-token' , 'b' ]),
513- 'create_catalog' , {
514- (0 , 'catalog.name' ): 'my-catalog' ,
515- (0 , 'catalog.type' ): 'EXTERNAL' ,
516- (0 , 'catalog.connection_config_info.connection_type' ): 'HADOOP' ,
517- (0 , 'catalog.connection_config_info.warehouse' ): 'h' ,
518- (0 , 'catalog.connection_config_info.uri' ): 'u' ,
519- })
520507 check_arguments (
521508 mock_execute (['catalogs' , 'create' , 'my-catalog' , '--type' , 'external' ,
522509 '--storage-type' , 'gcs' , '--default-base-location' , 'dbl' ,
@@ -533,20 +520,24 @@ def get(obj, arg_string):
533520 check_arguments (
534521 mock_execute (['catalogs' , 'create' , 'my-catalog' , '--type' , 'external' ,
535522 '--storage-type' , 'gcs' , '--default-base-location' , 'dbl' ,
536- '--catalog-connection-type' , 'hadoop' , '--hadoop-warehouse' , 'h' ,
537- '--catalog-authentication-type' , 'oauth' ,
523+ '--catalog-connection-type' , 'iceberg-rest' ,
524+ '--iceberg-remote-catalog-name' , 'c' ,
525+ '--catalog-uri' , 'u' , '--catalog-authentication-type' , 'oauth' ,
538526 '--catalog-token-uri' , 'u' , '--catalog-client-id' , 'i' ,
539527 '--catalog-client-secret' , 'k' , '--catalog-client-scope' , 's1' ,
540528 '--catalog-client-scope' , 's2' ]),
541529 'create_catalog' , {
542530 (0 , 'catalog.name' ): 'my-catalog' ,
543531 (0 , 'catalog.type' ): 'EXTERNAL' ,
544- (0 , 'catalog.connection_config_info.connection_type' ): 'HADOOP' ,
545- (0 , 'catalog.connection_config_info.warehouse' ): 'h' ,
532+ (0 , 'catalog.connection_config_info.connection_type' ): 'ICEBERG_REST' ,
533+ (0 , 'catalog.connection_config_info.remote_catalog_name' ): 'c' ,
534+ (0 , 'catalog.connection_config_info.uri' ): 'u' ,
546535 (0 , 'catalog.connection_config_info.authentication_parameters.authentication_type' ): 'OAUTH' ,
547536 (0 , 'catalog.connection_config_info.authentication_parameters.token_uri' ): 'u' ,
548537 (0 , 'catalog.connection_config_info.authentication_parameters.client_id' ): 'i' ,
549538 (0 , 'catalog.connection_config_info.authentication_parameters.scopes' ): ['s1' , 's2' ],
539+ (0 , 'catalog.storage_config_info.storage_type' ): 'GCS' ,
540+ (0 , 'catalog.properties.default_base_location' ): 'dbl' ,
550541 })
551542 check_arguments (
552543 mock_execute (['catalogs' , 'create' , 'my-catalog' , '--type' , 'external' ,
@@ -583,6 +574,19 @@ def get(obj, arg_string):
583574 (0 , 'catalog.connection_config_info.authentication_parameters.external_id' ): 'i' ,
584575 (0 , 'catalog.connection_config_info.authentication_parameters.signing_name' ): 'g' ,
585576 })
577+ check_arguments (
578+ mock_execute (['catalogs' , 'create' , 'my-catalog' , '--type' , 'external' ,
579+ '--storage-type' , 'file' , '--default-base-location' , 'dbl' ,
580+ '--catalog-connection-type' , 'hadoop' , '--hadoop-warehouse' , 'h' ,
581+ '--catalog-authentication-type' , 'implicit' , '--catalog-uri' , 'u' ]),
582+ 'create_catalog' , {
583+ (0 , 'catalog.name' ): 'my-catalog' ,
584+ (0 , 'catalog.type' ): 'EXTERNAL' ,
585+ (0 , 'catalog.connection_config_info.connection_type' ): 'HADOOP' ,
586+ (0 , 'catalog.connection_config_info.warehouse' ): 'h' ,
587+ (0 , 'catalog.connection_config_info.authentication_parameters.authentication_type' ): 'IMPLICIT' ,
588+ (0 , 'catalog.connection_config_info.uri' ): 'u' ,
589+ })
586590
587591
588592if __name__ == '__main__' :
0 commit comments