Skip to content

Commit

Permalink
iam:fix test.
Browse files Browse the repository at this point in the history
  • Loading branch information
ljl committed Sep 11, 2023
1 parent 36084a2 commit dc77e2c
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 2 deletions.
3 changes: 3 additions & 0 deletions support/iam/tests/test_ca_app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ pub async fn test(context1: &TardisContext, _context2: &TardisContext) -> Tardis
disabled: None,
scope_level: None,
admin_ids: None,
set_cate_id: None,
},
&funs,
context1,
Expand All @@ -41,6 +42,7 @@ pub async fn test(context1: &TardisContext, _context2: &TardisContext) -> Tardis
disabled: None,
scope_level: None,
admin_ids: Some(vec![_context2.owner.to_string()]),
set_cate_id: None,
},
&funs,
context1,
Expand All @@ -58,6 +60,7 @@ pub async fn test(context1: &TardisContext, _context2: &TardisContext) -> Tardis
disabled: None,
scope_level: None,
admin_ids: Some(vec![context1.owner.to_string()]),
set_cate_id: None,
},
&funs,
context1,
Expand Down
2 changes: 2 additions & 0 deletions support/iam/tests/test_ca_basic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,7 @@ pub async fn test(_context: &TardisContext) -> TardisResult<(TardisContext, Tard
app_contact_phone: None,
disabled: None,
admin_ids: Some(vec![account_id1.to_string()]),
set_cate_id: None,
},
&funs,
&tenant_context,
Expand All @@ -160,6 +161,7 @@ pub async fn test(_context: &TardisContext) -> TardisResult<(TardisContext, Tard
app_contact_phone: None,
disabled: None,
admin_ids: Some(vec![account_id2.clone()]),
set_cate_id: None,
},
&funs,
&tenant_context,
Expand Down
4 changes: 2 additions & 2 deletions support/iam/tests/test_cc_set.rs
Original file line number Diff line number Diff line change
Expand Up @@ -186,13 +186,13 @@ async fn test_single_level(context: &TardisContext, another_context: &TardisCont
IamSetServ::modify_set_item(&item_id1, &mut RbumSetItemModifyReq { sort: 10 }, &funs, context).await?;

info!("【test_ca_set】 : test_single_level : Find Set Item");
let items = IamSetServ::find_set_items(None, Some(set_cate_id1.clone()), None, None, false, &funs, context).await?;
let items = IamSetServ::find_set_items(None, Some(set_cate_id1.clone()), None, None, false, None, &funs, context).await?;
assert_eq!(items.len(), 1);

info!("【test_ca_set】 : test_single_level : Delete Set Item By Id");
assert!(IamSetServ::delete_set_item(&item_id1, &funs, another_context).await.is_err());
IamSetServ::delete_set_item(&item_id1, &funs, context).await?;
let items = IamSetServ::find_set_items(None, Some(set_cate_id1.clone()), None, None, false, &funs, context).await?;
let items = IamSetServ::find_set_items(None, Some(set_cate_id1.clone()), None, None, false, None, &funs, context).await?;
assert_eq!(items.len(), 0);

info!("【test_cc_set】 : test_single_level : copy_tree_to_new_set");
Expand Down
2 changes: 2 additions & 0 deletions support/iam/tests/test_ct_app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ pub async fn test(context1: &TardisContext, context2: &TardisContext) -> TardisR
app_contact_phone: None,
disabled: None,
admin_ids: Some(vec![context1.owner.to_string()]),
set_cate_id: None,
},
&funs,
context1,
Expand All @@ -37,6 +38,7 @@ pub async fn test(context1: &TardisContext, context2: &TardisContext) -> TardisR
app_contact_phone: None,
disabled: None,
admin_ids: Some(vec![context2.owner.to_string()]),
set_cate_id: None,
},
&funs,
context2,
Expand Down
1 change: 1 addition & 0 deletions support/iam/tests/test_iam_scenes_passport.rs
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@ pub async fn test(sysadmin_name: &str, sysadmin_password: &str, client: &mut BIO
app_contact_phone: None,
admin_ids: Some(vec![account_id.clone()]),
disabled: None,
set_cate_id: None,
},
)
.await;
Expand Down
1 change: 1 addition & 0 deletions support/iam/tests/test_key_cache.rs
Original file line number Diff line number Diff line change
Expand Up @@ -292,6 +292,7 @@ pub async fn test(system_admin_context: &TardisContext) -> TardisResult<()> {
app_contact_phone: None,
disabled: None,
admin_ids: Some(vec![account_id.clone()]),
set_cate_id: None,
},
&funs,
&tenant_admin_context,
Expand Down

0 comments on commit dc77e2c

Please sign in to comment.