diff --git a/build/updateCoverage.sh b/build/updateCoverage.sh index 73b8203..5c32ed8 100755 --- a/build/updateCoverage.sh +++ b/build/updateCoverage.sh @@ -1,9 +1,8 @@ #!/bin/sh #Called by go generate #Creates the coverage for the README.md file if gopherbadger is installed -cd ../../ -#Grep is used to hide output +cd ../../ which gopherbadger > /dev/null if [ $? -eq 0 ]; then gopherbadger -png=false -md=README.md -tags "test" > /dev/null diff --git a/cmd/gokapi/Main_test.go b/cmd/gokapi/Main_test.go index 111a381..169dbca 100644 --- a/cmd/gokapi/Main_test.go +++ b/cmd/gokapi/Main_test.go @@ -7,7 +7,7 @@ import ( ) func TestParseFlags(t *testing.T) { - os.Args = []string{"gokapi", "-v", "--reset-pw"} + os.Args = []string{"gokapi", "--version", "--reset-pw"} flags := parseFlags() test.IsEqualBool(t, flags.showVersion, true) test.IsEqualBool(t, flags.resetPw, true) diff --git a/pkg/test/TestHelper.go b/pkg/test/TestHelper.go index 7878b53..1b9c99f 100644 --- a/pkg/test/TestHelper.go +++ b/pkg/test/TestHelper.go @@ -111,6 +111,7 @@ func (c *Cookie) toString() string { return c.Name + "=" + c.Value } +// PostBody contains mock key/value post data type PostBody struct { Key string Value string