chore: Add test to check FILE_DESCRIPTOR_SET is valid (#1217)

This commit is contained in:
tottoto
2023-01-05 04:19:47 +09:00
committed by GitHub
parent c772a786a9
commit 3ee1e6cc10
4 changed files with 34 additions and 0 deletions
+1
View File
@@ -28,3 +28,4 @@ tonic = { version = "0.8", path = "../tonic", default-features = false, features
[dev-dependencies]
tokio = {version = "1.0", features = ["rt-multi-thread", "macros"]}
tonic-build = { version = "0.8", path = "../tonic-build", default-features = false, features = ["prost"] }
prost-types = "0.11"
+11
View File
@@ -31,6 +31,17 @@ pub mod proto {
pub const GRPC_HEALTH_V1_FILE_DESCRIPTOR_SET: &[u8] =
include_bytes!("generated/grpc_health_v1.bin");
#[cfg(test)]
mod tests {
use super::GRPC_HEALTH_V1_FILE_DESCRIPTOR_SET;
use prost::Message as _;
#[test]
fn file_descriptor_set_is_valid() {
prost_types::FileDescriptorSet::decode(GRPC_HEALTH_V1_FILE_DESCRIPTOR_SET).unwrap();
}
}
}
pub mod server;