@@ -30,13 +30,13 @@ use cedar_policy_core::{
3030} ;
3131
3232use super :: test_utils:: {
33- assert_policy_typecheck_fails, assert_policy_typechecks , assert_typecheck_fails ,
34- assert_typechecks,
33+ assert_policy_typecheck_fails, assert_policy_typecheck_warns , assert_policy_typechecks ,
34+ assert_typecheck_fails , assert_typechecks,
3535} ;
3636use crate :: {
3737 type_error:: TypeError ,
3838 types:: { EntityLUB , Type } ,
39- AttributeAccess , SchemaError , SchemaFragment , ValidatorSchema ,
39+ AttributeAccess , SchemaError , SchemaFragment , ValidationWarningKind , ValidatorSchema ,
4040} ;
4141
4242fn namespaced_entity_type_schema ( ) -> SchemaFragment {
@@ -561,10 +561,10 @@ fn multi_namespace_action_eq() {
561561 r#"permit(principal, action, resource) when { NS1::Action::"Action" == NS2::Action::"Action" };"# ,
562562 )
563563 . unwrap ( ) ;
564- assert_policy_typecheck_fails (
564+ assert_policy_typecheck_warns (
565565 schema. clone ( ) ,
566566 policy. clone ( ) ,
567- vec ! [ TypeError :: impossible_policy ( policy . condition ( ) ) ] ,
567+ vec ! [ ValidationWarningKind :: ImpossiblePolicy ] ,
568568 ) ;
569569}
570570
@@ -621,10 +621,10 @@ fn multi_namespace_action_in() {
621621 r#"permit(principal, action in NS4::Action::"Group", resource);"# ,
622622 )
623623 . unwrap ( ) ;
624- assert_policy_typecheck_fails (
624+ assert_policy_typecheck_warns (
625625 schema. clone ( ) ,
626626 policy. clone ( ) ,
627- vec ! [ TypeError :: impossible_policy ( policy . condition ( ) ) ] ,
627+ vec ! [ ValidationWarningKind :: ImpossiblePolicy ] ,
628628 ) ;
629629}
630630
0 commit comments