Files
seaweedfs/test/s3vectors
Chris Lu 56c081f90e test/s3vectors: data-plane lifecycle integration test (#12242)
* test/s3vectors: data-plane lifecycle integration test

TestVectorDataPlaneLifecycle spawns a real weed-vector against the lance
listener, mirrors the pytest cluster's flags, waits for the gateway to
discover the registered engine, and walks the full lifecycle: create
bucket and index, put/get/list vectors, a filtered query that excludes the
nearer non-matching vector, delete vectors, index, and bucket. The test
skips when no engine binary resolves (VECTOR_BINARY, ./weed-vector, PATH).

* test/s3vectors: fail fast when the engine dies before listening

* test/s3vectors: harden engine launch and tighten lifecycle assertions

* test/s3vectors: wait on the engine's exit once through a broadcast channel
2026-10-30 01:34:02 -07:00
..

S3 Vectors integration tests

Run python3 -m pip install -r requirements.txt, then make test.

The suite starts a master, volume, filer, authenticated S3/Lance gateway, and vector engine on temporary ports. The same 17 API tests run with both Go and Rust volume servers. Coverage includes bucket/index lifecycle, bucket policies, signed policy grants and denies, encryption settings, empty results, ARN validation, metadata, filters, cosine distance, atomic upserts, catalog/vector pagination, index deletion and recreation, segmented listing, authentication, and writer loss.

Server logs and data stay in pytest's temporary directory for diagnosis. Every child process stops on exit. To select a volume server, set VOLUME_SERVER_IMPL=go or rust.

In an enterprise checkout containing rust/sw-vector-distributed, the build and default matrix also include distributed queries with two search workers. Those queries must still succeed after the writer stops. VECTOR_QUERY_MODE=single or distributed selects one query mode.

To use prebuilt binaries, set WEED_BINARY, VECTOR_BINARY, RUST_VOLUME_SERVER_BINARY, and (for distributed queries) VECTOR_WORKER_BINARY, then run ./run_test.sh. PYTHON selects the Python interpreter. The Makefile accepts CARGO_PROFILE=dev for faster local builds.