gen

command
v0.0.0-...-cdc4c1e Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2013 License: Apache-2.0 Imports: 12 Imported by: 0

README

what is it

This is an experimental specification and interface based blackbox tests for Go-Redis clients. The generator creates individual test files for each method on a given client type. The test files for each client type are written to an eponymous sub-dir of /test. For example, files for AsyncClient end up in /test/AsyncClient.

The generator has dependency on redis and redis/test packages. redis.Spefication's MethodSpec and friends provide the canonical spec for each method (wip). redis/test/support.go provides some basic helpers used by the generated tests (and in future hand-written tests as well.)

It is a work in progress. (See stat-log below).

generate tests

Generate tests:

go run generate.go

run the tests

Run the tests:

cd <distro-root>/test/<client-type>
go test 

stat-log

SEPT-19-2012
  • QuickTests in the minimal are done and actually catching bugs.
  • (Who ever contributed the Blpop, etc. wrote buggy code - Client (sync) tests hang on these so rm them after gen'ing the suite.
  • Think time on how to formally spec known-state tests for methods e.g. Get("foo") should return value IFF Set("foo", "woof") preceeded it.

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

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