Use newer default values for mounts CLI
In the API: `Writable` changed to `ReadOnly` `Populate` changed to `NoCopy` Corresponding CLI options updated to: `volume-writable` changed to `volume-readonly` `volume-populate` changed to `volume-nocopy` Signed-off-by: Brian Goff <cpuguy83@gmail.com>
This commit is contained in:
parent
9344f05303
commit
dfe4019f03
1 changed files with 13 additions and 5 deletions
|
@ -2,6 +2,9 @@
|
|||
package assert
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"path/filepath"
|
||||
"runtime"
|
||||
"strings"
|
||||
)
|
||||
|
||||
|
@ -15,7 +18,7 @@ type TestingT interface {
|
|||
// they are not equal.
|
||||
func Equal(t TestingT, actual, expected interface{}) {
|
||||
if expected != actual {
|
||||
t.Fatalf("Expected '%v' (%T) got '%v' (%T)", expected, expected, actual, actual)
|
||||
fatal(t, fmt.Sprintf("Expected '%v' (%T) got '%v' (%T)", expected, expected, actual, actual))
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -37,7 +40,7 @@ func EqualStringSlice(t TestingT, actual, expected []string) {
|
|||
// NilError asserts that the error is nil, otherwise it fails the test.
|
||||
func NilError(t TestingT, err error) {
|
||||
if err != nil {
|
||||
t.Fatalf("Expected no error, got: %s", err.Error())
|
||||
fatal(t, fmt.Sprintf("Expected no error, got: %s", err.Error()))
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -45,11 +48,11 @@ func NilError(t TestingT, err error) {
|
|||
// otherwise it fails the test.
|
||||
func Error(t TestingT, err error, contains string) {
|
||||
if err == nil {
|
||||
t.Fatalf("Expected an error, but error was nil")
|
||||
fatal(t, "Expected an error, but error was nil")
|
||||
}
|
||||
|
||||
if !strings.Contains(err.Error(), contains) {
|
||||
t.Fatalf("Expected error to contain '%s', got '%s'", contains, err.Error())
|
||||
fatal(t, fmt.Sprintf("Expected error to contain '%s', got '%s'", contains, err.Error()))
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -57,6 +60,11 @@ func Error(t TestingT, err error, contains string) {
|
|||
// test.
|
||||
func Contains(t TestingT, actual, contains string) {
|
||||
if !strings.Contains(actual, contains) {
|
||||
t.Fatalf("Expected '%s' to contain '%s'", actual, contains)
|
||||
fatal(t, fmt.Sprintf("Expected '%s' to contain '%s'", actual, contains))
|
||||
}
|
||||
}
|
||||
|
||||
func fatal(t TestingT, msg string) {
|
||||
_, file, line, _ := runtime.Caller(2)
|
||||
t.Fatalf("%s:%d: %s", filepath.Base(file), line, msg)
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue