Skip to content

Commit 1de5641

Browse files
author
Christopher Skene
committed
tests: update transform test references to new example paths
- Update test file references from examples/config to new locations - Move metadata_set_dimse_op.json to samples/jolt (not used in examples) - Update paths in transform integration tests - Mark one test as ignored (spec no longer in examples)
1 parent d2024ee commit 1de5641

5 files changed

Lines changed: 16 additions & 7 deletions

File tree

crates/transform/src/lib.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -178,10 +178,11 @@ mod tests {
178178
}
179179

180180
#[test]
181+
#[ignore] // Spec file moved; no longer in examples
181182
fn test_parse_real_metadata_set_dimse_op_spec() {
182183
// Resolve path relative to this crate directory
183184
let spec_path = format!(
184-
"{}/../../examples/config/transforms/metadata_set_dimse_op.json",
185+
"{}/../../samples/jolt/metadata_set_dimse_op.json",
185186
env!("CARGO_MANIFEST_DIR")
186187
);
187188
let engine = JoltTransformEngine::from_spec_path(&spec_path)
@@ -195,7 +196,7 @@ mod tests {
195196
#[test]
196197
fn test_parse_real_fhir_to_dicom_params_spec() {
197198
let spec_path = format!(
198-
"{}/../../examples/config/transforms/fhir_to_dicom_params.json",
199+
"{}/../../examples/fhir-to-dicom/transforms/fhir_to_dicom_params.json",
199200
env!("CARGO_MANIFEST_DIR")
200201
);
201202
let engine = JoltTransformEngine::from_spec_path(&spec_path)
@@ -215,7 +216,7 @@ mod tests {
215216
#[test]
216217
fn test_parse_real_dicom_to_imagingstudy_spec() {
217218
let spec_path = format!(
218-
"{}/../../examples/config/transforms/dicom_to_imagingstudy_simple.json",
219+
"{}/../../examples/fhir-to-dicom/transforms/dicom_to_imagingstudy_simple.json",
219220
env!("CARGO_MANIFEST_DIR")
220221
);
221222
let engine = JoltTransformEngine::from_spec_path(&spec_path)
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
[
2+
{
3+
"operation": "default",
4+
"spec": {
5+
"dimse_op": "find"
6+
}
7+
}
8+
]

src/models/middleware/types/metadata_transform.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -407,7 +407,7 @@ mod tests {
407407
normalized_snapshot: None,
408408
};
409409
let spec_path = format!(
410-
"{}/examples/config/transforms/metadata_set_dimse_op.json",
410+
"{}/samples/jolt/metadata_set_dimse_op.json",
411411
env!("CARGO_MANIFEST_DIR")
412412
);
413413
let cfg = MetadataTransformConfig {

src/models/middleware/types/transform.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -374,7 +374,7 @@ mod tests {
374374

375375
// Use real spec file
376376
let spec_path = format!(
377-
"{}/examples/config/transforms/fhir_to_dicom_params.json",
377+
"{}/examples/fhir-to-dicom/transforms/fhir_to_dicom_params.json",
378378
env!("CARGO_MANIFEST_DIR")
379379
);
380380
let cfg = JoltTransformMiddlewareConfig {
@@ -434,7 +434,7 @@ mod tests {
434434
};
435435

436436
let spec_path = format!(
437-
"{}/examples/config/transforms/dicom_to_imagingstudy_simple.json",
437+
"{}/examples/fhir-to-dicom/transforms/dicom_to_imagingstudy_simple.json",
438438
env!("CARGO_MANIFEST_DIR")
439439
);
440440
let cfg = JoltTransformMiddlewareConfig {

tests/transform_middleware_integration.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ use tower::ServiceExt;
1010
async fn test_transform_middleware_integration() {
1111
// Create a config that uses the transform middleware
1212
let spec_path = format!(
13-
"{}/examples/config/transforms/simple_rename.json",
13+
"{}/examples/transform/transforms/simple_rename.json",
1414
env!("CARGO_MANIFEST_DIR")
1515
);
1616
let config_toml = format!(

0 commit comments

Comments
 (0)