Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for bind mount options and clean up connector tests (#52)
* Fix #46 Support for volumes with 3 parts Signed-off-by: Thibault Guittet <88336850+rh-tguittet@users.noreply.github.com> * Reposition the t.Cleanup() invocations so that they might have a chance of being useful if the test actually fails or crashes. * Remove the various timing Sleep() calls and replace them with loops which wait for the required datum to appear; this addresses at least one of the flakey tests which was failing occasionally in the CI. * Fix a bug in TestCgroupNsByNamespacePath() where we were fetching the same datum twice and checking that it was the same, instead of fetching the corresponding values from the two different containers. * Rework readOutputUntil() to avoid a bug where it might omit from the returned value the last buffer read when an error such as EOF occurs. * Inline checkIfconfig(), since it's used in only one place and it could be reduced to a single line. * Replace a number of uses of assert.NoError() with assert.NoErrorR(). * Change the existing TestSimpleVolume() function into a helper function which is called repeatedly by each of three new tests which use a table to generate the various scenarios. The three tests correspond to three host platform types -- non-Linux, SELinux, and Linux with SELinux disabled -- and the tests mark themselves as "skipped" if they don't match the host platform. Modify the test to create the bind-mounted file on the fly, so that sharing the same file between the containers doesn't lead to conflict; tighten up the pass/fail assertion. --------- Signed-off-by: Thibault Guittet <88336850+rh-tguittet@users.noreply.github.com> Co-authored-by: Thibault Guittet <88336850+rh-tguittet@users.noreply.github.com> Co-authored-by: Thibault Guittet <tguittet@redhat.com>
- Loading branch information