@@ -7,6 +7,7 @@ use dal::{
77} ;
88use dal_test:: test_harness:: { create_component_for_schema_name, encrypt_message} ;
99use dal_test:: { test, WorkspaceSignup } ;
10+ use pretty_assertions_sorted:: assert_eq;
1011
1112#[ test]
1213async fn create_action_using_secret ( ctx : & mut DalContext , nw : & WorkspaceSignup ) {
@@ -175,13 +176,28 @@ async fn create_action_using_secret(ctx: &mut DalContext, nw: &WorkspaceSignup)
175176 . expect( "could not get materialized view" )
176177 . expect( "empty materialized view" ) // actual
177178 ) ;
179+ let last_synced_av_id = destination_component
180+ . attribute_values_for_prop ( ctx, & [ "root" , "resource" , "last_synced" ] )
181+ . await
182+ . expect ( "should be able to find avs for last synced" )
183+ . pop ( )
184+ . expect ( "should have an av for last synced" ) ;
185+
186+ let last_synced_value = AttributeValue :: get_by_id ( ctx, last_synced_av_id)
187+ . await
188+ . expect ( "should be able to get last synced av" )
189+ . materialized_view ( ctx)
190+ . await
191+ . expect ( "should be able to get value for last synced av" ) ;
192+
178193 assert_eq ! (
179194 serde_json:: json![ {
180195 "domain" : {
181196 "active" : true ,
182197 "name" : "destination" ,
183198 } ,
184199 "resource" : {
200+ "last_synced" : last_synced_value. unwrap_or( serde_json:: Value :: Null ) ,
185201 "logs" : [
186202 "Setting dummySecretString to requestStorage" ,
187203 "Output: {\n \" protocol\" : \" result\" ,\n \" status\" : \" success\" ,\n \" executionId\" : \" ayrtonsennajscommand\" ,\n \" payload\" : {\n \" poop\" : true\n },\n \" health\" : \" ok\" \n }" ,
0 commit comments