mirror of
https://github.com/rustfs/rustfs.git
synced 2026-09-18 00:25:31 +00:00
Merge branch 'main' into fix/heal-pool-metadata-scope
This commit is contained in:
@@ -471,7 +471,11 @@ pub fn sign_top_export<T: Serialize>(
|
||||
classification: TOP_CLASSIFICATION,
|
||||
consent_uid: &request.scope.consent.uid,
|
||||
policy_revision: request.scope.policy_revision,
|
||||
produced_at: now.format(&Rfc3339).map_err(|_| TopCaptureError::Serialization)?,
|
||||
produced_at: now
|
||||
.replace_nanosecond(0)
|
||||
.map_err(|_| TopCaptureError::Serialization)?
|
||||
.format(&Rfc3339)
|
||||
.map_err(|_| TopCaptureError::Serialization)?,
|
||||
expires_at: OffsetDateTime::from_unix_timestamp(expires_at_unix)
|
||||
.map_err(|_| TopCaptureError::Expired)?
|
||||
.format(&Rfc3339)
|
||||
|
||||
@@ -188,6 +188,7 @@ fn top_network_export_is_bounded_redacted_and_signed_over_exact_envelope_bytes()
|
||||
let envelope: serde_json::Value = serde_json::from_slice(&export.envelope_json).expect("envelope");
|
||||
assert_eq!(envelope["toolId"], "top.net");
|
||||
assert_eq!(envelope["classification"], "L3");
|
||||
assert_eq!(envelope["producedAt"].as_str().expect("producedAt").len(), 20);
|
||||
assert_eq!(envelope["payload"]["path"], "result.json");
|
||||
assert_eq!(envelope["payload"]["sha256"], export.result_sha256);
|
||||
let result_text = String::from_utf8_lossy(&export.result_json);
|
||||
|
||||
Reference in New Issue
Block a user