Skip to content

Commit 3e3c744

Browse files
Use collection for pipeline job test case.
1 parent acbefe3 commit 3e3c744

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

tests/pipeline.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ fn input_packet_checksum() -> Result<()> {
3737
HashMap::from([(
3838
"node_key_1".into(),
3939
PathInfo {
40-
path: "/tmp/input/subject.jpeg".into(),
40+
path: "/tmp/input".into(),
4141
match_pattern: r".*\.jpeg".into(),
4242
},
4343
)]),
@@ -59,14 +59,14 @@ fn input_packet_checksum() -> Result<()> {
5959
pipeline.into(),
6060
&HashMap::from([(
6161
"pipeline_key_1".into(),
62-
vec![PathSet::Unary(Blob {
62+
vec![PathSet::Collection(vec![Blob {
6363
kind: BlobKind::File,
6464
location: URI {
6565
namespace: "default".into(),
6666
path: "images/subject.jpeg".into(),
6767
},
6868
checksum: String::new(),
69-
})],
69+
}])],
7070
)]),
7171
&URI {
7272
namespace: "default".into(),
@@ -76,7 +76,7 @@ fn input_packet_checksum() -> Result<()> {
7676
)?;
7777

7878
let checksum = match &pipeline_job.input_packet["pipeline_key_1"].first() {
79-
Some(PathSet::Unary(blob)) => blob.checksum.clone(),
79+
Some(PathSet::Collection(blobs)) => blobs[0].checksum.clone(),
8080
Some(_) | None => panic!("Input configuration unexpectedly changed."),
8181
};
8282

0 commit comments

Comments
 (0)