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

This commit is contained in:
tottoto
2023-01-04 14:19:47 -05:00
committed by GitHub
parent c772a786a9
commit 3ee1e6cc10
4 changed files with 34 additions and 0 deletions
+11
View File
@@ -22,6 +22,17 @@ pub mod proto {
include!("generated/grpc.reflection.v1alpha.rs");
pub const FILE_DESCRIPTOR_SET: &[u8] = include_bytes!("generated/reflection_v1alpha1.bin");
#[cfg(test)]
mod tests {
use super::FILE_DESCRIPTOR_SET;
use prost::Message as _;
#[test]
fn file_descriptor_set_is_valid() {
prost_types::FileDescriptorSet::decode(FILE_DESCRIPTOR_SET).unwrap();
}
}
}
/// Implementation of the server component of gRPC Server Reflection.