.claude/skills/test-with-spanner/SKILL.md
Run unit tests that require the Spanner emulator. Use this skill when the user wants to run tests in packages like satellite/metabase, satellite/metainfo, or any other tests that interact with Spanner. Automatically handles checking for and configuring the Spanner emulator environment.
npx skillsauth add storj/storj test-with-spannerInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
You are helping run unit tests that require the Spanner emulator.
The Storj test framework automatically manages the Spanner emulator lifecycle using the run: prefix in the STORJ_TEST_SPANNER environment variable.
To run tests automatically spanner_emulator binary needs to be on PATH. Spanner can be also set for tests using -spanner-test-db flag.
If test name is provided in arguments:
If only package path is provided:
Determine the Spanner connection method:
STORJ_TEST_SPANNER is already set in the environment. If it is, do NOT pass -spanner-test-db — the test framework will pick it up automatically.STORJ_TEST_SPANNER is not set, pass -spanner-test-db 'run:spanner_emulator' to auto-manage the emulator.Command format:
# When STORJ_TEST_SPANNER is already set in the environment:
go test -v ./package/path -run TestName
# When STORJ_TEST_SPANNER is NOT set:
go test -v ./package/path -run TestName -spanner-test-db 'run:spanner_emulator'
The run: prefix tells the test framework to:
Some common test paths in the Storj codebase:
./satellite/metabase - Metabase tests./satellite/metainfo - Metainfo API tests./satellite/satellitedb - Database tests# Run a specific test
go test -v ./satellite/metainfo -run TestEndpoint_Object_No_StorageNodes -spanner-test-db 'run:spanner_emulator'
# Run all tests in a package
go test -v ./satellite/metabase -spanner-test-db 'run:spanner_emulator'
# Run tests with timeout
go test -v -timeout 10m ./satellite/metabase -run TestLoop -spanner-test-db 'run:spanner_emulator'
run: prefix is the recommended approach used in Storj's CI/CD (see Jenkinsfile.verify and Jenkinsfile.public)development
Run unit tests that require PostgreSQL. Use this skill when the user wants to run tests with PostgreSQL database backend. Automatically handles checking for and configuring a PostgreSQL Docker container.
development
Interact with Storj Gerrit team code collaboration service, which we just called it gerrit, when the user ask to do it
development
Regenerate DBX code after making changes to .dbx schema files. Runs code generation, shows diff summary, validates compilation, and reports any errors.
testing
Create, edit, improve, or audit AgentSkills. Use when creating a new skill from scratch or when asked to improve, review, audit, tidy up, or clean up an existing skill or SKILL.md file. Also use when editing or restructuring a skill directory (moving files to references/ or scripts/, removing stale content, validating against the AgentSkills spec). Triggers on phrases like "create a skill", "author a skill", "tidy up a skill", "improve this skill", "review the skill", "clean up the skill", "audit the skill".