• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

wfscheper / xkcdpwd / 24
72%
master: 86%

Build:
Build:
LAST BUILD BRANCH: build/actions
DEFAULT BRANCH: master
Ran 07 Apr 2018 01:07AM UTC
Jobs 2
Files 4
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

pending completion
24

push

travis-ci

wfscheper
tRestructure project layout and add test framework

We need a way to run command-line functional tests. This adds a basic
framework based on the golden files pattern used by the dep tool. In
order for this to work, we also move command line code into
a subdirectory and pull the dictionary portion out to a top-level
xkcdpwd package. Drop cobra in favor of go flags command-line ala the
dep project, because cobra's model doesn't let us test the command-line
both in-line and as a subprocess in parallel. We want to do this so we
can get coverage metrics and functionally test the binary.

The integration tests use a testdata directory in cmd/xkcdcmd. The test
harness recursively walks that directory looking for testscase.json
files. The test name is the path from testdata to the testcase.json
file.

The json file describes how to run the tests, and if the last test
command is expected to generate an error. Optionally, a file stdout.txt
records the expected output of the commmand.

Given that xkcdpwd generates random passphrases, in order for static
files to properly express the expected output, we use a test build tag
to bake in an english dictionary of only one word.

80 of 264 relevant lines covered (30.3%)

4.0 hits per line

Jobs
ID Job ID Ran Files Coverage
1 24.1 07 Apr 2018 01:07AM UTC 0
30.3
Travis Job 24.1
2 24.2 07 Apr 2018 01:08AM UTC 0
30.3
Travis Job 24.2
Source Files on build 24
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #24
  • 114f230c on github
  • Prev Build on feature/refactor-project-layout (#22)
  • Next Build on feature/refactor-project-layout (#26)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc