Skip to content

Runs "go test" on each of the known downstream consumers of a Golang package

License

Notifications You must be signed in to change notification settings

jmcvetta/downtest

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

43 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

downtest

Run tests for the known downstream consumers of a Go package.

Given the import path of a Go package, downtest queries GoDoc.org for the list of all other packages known to import that package. Each of these downstream consumer packages is tested by running go get then go test.

When the tests are complete a summary of results is printed. Optionally, the summary can be output as JSON. If all tests passed, downtest quits with exit code 0; if there were any failures, it quits with exit code 1.

Status

Build Status Build Status Coverage Status

Works okay. Needs more/better tests. Please feel free to submit new tests and/or features via pull request!

Usage

$ go get github.com/jmcvetta/downtest/downtest

$ downtest github.com/jmcvetta/napping
Running tests...
    github.com/GitbookIO/go-gitbook-api/client                               FAIL
    github.com/Mischanix/jukebox-back                                        pass
    github.com/anupcshan/neoism                                              pass
    github.com/jmcvetta/napping/examples/github_auth_token                   pass
    github.com/jmcvetta/napping/examples/httpbin                             pass
    github.com/jmcvetta/neoism                                               pass
    github.com/jmcvetta/rapportive                                           pass
    github.com/jmcvetta/stormpath                                            FAIL
    github.com/mostafah/mandrill                                             pass
    github.com/pierot/mandrill                                               pass
    github.com/piethis/cli/pie                                               pass
    github.com/srom/neoism                                                   FAIL
    github.com/wmluke/translate                                              FAIL
    github.com/yookoala/restit                                               pass

Passed 10 / 14 downstream tests.

downtest knows nothing about the test requirements of downstream packages. In the example above some tests are failing because they require an environment variable to be set. You may need to setup the environment, databases, etc before running downtest. Use flag -v to see the output of the tests as they run.

Tests are run in the context of the current $GOPATH.

Documentation

Automatically generated API documentation for package downtest can be found at GoDoc or Go Walker.

Options for the command line tool can be listed with the standard help flag:

$ downtest -h
Usage of downtest:
downtest [options] import_path
  (where import_path is the full import path of a Go package)
  -j=false: JSON output
  -u=true: Update packages with "go get -u"
  -v=false: Verbose

License

This is Free Software, released under the terms of the GPL v3.

About

Runs "go test" on each of the known downstream consumers of a Golang package

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages