[][src]Struct utils::testing::TestService

pub struct TestService { /* fields omitted */ }
[]

This structure allows the creation of an instance of an actual service/binary crate for use in integration tests within the same crate.

Methods

impl TestService[src][]

pub fn new(name: &str, ip: &str, port: u16) -> TestService[src][]

Create config for TestService and return basic struct

pub fn config(&mut self, config_data: &str)[src][]

Appends additional configuration data to service's config

pub fn build(&self)[src][]

Ask Cargo to build the service binary. This is a blocking function. We know when it returns that the service is ready to be run.

pub fn spawn(&self)[src][]

Ask Cargo to run the service binary. This is not a blocking function. The service is spawned in the background, allowing the test to continue on.

pub fn kill(&self)[src][]

Kill the running process.

Trait Implementations

impl Drop for TestService[src][+]

Implement custom drop functionality which will retrieve handle to child process and kill it.

Auto Trait Implementations

impl Send for TestService

impl Unpin for TestService

impl !Sync for TestService

impl UnwindSafe for TestService

impl !RefUnwindSafe for TestService

Blanket Implementations

impl<T, U> Into<U> for T where
    U: From<T>, 
[src][+]

impl<T> From<T> for T[src][+]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src][+]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src][+]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src][+]

impl<T> Borrow<T> for T where
    T: ?Sized
[src][+]

impl<T> Any for T where
    T: 'static + ?Sized
[src][+]

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 
[+]

impl<T> Same<T> for T

type Output = T

Should always be Self