@@ -30,7 +30,14 @@ async fn spi_conf_namespace_test() -> TardisResult<()> {
30
30
start_web_server ( ) . await ?;
31
31
let tardis_ctx = TardisContext :: default ( ) ;
32
32
let mut client = TestHttpClient :: new ( "https://localhost:8080/spi-conf" . to_string ( ) ) ;
33
- client. set_auth ( & tardis_ctx) ?;
33
+ client. set_auth ( & TardisContext {
34
+ own_paths : "t1/app001" . to_string ( ) ,
35
+ ak : "" . to_string ( ) ,
36
+ roles : vec ! [ ] ,
37
+ groups : vec ! [ ] ,
38
+ owner : "app001" . to_string ( ) ,
39
+ ..Default :: default ( )
40
+ } ) ?;
34
41
let funs = TardisFuns :: inst_with_db_conn ( DOMAIN_CODE . to_string ( ) , None ) ;
35
42
let RegisterResponse { username, password } = client
36
43
. put (
@@ -49,14 +56,7 @@ async fn spi_conf_namespace_test() -> TardisResult<()> {
49
56
)
50
57
. await ;
51
58
log:: info!( "username: {username}, password: {password}" ) ;
52
- client. set_auth ( & TardisContext {
53
- own_paths : "t1/app001" . to_string ( ) ,
54
- ak : "" . to_string ( ) ,
55
- roles : vec ! [ ] ,
56
- groups : vec ! [ ] ,
57
- owner : "app001" . to_string ( ) ,
58
- ..Default :: default ( )
59
- } ) ?;
59
+
60
60
test_register ( & mut client) . await ?;
61
61
test_curd ( & mut client) . await ?;
62
62
test_tags ( & mut client) . await ?;
@@ -123,7 +123,7 @@ pub async fn test_curd(client: &mut TestHttpClient) -> TardisResult<()> {
123
123
assert_eq ! ( _response. config_count, 1 ) ;
124
124
// 4.1 get namespace list
125
125
let _response = client. get :: < Vec < NamespaceItem > > ( "/ci/namespace/list" ) . await ;
126
- assert_eq ! ( _response. len( ) , 3 ) ;
126
+ assert_eq ! ( _response. len( ) , 4 ) ;
127
127
// since we have published a config, the config_count should be 1
128
128
// 5. delete config
129
129
client. delete ( "/ci/cs/config?namespace_id=public&group=DEFAULT-GROUP&data_id=conf-default" ) . await ;
0 commit comments