Skip to content

Commit 47d5046

Browse files
authored
Update function-runner in integration tests (#155)
1 parent 46c8e8e commit 47d5046

1 file changed

Lines changed: 6 additions & 7 deletions

File tree

integration_tests/src/lib.rs

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ use std::{
66
sync::LazyLock,
77
};
88

9-
const FUNCTION_RUNNER_VERSION: &str = "8.0.0";
9+
const FUNCTION_RUNNER_VERSION: &str = "9.0.0";
1010
const TRAMPOLINE_VERSION: &str = "1.0.0";
1111

1212
fn workspace_root() -> std::path::PathBuf {
@@ -189,7 +189,7 @@ pub fn run_example(
189189
let mut output_bytes = Vec::new();
190190
output.read_to_end(&mut output_bytes)?;
191191

192-
let output: serde_json::Value = serde_json::from_slice(&output_bytes)?;
192+
let mut output: serde_json::Value = serde_json::from_slice(&output_bytes)?;
193193

194194
if !status.success() {
195195
let logs = output
@@ -205,10 +205,9 @@ pub fn run_example(
205205
);
206206
}
207207

208-
let output_json_str = output
209-
.get("output")
210-
.and_then(|o| o.get("humanized").and_then(|h| h.as_str()))
211-
.ok_or_else(|| anyhow::anyhow!("No output"))?;
212-
let output_json: serde_json::Value = serde_json::from_str(output_json_str)?;
208+
let output_json = output
209+
.get_mut("output")
210+
.ok_or_else(|| anyhow::anyhow!("No output"))?
211+
.take();
213212
Ok(output_json)
214213
}

0 commit comments

Comments
 (0)