The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.
Rust agent-orchestrationai-agentsai-assistantdesktopllmlocal-firstmcppersonal-aiprivacyrustsecond-braintauri
test(e2e): run tinymcp storage smoke test through e2e-core
Steven Enamakel3316edd60b0b
diff --git a/scripts/e2e-core.sh b/scripts/e2e-core.shindex 7ed7d61a7a..4d94c06b1a 100755--- a/scripts/e2e-core.sh+++ b/scripts/e2e-core.sh@@ -15,22 +15,20 @@# (the storage-mongodb workflow does exactly this). The URL must be loopback:# the run creates a database of its own and writes to it.#-# Extra arguments after the driver name are suites for scripts/test-rust-e2e.sh-# (`--suite <name>`); the default is the headless set below.+# What runs: `tests/tinymcp_storage_smoke_e2e.rs` spawns the real `openhuman-core+# serve` twice on one workspace with OPENHUMAN_STORAGE_URL set, loads the+# registry-pinned TinyMCP cdylib (staged and digest-verified, no network once+# staged), adds a server, restarts and lists it. Extra arguments go to the test+# binary.set -euo pipefailSCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"REPO_ROOT="$(cd "$SCRIPT_DIR/.." && pwd)"+extra_features=""driver="${1:-sqlite}"[ $# -gt 0 ] && shift-# Suites that boot the core headless (JSON-RPC and the CLI) and so honour-# OPENHUMAN_STORAGE_URL. Suites that pin their own storage setup (the-# storage_*_e2e matrix, which opens each driver itself) are run by their own CI-# lanes.-DEFAULT_SUITES=(json_rpc_e2e cli_storage_url_e2e)-scratch="$(mktemp -d "$REPO_ROOT/target/e2e-core.XXXXXX" 2>/dev/null || { mkdir -p "$REPO_ROOT/target" && mktemp -d "$REPO_ROOT/target/e2e-core.XXXXXX"; })"trap 'rm -rf "$scratch"' EXIT@@ -56,10 +54,10 @@ case "$driver" inauthority="${authority%%/*}"export OPENHUMAN_STORAGE_URL="mongodb://${authority}/${db}${query}"# The product build carries the sqlite driver only; add mongodb.- export OPENHUMAN_E2E_EXTRA_FEATURES="storage-mongodb"+ extra_features=",storage-mongodb";;*)- echo "usage: $0 [sqlite|mongodb] [--suite <name> ...]" >&2+ echo "usage: $0 [sqlite|mongodb] [test-binary args]" >&2exit 2;;esac@@ -69,9 +67,18 @@ esacexport OPENHUMAN_KEYRING_MASTER_KEY="${OPENHUMAN_KEYRING_MASTER_KEY:-$(printf '55%.0s' $(seq 1 32))}"echo "[e2e-core] driver=$driver (OPENHUMAN_STORAGE_URL set)"-if [ $# -eq 0 ]; then- args=()- for suite in "${DEFAULT_SUITES[@]}"; do args+=(--suite "$suite"); done- set -- "${args[@]}"-fi-exec bash "$SCRIPT_DIR/test-rust-e2e.sh" "$@"++module_target="$(bash "$SCRIPT_DIR/ci/native-test-module-platform.sh")"+IFS=$'\t' read -r module_ext module_platform <<< "$module_target"+export REPO_ROOT+# shellcheck source=modules/stage-local-modules.sh+source "$SCRIPT_DIR/modules/stage-local-modules.sh"+tinymcp_dir="$(stage_release_module tinymcp "$module_platform" "$module_ext")"+export OPENHUMAN_MODULE_PATH="$tinymcp_dir${OPENHUMAN_MODULE_PATH:+:$OPENHUMAN_MODULE_PATH}"++export RUST_MIN_STACK="${RUST_MIN_STACK:-16777216}"+cd "$REPO_ROOT"+features="$(bash "$SCRIPT_DIR/ci/product-features.sh")$extra_features"+bash "$SCRIPT_DIR/ci-cancel-aware.sh" cargo test -p openhuman-cli \+ --features "$features" --test tinymcp_storage_smoke_e2e -- \+ --ignored --test-threads=1 "$@"diff --git a/scripts/test-rust-e2e.sh b/scripts/test-rust-e2e.shindex 0f88e73e11..86dff53edc 100755--- a/scripts/test-rust-e2e.sh+++ b/scripts/test-rust-e2e.sh@@ -296,6 +296,17 @@ for suite in "${SUITES[@]}"; do--test "$suite" -- --ignored --test-threads=1 ${EXTRA_ARGS[@]+"${EXTRA_ARGS[@]}"}continuefi+ if [ "$suite" = "tinymcp_storage_smoke_e2e" ]; then+ # Released TinyMCP cdylib under the real host and its storage backend+ # (#7737). Ignored in a bare `cargo test` because it needs the staged+ # module; the staging above put it on OPENHUMAN_MODULE_PATH. It spawns+ # openhuman-core twice, so run it serially.+ echo "[rust-e2e] $CARGO_BIN test --manifest-path Cargo.toml --test $suite (--ignored, serial)"+ bash "$SCRIPT_DIR/ci-cancel-aware.sh" "$CARGO_BIN" test \+ --manifest-path Cargo.toml --features "$PRODUCT_FEATURES" \+ --test "$suite" -- --ignored --test-threads=1 ${EXTRA_ARGS[@]+"${EXTRA_ARGS[@]}"}+ continue+ fiif [ "$suite" = "tinydocs_linked_e2e" ]; then# This local-only E2E target is outside the product feature set. Enable# its required linked implementation explicitly instead of failing Cargo'sdiff --git a/tests/tinymcp_storage_smoke_e2e.rs b/tests/tinymcp_storage_smoke_e2e.rsindex b1760f4131..8036576a9b 100644--- a/tests/tinymcp_storage_smoke_e2e.rs+++ b/tests/tinymcp_storage_smoke_e2e.rs@@ -174,7 +174,14 @@ fn a_server_added_through_the_released_module_survives_a_restart_in_the_storage_let workspace = tmp.path().join("workspace");std::fs::create_dir_all(&workspace).unwrap();let storage = tmp.path().join("storage");- let url = format!("sqlite:{}", storage.display());+ // `scripts/e2e-core.sh` points the run at a backend with OPENHUMAN_STORAGE_URL+ // (sqlite or a MongoDB replica set); on its own the test uses a sqlite file.+ let inherited = std::env::var("OPENHUMAN_STORAGE_URL")+ .ok()+ .filter(|url| !url.trim().is_empty());+ let url = inherited+ .clone()+ .unwrap_or_else(|| format!("sqlite:{}", storage.display()));// First process: add a stdio server (disabled, so nothing is dialled) with// an env secret.@@ -236,8 +243,10 @@ fn a_server_added_through_the_released_module_survives_a_restart_in_the_storage_leftovers.is_empty(),"legacy module databases were created: {leftovers:?}");- assert!(- storage.exists(),- "the server record lives in the configured backend"- );+ if inherited.is_none() {+ assert!(+ storage.exists(),+ "the server record lives in the configured backend"+ );+ }}