resultdb/

directory
v0.0.0-...-d3e053c Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 20, 2024 License: Apache-2.0

README

Run Spanner integration tests using Cloud Spanner Emulator

Install Cloud Spanner Emulator

Linux

The Cloud Spanner Emulator is part of the bundled gcloud, to make sure it's installed:

cd infra
gclient runhooks
eval `./go/env.py`
which gcloud # should show bundled gcloud
gcloud components list # should see cloud-spanner-emulator is installed
Mac

If you are a Google employee, follow go/docker-for-mac first.

Run tests

From command line, first set environment variables:

export INTEGRATION_TESTS=1
export SPANNER_EMULATOR=1

Then run go test as usual.

Note: If you run tests on Mac, please start Docker Desktop before running tests.

Running a binary locally

It can be useful to run the ResultDB service locally if you are testing new query functionality:

cd cmd/resultdb
luci-auth login -scopes "https://www.googleapis.com/auth/cloud-platform https://www.googleapis.com/auth/userinfo.email"
go run main.go \
 -cloud-project luci-resultdb-dev \
 -spanner-database projects/chops-spanner-testing/instances/testing/databases/luci-resultdb-staging \
 -auth-service-host chrome-infra-auth-dev.appspot.com \
 -artifact-rbe-instance projects/luci-resultdb-dev/instances/artifacts

Directories

Path Synopsis
cmd
experiments
Package main defines the entrypoint to the experiments service.
Package main defines the entrypoint to the experiments service.
rdb
artifactcontent
Package artifactcontent can serve artifact content via plain HTTP securely.
Package artifactcontent can serve artifact content via plain HTTP securely.
artifacts
Package artifacts contains tools for reading and processing artifacts.
Package artifacts contains tools for reading and processing artifacts.
artifacts/testutil
Package testutil provides utility functions for testing with artifacts package.
Package testutil provides utility functions for testing with artifacts package.
baselines
Package baselines captures baseline objects and basic interactions with them.
Package baselines captures baseline objects and basic interactions with them.
baselines/testvariants
Package baselinetestvariant provides crud operations for baseline test variants.
Package baselinetestvariant provides crud operations for baseline test variants.
checkpoints
Package checkpoints contains methods for maintaining and using process checkpoints to ensure processes run once only.
Package checkpoints contains methods for maintaining and using process checkpoints to ensure processes run once only.
config
Package config validates and gives access to ResultDB LUCI config.
Package config validates and gives access to ResultDB LUCI config.
cron
Package cron can runs functions periodically.
Package cron can runs functions periodically.
ensureviews
Package ensureviews ensures BigQuery views are properly created and maintained.
Package ensureviews ensures BigQuery views are properly created and maintained.
exportroots
Package exportroots contains methods for reading and writing export root records in Spanner.
Package exportroots contains methods for reading and writing export root records in Spanner.
gsutil
Package gsutil contains utility functions for Google Storage.
Package gsutil contains utility functions for Google Storage.
instructionutil
Package instructionutil contains utility functions for instructions.
Package instructionutil contains utility functions for instructions.
invocations/graph
Package graph contains methods to explore reachable invocations.
Package graph contains methods to explore reachable invocations.
rpcquota
Package rpcquota is a wrapper around LUCI quota for ResultDB.
Package rpcquota is a wrapper around LUCI quota for ResultDB.
rpcutil
Package rpcutil contains utility functions for RPC handlers.
Package rpcutil contains utility functions for RPC handlers.
runtestverdicts
Package runtestverdicts provides methods to query test verdicts within a test run (single invocation excluding included invocation).
Package runtestverdicts provides methods to query test verdicts within a test run (single invocation excluding included invocation).
services/artifactexporter
Package artifactexporter handles uploading artifacts to BigQuery.
Package artifactexporter handles uploading artifacts to BigQuery.
services/baselineupdater
Package baselineupdater marks test variants from an invocation as submitted by adding the test variants to the set of tests for its baseline identifier.
Package baselineupdater marks test variants from an invocation as submitted by adding the test variants to the set of tests for its baseline identifier.
services/deadlineenforcer
Package deadlineenforcer finalizes tasks with overdue deadlines.
Package deadlineenforcer finalizes tasks with overdue deadlines.
services/experiments
Package experiments provides a place to experiment within ResultDB while being (mostly) isolated from production services.
Package experiments provides a place to experiment within ResultDB while being (mostly) isolated from production services.
services/exportnotifier
Package exportnotifier is responsible for dispatching "invocation ready for export" notifications, used to trigger low-latency exports from ResultDB.
Package exportnotifier is responsible for dispatching "invocation ready for export" notifications, used to trigger low-latency exports from ResultDB.
services/globalmetrics
Package globalmetrics reports metrics that are computationally heavy.
Package globalmetrics reports metrics that are computationally heavy.
services/purger
Package purger deletes expired test results from Spanner.
Package purger deletes expired test results from Spanner.
services/recorder
Package recorder implements a binary that hosts luci.resultdb.v1.Recorder service.
Package recorder implements a binary that hosts luci.resultdb.v1.Recorder service.
services/resultdb
Package resultdb provides implementation for luci.resultdb.v1.ResultDB service.
Package resultdb provides implementation for luci.resultdb.v1.ResultDB service.
services/testmetadataupdator
Package testmetadataupdator implements a task which ingest test metadata from invocations.
Package testmetadataupdator implements a task which ingest test metadata from invocations.
spanutil
Package span contains utility functions to interact with the underlying Spanner storage.
Package span contains utility functions to interact with the underlying Spanner storage.
tasks
Package tasks contains task class definitions for ResultDB.
Package tasks contains task class definitions for ResultDB.
testmetadata
Package testmetadata implements methods to query from TestMetadata spanner table.
Package testmetadata implements methods to query from TestMetadata spanner table.
testutil
Package testutil provides utility functions for writing unit tests.
Package testutil provides utility functions for writing unit tests.
testutil/insert
Package insert implements functions to insert rows for testing purposes.
Package insert implements functions to insert rows for testing purposes.
tracing
Package tracing contains helper for reporting OpenTelemetry tracing spans.
Package tracing contains helper for reporting OpenTelemetry tracing spans.
Package pbutil implements utility functions for ResultDB protobuf messages.
Package pbutil implements utility functions for ResultDB protobuf messages.
proto
bq
v1
Package resultpb contains public ResultDB proto API.
Package resultpb contains public ResultDB proto API.
Package sink provides a server for aggregating test results and sending them to the ResultDB backend.
Package sink provides a server for aggregating test results and sending them to the ResultDB backend.
Package util contains utility functions.
Package util contains utility functions.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL