Skip to content

Commit

Permalink
fix flow_input
Browse files Browse the repository at this point in the history
  • Loading branch information
juchiast committed Jan 22, 2025
1 parent 715ec0b commit 4ebc7ef
Show file tree
Hide file tree
Showing 3 changed files with 1,530 additions and 1 deletion.
23 changes: 23 additions & 0 deletions crates/flow-server/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -528,6 +528,29 @@ mod tests {
dbg!(res);
}


#[tokio::test]
async fn test_flow_input() {
tracing_subscriber::fmt::try_init().ok();
let json = include_str!("../../../test_files/HTTP Request.json");
let flow_config = FlowConfig::new(serde_json::from_str::<TestFile>(json).unwrap().flow);
let mut flow = FlowGraph::from_cfg(flow_config, <_>::default(), None)
.await
.unwrap();
let (tx, _rx) = event_channel();
let res = flow
.run(
tx,
<_>::default(),
<_>::default(),
<_>::default(),
<_>::default(),
<_>::default(),
)
.await;
dbg!(res);
}

#[test]
fn test_name_unique() {
let mut m = std::collections::HashSet::new();
Expand Down
2 changes: 1 addition & 1 deletion crates/flow/src/command/flow_input.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ impl CommandTrait for FlowInputCommand {

fn outputs(&self) -> Vec<Output> {
[Output {
name: OUTPUT.into(),
name: self.label.clone(),
r#type: ValueType::Free,
optional: false,
}]
Expand Down
Loading

0 comments on commit 4ebc7ef

Please sign in to comment.