pub struct TestHarness {
pub proxy: TestHarnessProxy,
pub config: HarnessConfig,
pub dir_rights: Rights,
pub file_rights: Rights,
pub executable_file_rights: Rights,
}
Expand description
Helper struct for connecting to an io1 test harness and running a conformance test on it.
Fields§
§proxy: TestHarnessProxy
FIDL proxy to the io1 test harness.
config: HarnessConfig
Config for the filesystem.
dir_rights: Rights
All io_test::Directory
rights supported by the filesystem.
file_rights: Rights
All io_test::File
rights supported by the filesystem.
executable_file_rights: Rights
All io_test::ExecutableFile
rights supported by the filesystem.
Implementations§
Source§impl TestHarness
impl TestHarness
Sourcepub async fn new() -> TestHarness
pub async fn new() -> TestHarness
Connects to the test harness and returns a TestHarness
struct.
Sourcepub fn get_directory(
&self,
entries: Vec<DirectoryEntry>,
flags: Flags,
) -> DirectoryProxy
pub fn get_directory( &self, entries: Vec<DirectoryEntry>, flags: Flags, ) -> DirectoryProxy
Creates a fio::DirectoryProxy
with the given root directory structure.
Sourcepub async fn open_service_directory(&self) -> DirectoryProxy
pub async fn open_service_directory(&self) -> DirectoryProxy
Helper function which gets service directory from the harness as a fio::DirectoryProxy
.
Requires that the harness supports service directories, otherwise will panic.
Sourcepub fn supported_file_abilities(&self) -> Abilities
pub fn supported_file_abilities(&self) -> Abilities
Returns the abilities io_test::File
objects should have for the harness.
Sourcepub fn supported_dir_abilities(&self) -> Abilities
pub fn supported_dir_abilities(&self) -> Abilities
Returns the abilities io_test::Directory
objects should have for the harness.
Sourcepub fn supports_mutable_attrs(&self) -> bool
pub fn supports_mutable_attrs(&self) -> bool
Returns true if the harness supports at least one mutable attribute, false otherwise.
NOTE: To allow testing both the io1 SetAttrs and io2 UpdateAttributes methods, harnesses
that support mutable attributes must support fio::NodeAttributesQuery::CREATION_TIME
and fio::NodeAttributesQuery::MODIFICATION_TIME
.
Auto Trait Implementations§
impl Freeze for TestHarness
impl !RefUnwindSafe for TestHarness
impl Send for TestHarness
impl Sync for TestHarness
impl Unpin for TestHarness
impl !UnwindSafe for TestHarness
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
Source§impl<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
Source§impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
§impl<T> IntoAny for T
impl<T> IntoAny for T
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>
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>
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 more