Skip to content

Commit

Permalink
Merge pull request #61 from kiranmeduri/fix-tests
Browse files Browse the repository at this point in the history
Fix unit tests and added Makefile target
  • Loading branch information
nckturner authored Sep 8, 2019
2 parents 9030188 + c077889 commit b466117
Show file tree
Hide file tree
Showing 8 changed files with 412 additions and 12 deletions.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,6 @@ Session.vim
/.make/

/bazel-*
*.pyc
*.pyc
coverage-all.out
coverage.out
14 changes: 14 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -55,3 +55,17 @@ example:
.PHONY: clean
clean:
rm -rf ./_output

.PHONY: mock-gen
mock-gen:
./scripts/mockgen.sh

PACKAGES:=$(shell go list ./... | sed -n '1!p' | grep ${PKG}/pkg/controller)
test:
echo "mode: count" > coverage-all.out
$(foreach pkg,$(PACKAGES), \
go test -p=1 -cover -covermode=count -coverprofile=coverage.out ${pkg}; \
tail -n +2 coverage.out >> coverage-all.out;)

cover: test
go tool cover -html=coverage-all.out
16 changes: 8 additions & 8 deletions pkg/aws/mocks/CloudAPI.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

44 changes: 44 additions & 0 deletions pkg/client/clientset/versioned/mocks/Interface.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit b466117

Please sign in to comment.