Update vendor csi spec and csi-test to 1.0.0-rc2
This commit is contained in:
18
vendor/github.com/kubernetes-csi/csi-test/hack/_apitest/api_test.go
generated
vendored
Normal file
18
vendor/github.com/kubernetes-csi/csi-test/hack/_apitest/api_test.go
generated
vendored
Normal file
@@ -0,0 +1,18 @@
|
||||
package apitest
|
||||
|
||||
import (
|
||||
"os"
|
||||
"testing"
|
||||
|
||||
"github.com/kubernetes-csi/csi-test/pkg/sanity"
|
||||
)
|
||||
|
||||
func TestMyDriver(t *testing.T) {
|
||||
config := &sanity.Config{
|
||||
TargetPath: os.TempDir() + "/csi",
|
||||
StagingPath: os.TempDir() + "/csi",
|
||||
Address: "/tmp/e2e-csi-sanity.sock",
|
||||
}
|
||||
|
||||
sanity.Test(t, config)
|
||||
}
|
42
vendor/github.com/kubernetes-csi/csi-test/hack/_embedded/embedded_test.go
generated
vendored
Normal file
42
vendor/github.com/kubernetes-csi/csi-test/hack/_embedded/embedded_test.go
generated
vendored
Normal file
@@ -0,0 +1,42 @@
|
||||
package embedded
|
||||
|
||||
import (
|
||||
"os"
|
||||
"testing"
|
||||
|
||||
"github.com/kubernetes-csi/csi-test/pkg/sanity"
|
||||
. "github.com/onsi/ginkgo"
|
||||
. "github.com/onsi/gomega"
|
||||
)
|
||||
|
||||
func TestMyDriverGinkgo(t *testing.T) {
|
||||
RegisterFailHandler(Fail)
|
||||
RunSpecs(t, "CSI Sanity Test Suite")
|
||||
}
|
||||
|
||||
// The test suite into which the sanity tests get embedded may already
|
||||
// have before/after suite functions. There can only be one such
|
||||
// function. Here we define empty ones because then Ginkgo
|
||||
// will start complaining at runtime when invoking the embedded case
|
||||
// in hack/e2e.sh if a PR adds back such functions in the sanity test
|
||||
// code.
|
||||
var _ = BeforeSuite(func() {})
|
||||
var _ = AfterSuite(func() {})
|
||||
|
||||
var _ = Describe("MyCSIDriver", func() {
|
||||
Context("Config A", func() {
|
||||
config := &sanity.Config{
|
||||
TargetPath: os.TempDir() + "/csi",
|
||||
StagingPath: os.TempDir() + "/csi",
|
||||
Address: "/tmp/e2e-csi-sanity.sock",
|
||||
}
|
||||
|
||||
BeforeEach(func() {})
|
||||
|
||||
AfterEach(func() {})
|
||||
|
||||
Describe("CSI Driver Test Suite", func() {
|
||||
sanity.GinkgoTest(config)
|
||||
})
|
||||
})
|
||||
})
|
24
vendor/github.com/kubernetes-csi/csi-test/hack/e2e.sh
generated
vendored
24
vendor/github.com/kubernetes-csi/csi-test/hack/e2e.sh
generated
vendored
@@ -35,7 +35,26 @@ runTestWithCreds()
|
||||
fi
|
||||
}
|
||||
|
||||
go build -o bin/mock ./mock || exit 1
|
||||
runTestAPI()
|
||||
{
|
||||
CSI_ENDPOINT=$1 ./bin/mock &
|
||||
local pid=$!
|
||||
|
||||
GOCACHE=off go test -v ./hack/_apitest/api_test.go; ret=$?
|
||||
|
||||
if [ $ret -ne 0 ] ; then
|
||||
exit $ret
|
||||
fi
|
||||
|
||||
GOCACHE=off go test -v ./hack/_embedded/embedded_test.go; ret=$?
|
||||
kill -9 $pid
|
||||
|
||||
if [ $ret -ne 0 ] ; then
|
||||
exit $ret
|
||||
fi
|
||||
}
|
||||
|
||||
make
|
||||
|
||||
cd cmd/csi-sanity
|
||||
make clean install || exit 1
|
||||
@@ -47,4 +66,7 @@ rm -f $UDS
|
||||
runTestWithCreds "${UDS}" "${UDS}"
|
||||
rm -f $UDS
|
||||
|
||||
runTestAPI "${UDS}"
|
||||
rm -f $UDS
|
||||
|
||||
exit 0
|
||||
|
Reference in New Issue
Block a user