chore: Smoketests for rosenpass-gen-ipc-msg-types

This commit is contained in:
Karolin Varner
2024-12-19 15:23:02 +01:00
parent b5848af799
commit 742e037936
2 changed files with 19 additions and 0 deletions

View File

@@ -26,6 +26,10 @@ required-features = ["experiment_api", "internal_testing"]
name = "api-integration-tests-api-setup" name = "api-integration-tests-api-setup"
required-features = ["experiment_api", "internal_testing"] required-features = ["experiment_api", "internal_testing"]
[[test]]
name = "gen-ipc-msg-types"
required-features = ["experiment_api", "internal_testing", "internal_bin_gen_ipc_msg_types"]
[[bench]] [[bench]]
name = "handshake" name = "handshake"
harness = false harness = false

View File

@@ -0,0 +1,15 @@
use std::{borrow::Borrow, process::Command};
#[test]
fn test_gen_ipc_msg_types() -> anyhow::Result<()> {
let out = Command::new(env!("CARGO_BIN_EXE_rosenpass-gen-ipc-msg-types")).output()?;
assert!(out.status.success());
let stdout = String::from_utf8(out.stdout)?;
// Smoke tests only
assert!(stdout.contains("type RawMsgType = u128;"));
assert!(stdout.contains("const SUPPLY_KEYPAIR_RESPONSE : RawMsgType = RawMsgType::from_le_bytes(hex!(\"f2dc 49bd e261 5f10 40b7 3c16 ec61 edb9\"));"));
Ok(())
}