[WIP] Integration of TestEnvironment
This commit is contained in:
parent
d87cd468cc
commit
b381e6fa7f
@ -22,6 +22,12 @@ pub struct TestEnvironment {
|
|||||||
// TODO ssh servers and local server
|
// TODO ssh servers and local server
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[derive(Debug)]
|
||||||
|
pub struct SshServer {
|
||||||
|
pub name: String,
|
||||||
|
pub home_dir: FsEntry,
|
||||||
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug)]
|
||||||
pub struct FsEntry {
|
pub struct FsEntry {
|
||||||
pub name: OsString,
|
pub name: OsString,
|
||||||
@ -30,14 +36,17 @@ pub struct FsEntry {
|
|||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug)]
|
||||||
pub enum FsEntryKind {
|
pub enum FsEntryKind {
|
||||||
Directory {
|
Directory(Dir),
|
||||||
entries: Vec<FsEntry>,
|
|
||||||
},
|
|
||||||
File {
|
File {
|
||||||
contents: String,
|
contents: String,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[derive(Debug)]
|
||||||
|
pub struct Dir {
|
||||||
|
pub contents: Vec<FsEntry>,
|
||||||
|
}
|
||||||
|
|
||||||
impl Environment for TestEnvironment {
|
impl Environment for TestEnvironment {
|
||||||
fn args_os(&self) -> Vec<OsString> {
|
fn args_os(&self) -> Vec<OsString> {
|
||||||
self.args_os.clone()
|
self.args_os.clone()
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user