chore: Add test to check FILE_DESCRIPTOR_SET is valid (#1217)
This commit is contained in:
@@ -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"
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user