pub struct SshServerConfig {
pub image_name: String,
pub image_tag: String,
pub username: String,
pub password: PlainPassword,
pub startup_wait_secs: u64,
pub dockerfile_dir: PathBuf,
pub mock_port: u16,
}Expand description
Configuration for SSH server containers
This struct defines all configurable parameters for SSH server containers.
Use the builder pattern to create custom configurations, or use default()
for standard test scenarios.
§Examples
use torrust_tracker_deployer_lib::testing::integration::ssh_server::SshServerConfig;
// Use default configuration
let config = SshServerConfig::default();
// Customize configuration
let config = SshServerConfig::builder()
.username("customuser")
.password("custompass")
.startup_wait_secs(15)
.build();Fields§
§image_name: StringDocker image name for the SSH server
image_tag: StringDocker image tag for the SSH server
username: StringTest username configured in the SSH server
password: PlainPasswordTest password configured in the SSH server
startup_wait_secs: u64Container startup wait time in seconds
dockerfile_dir: PathBufPath to the Dockerfile directory
mock_port: u16Port to use for mock container (default: 2222)
Implementations§
Source§impl SshServerConfig
impl SshServerConfig
Sourcepub fn builder() -> SshServerConfigBuilder
pub fn builder() -> SshServerConfigBuilder
Create a builder for custom configuration
§Example
use torrust_tracker_deployer_lib::testing::integration::ssh_server::SshServerConfig;
let config = SshServerConfig::builder()
.username("testuser")
.password("testpass")
.build();Trait Implementations§
Source§impl Clone for SshServerConfig
impl Clone for SshServerConfig
Source§impl Debug for SshServerConfig
impl Debug for SshServerConfig
Source§impl Default for SshServerConfig
impl Default for SshServerConfig
Source§fn default() -> Self
fn default() -> Self
Create configuration with default values from constants
Default values:
- Image:
torrust-ssh-server:latest - Username:
testuser - Password:
testpass - Startup wait: 10 seconds
- Dockerfile:
docker/ssh-server - Mock port: 2222
Note: The SSH container always uses port 22 internally (this is not configurable)
impl Eq for SshServerConfig
Source§impl PartialEq for SshServerConfig
impl PartialEq for SshServerConfig
impl StructuralPartialEq for SshServerConfig
Auto Trait Implementations§
impl Freeze for SshServerConfig
impl RefUnwindSafe for SshServerConfig
impl Send for SshServerConfig
impl Sync for SshServerConfig
impl Unpin for SshServerConfig
impl UnsafeUnpin for SshServerConfig
impl UnwindSafe for SshServerConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request