Skip to content

Commit

Permalink
chore: Add target in Makefile to run unit and integration tests (#135)
Browse files Browse the repository at this point in the history
  • Loading branch information
krisctl committed Aug 28, 2020
1 parent 9b3c9e4 commit b2ed495
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
10 changes: 9 additions & 1 deletion HACKING.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,17 @@ $ ./bin/starboard help
## Testing

We generally require tests to be added for all but the most trivial of changes. You can run the tests using the
command below:
commands below:

```
# To run only unit tests
$ make unit-tests
# To run only integration tests
# Please note that integration tests assumes that you have a working kubernetes cluster (e.g KIND cluster) and KUBECONFIG env variable is pointing to that cluster
$ make integration-tests
# To run both unit-tests and integration-tests
$ make test
```

Expand Down
4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ compile-templates: get-qtc
$(BINARY): $(SOURCES)
CGO_ENABLED=0 go build -o ./bin/$(BINARY) ./cmd/starboard/main.go

.PHONY: test
## test will run both unit tests and integration tests
test: unit-tests integration-tests

.PHONY: unit-tests
## unit-tests Runs unit tests with codecov enabled.
unit-tests: $(SOURCES)
Expand Down

0 comments on commit b2ed495

Please sign in to comment.