From fc08833c5b709a491b491abb44b2013908af0b59 Mon Sep 17 00:00:00 2001 From: Chip Senkbeil Date: Sun, 11 Jun 2023 17:46:03 -0500 Subject: [PATCH] Update changelog and fix distant-protocol test issue --- CHANGELOG.md | 5 +++++ distant-protocol/src/response.rs | 12 ++++++------ 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e3114b0..77bf3ea 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +### Added + +- `Request` and `Response` types from `distant-net` now support an optional + `Header` to send miscellaneous information + ### Changed - `Change` structure now provides a single `path` instead of `paths` with the diff --git a/distant-protocol/src/response.rs b/distant-protocol/src/response.rs index 8470ce1..c73812e 100644 --- a/distant-protocol/src/response.rs +++ b/distant-protocol/src/response.rs @@ -631,7 +631,7 @@ mod tests { value, serde_json::json!({ "type": "changed", - "ts": u64::MAX, + "timestamp": u64::MAX, "kind": "access", "path": "path", }) @@ -657,13 +657,13 @@ mod tests { value, serde_json::json!({ "type": "changed", - "ts": u64::MAX, + "timestamp": u64::MAX, "kind": "access", "path": "path", "details": { "attribute": "permissions", "renamed": "renamed", - "ts": u64::MAX, + "timestamp": u64::MAX, "extra": "info", }, }) @@ -674,7 +674,7 @@ mod tests { fn should_be_able_to_deserialize_minimal_payload_from_json() { let value = serde_json::json!({ "type": "changed", - "ts": u64::MAX, + "timestamp": u64::MAX, "kind": "access", "path": "path", }); @@ -695,13 +695,13 @@ mod tests { fn should_be_able_to_deserialize_full_payload_from_json() { let value = serde_json::json!({ "type": "changed", - "ts": u64::MAX, + "timestamp": u64::MAX, "kind": "access", "path": "path", "details": { "attribute": "permissions", "renamed": "renamed", - "ts": u64::MAX, + "timestamp": u64::MAX, "extra": "info", }, });