Skip to content

Commit fbb6422

Browse files
committed
fix settings.rs
1 parent 583d33e commit fbb6422

File tree

86 files changed

+18
-26
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

86 files changed

+18
-26
lines changed

lib/vector-core/src/tls/settings.rs

Lines changed: 14 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -27,17 +27,16 @@ use super::{
2727

2828
pub const PEM_START_MARKER: &str = "-----BEGIN ";
2929

30-
pub const TEST_PEM_CA_PATH: &str = "tests/integration/shared/data/ca/certs/ca.cert.pem";
30+
pub const TEST_PEM_CA_PATH: &str = "tests/data/ca/certs/ca.cert.pem";
3131
pub const TEST_PEM_INTERMEDIATE_CA_PATH: &str =
32-
"tests/integration/shared/data/ca/intermediate_server/certs/ca-chain.cert.pem";
32+
"tests/data/ca/intermediate_server/certs/ca-chain.cert.pem";
3333
pub const TEST_PEM_CRT_PATH: &str =
34-
"tests/integration/shared/data/ca/intermediate_server/certs/localhost-chain.cert.pem";
35-
pub const TEST_PEM_KEY_PATH: &str =
36-
"tests/integration/shared/data/ca/intermediate_server/private/localhost.key.pem";
34+
"tests/data/ca/intermediate_server/certs/localhost-chain.cert.pem";
35+
pub const TEST_PEM_KEY_PATH: &str = "tests/data/ca/intermediate_server/private/localhost.key.pem";
3736
pub const TEST_PEM_CLIENT_CRT_PATH: &str =
38-
"tests/integration/shared/data/ca/intermediate_client/certs/localhost-chain.cert.pem";
37+
"tests/data/ca/intermediate_client/certs/localhost-chain.cert.pem";
3938
pub const TEST_PEM_CLIENT_KEY_PATH: &str =
40-
"tests/integration/shared/data/ca/intermediate_client/private/localhost.key.pem";
39+
"tests/data/ca/intermediate_client/private/localhost.key.pem";
4140

4241
/// Configures the TLS options for incoming/outgoing connections.
4342
#[configurable_component]
@@ -676,14 +675,11 @@ fn open_read(filename: &Path, note: &'static str) -> Result<(Vec<u8>, PathBuf)>
676675
mod test {
677676
use super::*;
678677

679-
const TEST_PKCS12_PATH: &str =
680-
"tests/integration/shared/data/ca/intermediate_client/private/localhost.p12";
681-
const TEST_PEM_CRT_BYTES: &[u8] = include_bytes!(
682-
"../../../../tests/integration/shared/data/ca/intermediate_server/certs/localhost.cert.pem"
683-
);
684-
const TEST_PEM_KEY_BYTES: &[u8] = include_bytes!(
685-
"../../../../tests/integration/shared/data/ca/intermediate_server/private/localhost.key.pem"
686-
);
678+
const TEST_PKCS12_PATH: &str = "tests/data/ca/intermediate_client/private/localhost.p12";
679+
const TEST_PEM_CRT_BYTES: &[u8] =
680+
include_bytes!("../../../../tests/data/ca/intermediate_server/certs/localhost.cert.pem");
681+
const TEST_PEM_KEY_BYTES: &[u8] =
682+
include_bytes!("../../../../tests/data/ca/intermediate_server/private/localhost.key.pem");
687683

688684
#[test]
689685
fn parse_alpn_protocols() {
@@ -753,8 +749,7 @@ mod test {
753749
#[test]
754750
fn from_options_inline_ca() {
755751
let ca = String::from_utf8(
756-
include_bytes!("../../../../tests/integration/shared/data/ca/certs/ca.cert.pem")
757-
.to_vec(),
752+
include_bytes!("../../../../tests/data/ca/certs/ca.cert.pem").to_vec(),
758753
)
759754
.unwrap();
760755
let options = TlsConfig {
@@ -770,10 +765,7 @@ mod test {
770765
#[test]
771766
fn from_options_intermediate_ca() {
772767
let options = TlsConfig {
773-
ca_file: Some(
774-
"tests/integration/shared/data/ca/intermediate_server/certs/ca-chain.cert.pem"
775-
.into(),
776-
),
768+
ca_file: Some("tests/data/ca/intermediate_server/certs/ca-chain.cert.pem".into()),
777769
..Default::default()
778770
};
779771
let settings = TlsSettings::from_options(Some(&options))
@@ -785,7 +777,7 @@ mod test {
785777
#[test]
786778
fn from_options_multi_ca() {
787779
let options = TlsConfig {
788-
ca_file: Some("tests/integration/shared/data/Multi_CA.crt".into()),
780+
ca_file: Some("tests/data/Multi_CA.crt".into()),
789781
..Default::default()
790782
};
791783
let settings = TlsSettings::from_options(Some(&options))

scripts/e2e/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
2020
mold \
2121
&& rm -rf /var/lib/apt/lists/*
2222

23-
COPY tests/integration/shared/data/ca/certs /certs
23+
COPY tests/data/ca/certs /certs
2424

2525
COPY scripts/environment/install-protoc.sh /
2626
COPY scripts/environment/prepare.sh /
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)