Skip to main content

ArangoContainer

Struct ArangoContainer 

Source
pub struct ArangoContainer(/* private fields */);
Expand description

A single-node ArangoDB container.

Implementations§

Source§

impl ArangoContainer

Source

pub fn new() -> Self

Builds a container from the pinned default image (arangodb:3.11), with auth disabled (ARANGO_NO_AUTH=1).

Source

pub fn with_image(image: &str) -> Self

Builds a container from a caller-chosen image, with auth disabled.

Source

pub fn with_root_password(self, password: &str) -> Self

Enables auth with the given root password, instead of the default no-auth setup. ARANGO_NO_AUTH was already set by new/with_image; this call removes it before adding ARANGO_ROOT_PASSWORD.

This removal is required, not cosmetic: the official ArangoDB entrypoint checks ARANGO_NO_AUTH for mere presence (if [ ! -z "$ARANGO_NO_AUTH" ]; then AUTHENTICATION="false"; fi), unconditionally, near the very end of the script, right before it execs arangod --server.authentication=$AUTHENTICATION — this check does not care whether ARANGO_ROOT_PASSWORD is also set. Verified directly against the real arangodb:3.11 entrypoint (docker run --entrypoint /bin/cat arangodb:3.11 /entrypoint.sh): with both vars set, the root password gets initialized (the +x-guarded init block cares only that ARANGO_ROOT_PASSWORD is set), but AUTHENTICATION still ends up "false" because ARANGO_NO_AUTH is still present — auth stays off regardless of the password, so leaving ARANGO_NO_AUTH in the spec made the password a no-op.

Source

pub async fn start(self) -> Result<ArangoGuard>

Boots the container.

Trait Implementations§

Source§

impl Default for ArangoContainer

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

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> 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> 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.