@@ -58,7 +58,7 @@ async fn test_users_table() -> Result<()> {
58
58
hostname : "%" . to_string ( ) ,
59
59
grants : UserGrantSet :: empty ( ) ,
60
60
quota : UserQuota :: no_limit ( ) ,
61
- option : UserOption :: default ( ) ,
61
+ option : UserOption :: default ( ) . with_default_role ( Some ( "role1" . to_string ( ) ) ) ,
62
62
} ,
63
63
false ,
64
64
)
@@ -70,15 +70,15 @@ async fn test_users_table() -> Result<()> {
70
70
let stream = table. read ( ctx, & source_plan) . await ?;
71
71
let result = stream. try_collect :: < Vec < _ > > ( ) . await ?;
72
72
let block = & result[ 0 ] ;
73
- assert_eq ! ( block. num_columns( ) , 4 ) ;
73
+ assert_eq ! ( block. num_columns( ) , 5 ) ;
74
74
75
75
let expected = vec ! [
76
- "+-------+-----------+-----------------+------------------------------------------------------------------+" ,
77
- "| name | hostname | auth_type | auth_string |" ,
78
- "+-------+-----------+-----------------+------------------------------------------------------------------+" ,
79
- "| test | localhost | no_password | |" ,
80
- "| test1 | % | sha256_password | 15e2b0d3c33891ebb0f1ef609ec419420c20e320ce94c65fbc8c3312448eb225 |" ,
81
- "+-------+-----------+-----------------+------------------------------------------------------------------+" ,
76
+ "+-------+-----------+-----------------+------------------------------------------------------------------+--------------+ " ,
77
+ "| name | hostname | auth_type | auth_string | default_role | " ,
78
+ "+-------+-----------+-----------------+------------------------------------------------------------------+--------------+ " ,
79
+ "| test | localhost | no_password | | | " ,
80
+ "| test1 | % | sha256_password | 15e2b0d3c33891ebb0f1ef609ec419420c20e320ce94c65fbc8c3312448eb225 | role1 | " ,
81
+ "+-------+-----------+-----------------+------------------------------------------------------------------+--------------+ " ,
82
82
] ;
83
83
common_datablocks:: assert_blocks_sorted_eq ( expected, result. as_slice ( ) ) ;
84
84
Ok ( ( ) )
0 commit comments