Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/server/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
tls::{CertificateResolverFactory, GeneratingCertificateResolverFactory},
};

const DEFAULT_CA_PRIVATE_KEY: &str = include_str!("../../certs/ca.key");
const DEFAULT_CA_CERTIFICATE: &str = include_str!("../../certs/ca.pem");
pub const DEFAULT_CA_PRIVATE_KEY: &str = include_str!("../../certs/ca.key");
pub const DEFAULT_CA_CERTIFICATE: &str = include_str!("../../certs/ca.pem");

/// The Builder streamlines the configuration process, automatically setting up defaults and
/// handling dependency injection for the mock server. It consolidates configuration parameters,
Expand Down Expand Up @@ -147,7 +147,7 @@
///
/// # Returns
/// A `MockServerHttpsConfig` instance or an error if validation fails.
pub fn build(mut self) -> Result<MockServerHttpsConfig, Box<dyn Error>> {

Check failure on line 150 in src/server/builder.rs

View workflow job for this annotation

GitHub Actions / Check feature combinations

variable does not need to be mutable

Check failure on line 150 in src/server/builder.rs

View workflow job for this annotation

GitHub Actions / MSRV

variable does not need to be mutable

Check failure on line 150 in src/server/builder.rs

View workflow job for this annotation

GitHub Actions / Test (all-features)

variable does not need to be mutable
self.validate()?;

let cert_resolver_factory = match (
Expand Down
2 changes: 1 addition & 1 deletion src/server/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@
pub mod state;

#[cfg(feature = "record")]
mod persistence;

Check warning on line 10 in src/server/mod.rs

View workflow job for this annotation

GitHub Actions / Format and lint

Diff in /home/runner/work/httpmock/httpmock/src/server/mod.rs

#[cfg(feature = "https")]
mod tls;

pub use builder::HttpMockServerBuilder;
pub use builder::{HttpMockServerBuilder, DEFAULT_CA_PRIVATE_KEY, DEFAULT_CA_CERTIFICATE};
pub use server::Error;

use crate::server::{handler::HttpMockHandler, server::MockServer, state::HttpMockStateManager};
Expand Down
Loading