Mercurial > crates > systemd-socket
comparison tests/ordinary.rs @ 1:ef8bf41097ac
Added integration tests
author | Martin Habovstiak <martin.habovstiak@gmail.com> |
---|---|
date | Fri, 27 Nov 2020 10:07:35 +0100 |
parents | |
children | 66c0e10c89fc |
comparison
equal
deleted
inserted
replaced
0:a65053246c29 | 1:ef8bf41097ac |
---|---|
1 use std::io; | |
2 use std::ffi::OsStr; | |
3 use std::process::{Command, Child}; | |
4 | |
5 mod comm; | |
6 | |
7 enum Test {} | |
8 | |
9 impl comm::Test for Test { | |
10 const SOCKET_ADDR: &'static str = "127.0.0.1:4242"; | |
11 | |
12 fn spawn_slave(program_name: &OsStr) -> io::Result<Child> { | |
13 Command::new(program_name) | |
14 .env("SYSTEMD_SOCKET_INTEGRATION_TEST", "slave") | |
15 .spawn() | |
16 } | |
17 } | |
18 | |
19 #[test] | |
20 fn main() { | |
21 comm::main::<Test>(); | |
22 } |