Skip to content

Commit

Permalink
merge: #3503
Browse files Browse the repository at this point in the history
3503: fix: fix assertion in create_action_using_secret test r=zacharyhamm a=zacharyhamm



Co-authored-by: Zachary Hamm <[email protected]>
  • Loading branch information
si-bors-ng[bot] and zacharyhamm authored Apr 3, 2024
2 parents 6d75cf9 + 9b42098 commit cbdf26f
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions lib/dal/tests/integration_test/action/with_secret.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ use dal::{
};
use dal_test::test_harness::{create_component_for_schema_name, encrypt_message};
use dal_test::{test, WorkspaceSignup};
use pretty_assertions_sorted::assert_eq;

#[test]
async fn create_action_using_secret(ctx: &mut DalContext, nw: &WorkspaceSignup) {
Expand Down Expand Up @@ -175,13 +176,28 @@ async fn create_action_using_secret(ctx: &mut DalContext, nw: &WorkspaceSignup)
.expect("could not get materialized view")
.expect("empty materialized view") // actual
);
let last_synced_av_id = destination_component
.attribute_values_for_prop(ctx, &["root", "resource", "last_synced"])
.await
.expect("should be able to find avs for last synced")
.pop()
.expect("should have an av for last synced");

let last_synced_value = AttributeValue::get_by_id(ctx, last_synced_av_id)
.await
.expect("should be able to get last synced av")
.materialized_view(ctx)
.await
.expect("should be able to get value for last synced av");

assert_eq!(
serde_json::json![{
"domain": {
"active": true,
"name": "destination",
},
"resource": {
"last_synced": last_synced_value.unwrap_or(serde_json::Value::Null),
"logs": [
"Setting dummySecretString to requestStorage",
"Output: {\n \"protocol\": \"result\",\n \"status\": \"success\",\n \"executionId\": \"ayrtonsennajscommand\",\n \"payload\": {\n \"poop\": true\n },\n \"health\": \"ok\"\n}",
Expand Down

0 comments on commit cbdf26f

Please sign in to comment.