Skip to Content
Hands-On Software Engineering with Golang
book

Hands-On Software Engineering with Golang

by Achilleas Anagnostopoulos
January 2020
Intermediate to advanced
640 pages
16h 56m
English
Packt Publishing
Content preview from Hands-On Software Engineering with Golang

Running tests that require CockroachDB

To run the link graph tests that use CockroachDB as a backend, you will need to download a recent version of CockroachDB (v19.1.2 or newer) from https://www.cockroachlabs.com/get-cockroachdb.

After downloading and unpacking the CockroachDB archive, you can spin up a CockroachDB instance for your tests by changing to the folder where the archive was extracted and run the following set of commands:

cockroach start --insecure --advertise-addr 127.0.0.1:26257.cockroach sql --insecure -e 'CREATE DATABASE linkgraph;'

The link graph tests for the CockroachDB backend examine the contents of the CDB_DSN environment variable by looking for a valid data source name (DSN) for accessing the CockroachDB instance. ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Hands-On Software Architecture with Golang

Hands-On Software Architecture with Golang

Jyotiswarup Raiturkar

Publisher Resources

ISBN: 9781838554491Supplemental Content