routing_test_helpers::storage

Struct CommonStorageTest

Source
pub struct CommonStorageTest<T: RoutingTestModelBuilder> { /* private fields */ }

Implementations§

Source§

impl<T: RoutingTestModelBuilder> CommonStorageTest<T>

Source

pub fn new() -> Self

Source

pub async fn test_storage_dir_from_cm_namespace(&self)

component manager’s namespace | a | b

a: has storage decl with name “mystorage” with a source of realm at path /data a: offers cache storage to b from “mystorage” b: uses cache storage as /storage.

Source

pub async fn test_storage_and_dir_from_parent(&self)

a
b

a: has storage decl with name “mystorage” with a source of self at path /data a: offers cache storage to b from “mystorage” b: uses cache storage as /storage

Source

pub async fn test_storage_and_dir_from_parent_with_subdir(&self)

a
b

a: has storage decl with name “mystorage” with a source of self at path /data, with subdir “cache” a: offers cache storage to b from “mystorage” b: uses cache storage as /storage

Source

pub async fn test_storage_and_dir_from_parent_rights_invalid(&self)

a
b

a: has storage decl with name “mystorage” with a source of self at path /data, but /data has only read rights a: offers cache storage to b from “mystorage” b: uses cache storage as /storage

Source

pub async fn test_storage_from_parent_dir_from_grandparent(&self)

a
b
c

a: offers directory /data to b as /minfs b: has storage decl with name “mystorage” with a source of realm at path /minfs b: offers data storage to c from “mystorage” c: uses data storage as /storage

Source

pub async fn test_storage_from_parent_dir_from_grandparent_with_subdirs(&self)

a
b
c

a: offers directory /data to b as /minfs with subdir “subdir_1” b: has storage decl with name “mystorage” with a source of realm at path /minfs with subdir “subdir_2” b: offers data storage to c from “mystorage” c: uses data storage as /storage

Source

pub async fn test_storage_from_parent_dir_from_grandparent_with_subdir(&self)

a
b
c

a: offers directory /data to b as /minfs b: has storage decl with name “mystorage” with a source of realm at path /minfs, subdir “bar” b: offers data storage to c from “mystorage” c: uses data storage as /storage

Source

pub async fn test_storage_and_dir_from_grandparent(&self)

a
b
c

a: has storage decl with name “mystorage” with a source of self at path /data a: offers data storage to b from “mystorage” b: offers data storage to c from realm c: uses data storage as /storage

Source

pub async fn test_storage_from_parent_dir_from_sibling(&self)

a /
b c

b: exposes directory /data as /minfs a: has storage decl with name “mystorage” with a source of child b at path /minfs a: offers cache storage to c from “mystorage” c: uses cache storage as /storage

Source

pub async fn test_storage_from_parent_dir_from_sibling_with_subdir(&self)

a /
b c

b: exposes directory /data as /minfs with subdir “subdir_1” a: has storage decl with name “mystorage” with a source of child b at path /minfs and subdir “subdir_2” a: offers cache storage to c from “mystorage” c: uses cache storage as /storage

Source

pub async fn test_storage_multiple_types(&self)

a /
b c
d

b: exposes directory /data as /minfs a: has storage decl with name “mystorage” with a source of child b at path /minfs a: offers data, cache, and meta storage to c from “mystorage” c: uses cache and meta storage as /storage c: offers data and meta storage to d d: uses data and meta storage

Source

pub async fn test_use_the_wrong_type_of_storage(&self)

a
b

a: has storage decl with name “mystorage” with a source of self at path /storage a: offers cache storage to b from “mystorage” b: uses data storage as /storage, fails to since data != cache b: uses meta storage, fails to since meta != cache

Source

pub async fn test_directories_are_not_storage(&self)

a
b

a: offers directory from self at path “/data” b: uses data storage as /storage, fails to since data storage != “/data” directories

Source

pub async fn test_use_storage_when_not_offered(&self)

a
b

a: has storage decl with name “mystorage” with a source of self at path /data a: does not offer any storage to b b: uses meta storage and data storage as /storage, fails to since it was not offered either

Source

pub async fn test_dir_offered_from_nonexecutable(&self)

a
b
c

a: offers directory /data to b as /minfs, but a is non-executable b: has storage decl with name “mystorage” with a source of realm at path /minfs b: offers data and meta storage to b from “mystorage” c: uses meta and data storage as /storage, fails to since a is non-executable

Source

pub async fn test_storage_dir_from_cm_namespace_prevented_by_policy(&self)

component manager’s namespace | a | b

a: has storage decl with name “mystorage” with a source of parent at path /data a: offers cache storage to b from “mystorage” b: uses cache storage as /storage. Policy prevents b from using storage.

Source

pub async fn test_instance_id_from_index(&self)

component manager’s namespace | a | b | c

Instance IDs defined only for b in the component ID index. Check that the correct storage layout is used when a component has an instance ID.

Auto Trait Implementations§

§

impl<T> Freeze for CommonStorageTest<T>

§

impl<T> RefUnwindSafe for CommonStorageTest<T>
where T: RefUnwindSafe,

§

impl<T> Send for CommonStorageTest<T>
where T: Send,

§

impl<T> Sync for CommonStorageTest<T>
where T: Sync,

§

impl<T> Unpin for CommonStorageTest<T>
where T: Unpin,

§

impl<T> UnwindSafe for CommonStorageTest<T>
where T: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T, D> Encode<Ambiguous1, D> for T
where D: ResourceDialect,

Source§

unsafe fn encode( self, _encoder: &mut Encoder<'_, D>, _offset: usize, _depth: Depth, ) -> Result<(), Error>

Encodes the object into the encoder’s buffers. Any handles stored in the object are swapped for Handle::INVALID. Read more
Source§

impl<T, D> Encode<Ambiguous2, D> for T
where D: ResourceDialect,

Source§

unsafe fn encode( self, _encoder: &mut Encoder<'_, D>, _offset: usize, _depth: Depth, ) -> Result<(), Error>

Encodes the object into the encoder’s buffers. Any handles stored in the object are swapped for Handle::INVALID. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoAny for T
where T: 'static + Send + Sync,

Source§

fn into_any(self: Arc<T>) -> Arc<dyn Any + Send + Sync>

Cast the given object into a dyn std::any::Any.
§

impl<T> Pointable for T

§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V