[tests] Testkit: test CA, echo and websocket upstreams, mock Authelia, clients
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
// This Source Code Form is subject to the terms of the Mozilla Public
|
||||
// License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
// file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||
|
||||
//! Test fixtures shared by the edge integration tests and the differential harness.
|
||||
//! Everything listens on 127.0.0.1 only. This is test code: panics are failures.
|
||||
|
||||
#![allow(clippy::unwrap_used, clippy::expect_used, clippy::panic)]
|
||||
|
||||
pub mod authelia;
|
||||
pub mod client;
|
||||
pub mod proc;
|
||||
pub mod tls;
|
||||
pub mod upstream;
|
||||
|
||||
/// FNV-1a 64-bit, used to compare bodies and secret values without echoing them.
|
||||
pub fn fnv64(data: &[u8]) -> String {
|
||||
let mut h: u64 = 0xcbf2_9ce4_8422_2325;
|
||||
for b in data {
|
||||
h ^= u64::from(*b);
|
||||
h = h.wrapping_mul(0x0100_0000_01b3);
|
||||
}
|
||||
format!("{h:016x}")
|
||||
}
|
||||
Reference in New Issue
Block a user