Update test.sh
This commit is contained in:
parent
839ecd1df6
commit
b34d65f1a5
|
@ -760,17 +760,7 @@ func TestDockerDriver_User(t *testing.T) {
|
||||||
t.Fatalf("Should've failed")
|
t.Fatalf("Should've failed")
|
||||||
}
|
}
|
||||||
|
|
||||||
msgs := []string{
|
if !strings.Contains(err.Error(), "alice") {
|
||||||
"linux spec user",
|
|
||||||
}
|
|
||||||
var found bool
|
|
||||||
for _, msg := range msgs {
|
|
||||||
if strings.Contains(err.Error(), msg) {
|
|
||||||
found = true
|
|
||||||
break
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if !found {
|
|
||||||
t.Fatalf("Expected failure string not found, found %q instead", err.Error())
|
t.Fatalf("Expected failure string not found, found %q instead", err.Error())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,9 +11,8 @@ go build -o $TEMPDIR/nomad || exit 1
|
||||||
# Run the tests
|
# Run the tests
|
||||||
echo "--> Running tests"
|
echo "--> Running tests"
|
||||||
GOBIN="`which go`"
|
GOBIN="`which go`"
|
||||||
$GOBIN test -v -timeout=900s github.com/hashicorp/nomad/client/driver -run "TestDockerDriver*"
|
go list ./... | grep -v '^github.com/hashicorp/nomad/vendor/' | \
|
||||||
#go list ./... | grep -v '^github.com/hashicorp/nomad/vendor/' | \
|
sudo \
|
||||||
# sudo \
|
-E PATH=$TEMPDIR:$PATH \
|
||||||
# -E PATH=$TEMPDIR:$PATH \
|
-E GOPATH=$GOPATH \
|
||||||
# -E GOPATH=$GOPATH \
|
xargs $GOBIN test -v ${GOTEST_FLAGS:--cover -timeout=900s}
|
||||||
# xargs $GOBIN test -v ${GOTEST_FLAGS:--cover -timeout=900s}
|
|
||||||
|
|
Loading…
Reference in a new issue