Skip to content

Commit

Permalink
Allow single test suites to be run
Browse files Browse the repository at this point in the history
  • Loading branch information
dtomcej committed Feb 12, 2020
1 parent 36966ac commit 2f4ba2c
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ endif
CGO_ENABLED=0 go test ./integration -integration $(INTEGRATION_TEST_OPTS)

test-integration-nobuild: $(DIST_DIR) kubectl helm k3d
CGO_ENABLED=0 go test ./integration -integration $(INTEGRATION_TEST_OPTS)
CGO_ENABLED=0 go test ./integration -integration $(INTEGRATION_TEST_OPTS) $(TESTFLAGS)

kubectl:
@command -v kubectl >/dev/null 2>&1 || (curl -LO https://storage.googleapis.com/kubernetes-release/release/$(shell curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/linux/amd64/kubectl && chmod +x ./kubectl && sudo mv ./kubectl /usr/local/bin/kubectl)
Expand Down
26 changes: 26 additions & 0 deletions docs/content/building.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Building

Maesh can be built from source by running `make`, which will build a docker image of Maesh.
A binary will also be built as `./dist/maesh`, which can be run via a shell for testing.

## Integration testing options

For development purposes, you can specify which tests to run by using (only works the `test-integration` target):

```bash
# Run every tests in the MyTest suite
TESTFLAGS="-check.f MyTestSuite" make test-integration

# Run the test "MyTest" in the MyTest suite
TESTFLAGS="-check.f MyTestSuite.MyTest" make test-integration

# Run every tests starting with "My", in the MyTest suite
TESTFLAGS="-check.f MyTestSuite.My" make test-integration

# Run every tests ending with "Test", in the MyTest suite
TESTFLAGS="-check.f MyTestSuite.*Test" make test-integration
```

This will allow specific suites to be run.

More: https://labix.org/gocheck

0 comments on commit 2f4ba2c

Please sign in to comment.