Skip to content

Commit 9b0c07a

Browse files
committedMar 28, 2024
Remove inst dependency
At the current pace of development, keeping up with churn in the insta crate is more work than manually updating the two test values we have. Remove the dependency in favour of inline static &str literals.
1 parent b57717e commit 9b0c07a

File tree

4 files changed

+4
-15
lines changed

4 files changed

+4
-15
lines changed
 

Diff for: ‎ppoprf/Cargo.toml

-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ env_logger = "0.11.3"
2828
log = "0.4.21"
2929
reqwest = { version = "0.12.0", features = [ "blocking", "json" ] }
3030
dotenvy = "0.15.7"
31-
insta = "1.36.1"
3231
tokio = { version = "1.36.0", features = ["macros", "rt-multi-thread", "time"] }
3332
warp = "0.3.6"
3433

Diff for: ‎ppoprf/src/ppoprf.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -441,8 +441,6 @@ fn strobe_hash(input: &[u8], label: &str, out: &mut [u8]) {
441441
mod tests {
442442
use super::*;
443443

444-
use insta::assert_snapshot;
445-
446444
fn end_to_end_eval_check_no_proof(
447445
server: &Server,
448446
c_input: &[u8],
@@ -573,7 +571,8 @@ mod tests {
573571
.serialize_to_bincode()
574572
.expect("Should serialize to bincode");
575573

576-
assert_snapshot!(base64::encode(&pk_bincode));
574+
let expected = "qvgkBOX3v6c1LOCT5Kq+gkNThdZKqHAJClbRqjYWmAAIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAH21zz6BGKHRL9pORR/hTW+FKDvE+OrKUQTF3tUHwjaCQJ4y7Cc0Y+Qgk+M41esYWMnb7xw31kKOFOtBW9K8W9mKwMMGFZGUxdw8a0YR+AcaR4oHwziNgXQOiYl9+HURiPWKgSC7x8pf72mezXiE73bnAQ+Ydwj1TiaXpObtvV73UFFQQXqHR1+dcom/BojKL4hyvKQwXEyjBip91w+Akrlxwv8NAaOL9VPRsgI/LJ+qWvbblaC1onIB9giUBNgnKk4P5juHAfkpVyW6kyQjufMFaegMpo9P47w84s4Bo4AtMizA3rcPw==";
575+
assert_eq!(base64::encode(&pk_bincode), expected);
577576

578577
ServerPublicKey::load_from_bincode(&pk_bincode)
579578
.expect("Should load bincode");
@@ -600,7 +599,8 @@ mod tests {
600599
.serialize_to_bincode()
601600
.expect("Should serialize to bincode");
602601

603-
assert_snapshot!(base64::encode(&proof_bincode));
602+
let expected = "BwcHBwcHBwcHBwcHBwcHBwcHBwcHBwcHBwcHBwcHBwcPDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw==";
603+
assert_eq!(base64::encode(&proof_bincode), expected);
604604

605605
ProofDLEQ::load_from_bincode(&proof_bincode).expect("Should load bincode");
606606
}

Diff for: ‎ppoprf/src/snapshots/ppoprf__ppoprf__tests__pk_serialization.snap

-5
This file was deleted.

Diff for: ‎ppoprf/src/snapshots/ppoprf__ppoprf__tests__proof_serialization.snap

-5
This file was deleted.

0 commit comments

Comments
 (0)