/test

Primary LanguageGoApache License 2.0Apache-2.0

turbinelabs/test

This project is no longer maintained by Turbine Labs, which has shut down.

Apache 2.0 GoDoc CircleCI Go Report Card codecov

The test project contains a variety of small helper packages to make writing tests in go a little easier. The test project has no external dependencies beyond the go standard library.

Requirements

  • Go 1.10.3 or later (previous versions may work, but we don't build or test against them)

Install

go get -u github.com/turbinelabs/test/...

Clone/Test

mkdir -p $GOPATH/src/turbinelabs
git clone https://github.com/turbinelabs/test.git > $GOPATH/src/turbinelabs/test
go test github.com/turbinelabs/test/...

Packages

Each package is best described in its respective Godoc:

  • assert: a collection of useful test assertions
  • category: categorization and selective execution of tests
  • check: simple boolean checks, some of which are used by assert
  • http: useful extensions to the net/http/httptest package
  • io: useful io.Reader and io.Writer implementations
  • log: useful log.Logger factories
  • matcher: useful gomock.Matcher implementations
  • server: a command-line configurable test HTTP server
  • stack: produces user friendly stack traces
  • strings: provides string conversions that are useful in tests
  • tempfile: provides wrappers around ioutil.TempFile to easily create temporary files or file names
  • testrunner: a testrunner for go test that generates a junit-style test result XML file

Versioning

Please see Versioning of Turbine Labs Open Source Projects.

Pull Requests

Patches accepted! Please see Contributing to Turbine Labs Open Source Projects.

Code of Conduct

All Turbine Labs open-sourced projects are released with a Contributor Code of Conduct. By participating in our projects you agree to abide by its terms, which will be carefully enforced.