IF Commons GitHub

physical/dev

Written to: 1 requirement: 1 proved, 0 partly, 0 failing, 0 with no test recorded. 0006-estate-fleet-store FR-011

The fleet store for development and tests (commons estate 0006-estate-fleet-store): a store in memory or in a folder, with no replicas and no host, opened with the same function and holding the same documents as the store of a fleet, so that everything the estate does with stored data can be done and tried before a host is named.

import { devFleetStore } from "./dev.ts";
const fleet = await devFleetStore({ kind: "memory" }, { actor: "operator" });
fleet.kind; // "ok"

Source: commons/estate/src/physical/dev.ts

1 of 3 exports are imported by a test of the run. A test that imports an export may not call it or check what it returns.

DevPlacetypeno test imports it
type DevPlace = { readonly kind: "memory" } | { readonly kind: "folder"; readonly dir: string };

Where a development store is kept: in memory, or in a folder that is made when it is not there.

DevOptionstypeno test imports it
type DevOptions = Pick<FleetConfig, "actor" | "clock" | "attempts"> & { readonly identity?: string };

What a development store is opened with beyond where it is: who writes, and the clock. The store is made a fleet store where it is not one.

devFleetStorefunction
function devFleetStore(place: DevPlace, options: DevOptions): Promise<Result<FleetStore, FleetProblem>>

A fleet store in memory or in a folder, with no replicas.

Imported by 12 tests of the run (12 passed, 0 failed): the library's results

Titles, headings, exports, tables, columns and requirements. Esc closes.