test: Streamline test suite a little
This change aims to streamline the integrationtest suite and reduce friction when running (parts of) test suites. Changes: - add `test-testname` to makefile to easily run one suite - made skipping tests first class citizen in test.sh (all available testsuites and the reasons they are skipped are now better exposed and discovered) - suppress some output of gotest unless there is an error - no longer build binary for examples and gotest suites - removed .SILENT from makefile as it being applied to only some targets makes it feel weird (I just learned about this option btw, feel free to comment on this change) - move individual tests out of `test.sh` and into `test-misc.sh` - introduced the concept of testsuites to `test.sh`
This commit is contained in:
31
docs/development.md
Normal file
31
docs/development.md
Normal file
@@ -0,0 +1,31 @@
|
||||
# Development
|
||||
This document contains some additional information and help regarding developing `mgmt`. Useful tools, conventions, etc.
|
||||
|
||||
Be sure to read [quick start guide](docs/quick-start-guide.md) first.
|
||||
|
||||
## Testing
|
||||
This project has both unit tests in the form of golang tests and integration tests using shell scripting.
|
||||
|
||||
Native golang tests are preferred over tests written in our shell testing framework. Please see https://golang.org/pkg/testing/ for more information.
|
||||
|
||||
To run all tests:
|
||||
|
||||
```
|
||||
make test
|
||||
```
|
||||
|
||||
There is a library of quick and small integration tests for the language and YAML related things, check out [`test/shell/`](/test/shell). Adding a test is as easy as copying one of the files in [`test/shell/`](/test/shell) and adapting it.
|
||||
|
||||
This test suite won't run by default (unless when on CI server) and needs to be called explictly using:
|
||||
|
||||
```
|
||||
make test-shell
|
||||
```
|
||||
|
||||
Or run an individual shell test using:
|
||||
|
||||
```
|
||||
make test-shell-load0
|
||||
```
|
||||
|
||||
Tip: you can use TAB completion with `make` to quickly get a list of possible individual tests to run.
|
||||
Reference in New Issue
Block a user