Skip to content

Commit

Permalink
iam:fix tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
ljl authored and ljl committed Dec 8, 2023
1 parent 9b002ac commit e63a2dd
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 6 deletions.
3 changes: 2 additions & 1 deletion support/iam/tests/test_ca_basic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ use bios_iam::console_passport::dto::iam_cp_cert_dto::IamCpUserPwdLoginReq;
use bios_iam::console_passport::serv::iam_cp_cert_user_pwd_serv::IamCpCertUserPwdServ;
use bios_iam::iam_constants;

pub async fn test(_context: &TardisContext) -> TardisResult<(TardisContext, TardisContext, TardisContext)> {
pub async fn test(context: &TardisContext) -> TardisResult<(TardisContext, TardisContext, TardisContext)> {
let mut funs = iam_constants::get_tardis_inst();
funs.begin().await?;

Expand Down Expand Up @@ -64,6 +64,7 @@ pub async fn test(_context: &TardisContext) -> TardisResult<(TardisContext, Tard
cert_conf_by_ldap: None,
},
&funs,
&context
)
.await?;
sleep(Duration::from_secs(1)).await;
Expand Down
1 change: 1 addition & 0 deletions support/iam/tests/test_cp_all.rs
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ pub async fn test(sysadmin_info: (&str, &str), system_admin_context: &TardisCont
cert_conf_by_ldap: None,
},
&funs,
&system_admin_context
)
.await?;
sleep(Duration::from_secs(1)).await;
Expand Down
3 changes: 3 additions & 0 deletions support/iam/tests/test_cs_tenant.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ pub async fn test(context: &TardisContext) -> TardisResult<()> {
cert_conf_by_ldap: None,
},
&funs,
&context
)
.await?;

Expand Down Expand Up @@ -98,6 +99,7 @@ pub async fn test(context: &TardisContext) -> TardisResult<()> {
cert_conf_by_ldap: None,
},
&funs,
&context
)
.await?;

Expand Down Expand Up @@ -140,6 +142,7 @@ pub async fn test(context: &TardisContext) -> TardisResult<()> {
cert_conf_by_ldap: None,
},
&funs,
&context
)
.await?
.0;
Expand Down
4 changes: 3 additions & 1 deletion support/iam/tests/test_ct_basic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ use bios_iam::console_passport::dto::iam_cp_cert_dto::IamCpUserPwdLoginReq;
use bios_iam::console_passport::serv::iam_cp_cert_user_pwd_serv::IamCpCertUserPwdServ;
use bios_iam::iam_constants;

pub async fn test(_context: &TardisContext) -> TardisResult<(TardisContext, TardisContext)> {
pub async fn test(context: &TardisContext) -> TardisResult<(TardisContext, TardisContext)> {
let mut funs = iam_constants::get_tardis_inst();
funs.begin().await?;

Expand Down Expand Up @@ -58,6 +58,7 @@ pub async fn test(_context: &TardisContext) -> TardisResult<(TardisContext, Tard
cert_conf_by_ldap: None,
},
&funs,
&context
)
.await?;
sleep(Duration::from_secs(1)).await;
Expand Down Expand Up @@ -122,6 +123,7 @@ pub async fn test(_context: &TardisContext) -> TardisResult<(TardisContext, Tard
cert_conf_by_ldap: None,
},
&funs,
&context
)
.await?;
sleep(Duration::from_secs(1)).await;
Expand Down
10 changes: 6 additions & 4 deletions support/iam/tests/test_key_cache.rs
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ pub async fn test(system_admin_context: &TardisContext) -> TardisResult<()> {
cert_conf_by_ldap: None,
},
&funs,
&system_admin_context
)
.await?;
IamCertTokenServ::modify_cert_conf(
Expand Down Expand Up @@ -446,14 +447,14 @@ pub async fn test(system_admin_context: &TardisContext) -> TardisResult<()> {
IamRoleServ::modify_role_agg(
role_id,
&mut IamRoleAggModifyReq {
role: IamRoleModifyReq {
role: Some(IamRoleModifyReq {
name: None,
scope_level: None,
disabled: Some(true),
icon: None,
sort: None,
kind: None,
},
}),
res_ids: None,
},
&funs,
Expand Down Expand Up @@ -515,14 +516,14 @@ pub async fn test(system_admin_context: &TardisContext) -> TardisResult<()> {
IamRoleServ::modify_role_agg(
role_id,
&mut IamRoleAggModifyReq {
role: IamRoleModifyReq {
role: Some(IamRoleModifyReq {
name: None,
scope_level: None,
disabled: Some(false),
icon: None,
sort: None,
kind: None,
},
}),
res_ids: None,
},
&funs,
Expand Down Expand Up @@ -1087,6 +1088,7 @@ pub async fn test(system_admin_context: &TardisContext) -> TardisResult<()> {
cert_conf_by_ldap: None,
},
&funs,
&system_admin_context
)
.await?;

Expand Down

0 comments on commit e63a2dd

Please sign in to comment.