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

wfscheper / xkcdpwd / 22 / 2
72%
master: 86%

Build:
Build:
LAST BUILD BRANCH: build/actions
DEFAULT BRANCH: master
Ran 07 Apr 2018 01:07AM UTC
Files 4
Run time 0s
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

07 Apr 2018 01:00AM UTC coverage: 30.303%. First build
22.2

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%)

2.0 hits per line

Source Files on job 22.2
  • Tree
  • List 0
  • Changed 0
  • Source Changed 0
  • Coverage Changed 0
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 3
  • Travis Job 22.2
  • d6f9c345 on github
  • Next Job for on feature/refactor-project-layout (#24.1)
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