When building the container image for running tests take the older of
the two current releases from Go upstream. We use the older version
in order to make sure we are testing with something supported but maybe
not everyone is on 1.13 yet.
This also enables the use of go modules to ensure we get the proper
versions of dependencies.
Signed-off-by: John Mulligan <jmulligan@redhat.com>
Run the tests for each sub-package as a separate invocation.
Make the package selectable.
This has a few small advantages:
* When iterating on a single package the other packages do not run
* Better coverage summary line printed after each test
* Slightly better output with verbose test output
Signed-off-by: John Mulligan <jmulligan@redhat.com>
According to the 'go test' help, "The idiomatic way to disable test
caching explicitly is to use -count=1." This removes GOCACHE=off in
favor of using -count=1 as GOCACHE=off breaks other tooling including
the use of go modules.
Signed-off-by: John Mulligan <jmulligan@redhat.com>
Adds cli parsing to the entrypoint script allowing for:
1. Custom path to micro-osd script
This allows easier testing of the script itself or quick
and dirty customization for special one-off tests
2. Selecting tests to run (or "ALL" or "NONE")
This allows the user to run only a subset of the tests as needed.
3. Option to pause indefinitely after tests complete
This keeps the containerized environment alive after tests
have run for debugging or just for creating a quick and dirty
ceph environment for playing around.
Signed-off-by: John Mulligan <jmulligan@redhat.com>
When tests are run generate a coverage report.
To access this coverage report mount any directory to /results in the
container. Coverage output files will be written to /results/coverage
w/in the container.
Later we can do other interesting things with the coverage detected
such as a test pass/fail criteria or submitted to a service such as
coveralls, etc.
Signed-off-by: John Mulligan <jmulligan@redhat.com>