From c1fda39fa9dd3fc5a1d9d4f69e20ad628632539f Mon Sep 17 00:00:00 2001 From: FujiApple Date: Sat, 23 Nov 2024 16:17:29 +0800 Subject: [PATCH] refactor(core): rename `backend` test resources as `state` --- crates/trippy-core/src/state.rs | 2 +- .../{backend => state}/ipv4_3probes_3hops_completed.yaml | 0 .../{backend => state}/ipv4_3probes_3hops_mixed_multi.yaml | 0 .../resources/{backend => state}/ipv4_4probes_0latency.yaml | 0 .../resources/{backend => state}/ipv4_4probes_all_status.yaml | 0 .../tests/resources/{backend => state}/ipv4_nat.yaml | 0 6 files changed, 1 insertion(+), 1 deletion(-) rename crates/trippy-core/tests/resources/{backend => state}/ipv4_3probes_3hops_completed.yaml (100%) rename crates/trippy-core/tests/resources/{backend => state}/ipv4_3probes_3hops_mixed_multi.yaml (100%) rename crates/trippy-core/tests/resources/{backend => state}/ipv4_4probes_0latency.yaml (100%) rename crates/trippy-core/tests/resources/{backend => state}/ipv4_4probes_all_status.yaml (100%) rename crates/trippy-core/tests/resources/{backend => state}/ipv4_nat.yaml (100%) diff --git a/crates/trippy-core/src/state.rs b/crates/trippy-core/src/state.rs index a11e6f28b..87404f5b7 100644 --- a/crates/trippy-core/src/state.rs +++ b/crates/trippy-core/src/state.rs @@ -830,7 +830,7 @@ mod tests { macro_rules! file { ($path:expr) => {{ - let yaml = include_str!(concat!("../tests/resources/backend/", $path)); + let yaml = include_str!(concat!("../tests/resources/state/", $path)); serde_yml::from_str(yaml).unwrap() }}; } diff --git a/crates/trippy-core/tests/resources/backend/ipv4_3probes_3hops_completed.yaml b/crates/trippy-core/tests/resources/state/ipv4_3probes_3hops_completed.yaml similarity index 100% rename from crates/trippy-core/tests/resources/backend/ipv4_3probes_3hops_completed.yaml rename to crates/trippy-core/tests/resources/state/ipv4_3probes_3hops_completed.yaml diff --git a/crates/trippy-core/tests/resources/backend/ipv4_3probes_3hops_mixed_multi.yaml b/crates/trippy-core/tests/resources/state/ipv4_3probes_3hops_mixed_multi.yaml similarity index 100% rename from crates/trippy-core/tests/resources/backend/ipv4_3probes_3hops_mixed_multi.yaml rename to crates/trippy-core/tests/resources/state/ipv4_3probes_3hops_mixed_multi.yaml diff --git a/crates/trippy-core/tests/resources/backend/ipv4_4probes_0latency.yaml b/crates/trippy-core/tests/resources/state/ipv4_4probes_0latency.yaml similarity index 100% rename from crates/trippy-core/tests/resources/backend/ipv4_4probes_0latency.yaml rename to crates/trippy-core/tests/resources/state/ipv4_4probes_0latency.yaml diff --git a/crates/trippy-core/tests/resources/backend/ipv4_4probes_all_status.yaml b/crates/trippy-core/tests/resources/state/ipv4_4probes_all_status.yaml similarity index 100% rename from crates/trippy-core/tests/resources/backend/ipv4_4probes_all_status.yaml rename to crates/trippy-core/tests/resources/state/ipv4_4probes_all_status.yaml diff --git a/crates/trippy-core/tests/resources/backend/ipv4_nat.yaml b/crates/trippy-core/tests/resources/state/ipv4_nat.yaml similarity index 100% rename from crates/trippy-core/tests/resources/backend/ipv4_nat.yaml rename to crates/trippy-core/tests/resources/state/ipv4_nat.yaml