mirror of https://github.com/telemt/telemt.git
Merge pull request #221 from vladon/fix/test-compilation-errors
fix: add missing imports in test code
This commit is contained in:
commit
3d3ddd37d7
|
|
@ -229,6 +229,7 @@ fn render_metrics(stats: &Stats) -> String {
|
||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
mod tests {
|
mod tests {
|
||||||
use super::*;
|
use super::*;
|
||||||
|
use http_body_util::BodyExt;
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn test_render_metrics_format() {
|
fn test_render_metrics_format() {
|
||||||
|
|
|
||||||
|
|
@ -7,6 +7,7 @@
|
||||||
#![allow(dead_code)]
|
#![allow(dead_code)]
|
||||||
|
|
||||||
use crate::crypto::{sha256_hmac, SecureRandom};
|
use crate::crypto::{sha256_hmac, SecureRandom};
|
||||||
|
use crate::error::ProxyError;
|
||||||
use super::constants::*;
|
use super::constants::*;
|
||||||
use std::time::{SystemTime, UNIX_EPOCH};
|
use std::time::{SystemTime, UNIX_EPOCH};
|
||||||
use num_bigint::BigUint;
|
use num_bigint::BigUint;
|
||||||
|
|
@ -614,7 +615,7 @@ pub fn parse_tls_record_header(header: &[u8; 5]) -> Option<(u8, u16)> {
|
||||||
///
|
///
|
||||||
/// This is useful for testing that our ServerHello is well-formed.
|
/// This is useful for testing that our ServerHello is well-formed.
|
||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
fn validate_server_hello_structure(data: &[u8]) -> Result<()> {
|
fn validate_server_hello_structure(data: &[u8]) -> Result<(), ProxyError> {
|
||||||
if data.len() < 5 {
|
if data.len() < 5 {
|
||||||
return Err(ProxyError::InvalidTlsRecord {
|
return Err(ProxyError::InvalidTlsRecord {
|
||||||
record_type: 0,
|
record_type: 0,
|
||||||
|
|
|
||||||
|
|
@ -497,6 +497,7 @@ impl ReplayStats {
|
||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
mod tests {
|
mod tests {
|
||||||
use super::*;
|
use super::*;
|
||||||
|
use std::sync::Arc;
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn test_stats_shared_counters() {
|
fn test_stats_shared_counters() {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue