mirror of https://github.com/k3s-io/k3s
commit
1847c071cf
|
@ -45,7 +45,7 @@ import (
|
||||||
|
|
||||||
. "github.com/onsi/ginkgo"
|
. "github.com/onsi/ginkgo"
|
||||||
. "github.com/onsi/gomega"
|
. "github.com/onsi/gomega"
|
||||||
"k8s.io/api/core/v1"
|
v1 "k8s.io/api/core/v1"
|
||||||
rbacv1beta1 "k8s.io/api/rbac/v1beta1"
|
rbacv1beta1 "k8s.io/api/rbac/v1beta1"
|
||||||
storagev1 "k8s.io/api/storage/v1"
|
storagev1 "k8s.io/api/storage/v1"
|
||||||
"k8s.io/apimachinery/pkg/api/errors"
|
"k8s.io/apimachinery/pkg/api/errors"
|
||||||
|
@ -1651,6 +1651,17 @@ func (l *localDriver) GetDriverInfo() *testsuites.DriverInfo {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (l *localDriver) SkipUnsupportedTest(pattern testpatterns.TestPattern) {
|
func (l *localDriver) SkipUnsupportedTest(pattern testpatterns.TestPattern) {
|
||||||
|
}
|
||||||
|
|
||||||
|
func (l *localDriver) PrepareTest(f *framework.Framework) (*testsuites.PerTestConfig, func()) {
|
||||||
|
// choose a randome node to test against
|
||||||
|
nodes := framework.GetReadySchedulableNodesOrDie(f.ClientSet)
|
||||||
|
l.node = &nodes.Items[rand.Intn(len(nodes.Items))]
|
||||||
|
|
||||||
|
l.hostExec = utils.NewHostExec(f)
|
||||||
|
l.ltrMgr = utils.NewLocalResourceManager("local-driver", l.hostExec, "/tmp")
|
||||||
|
|
||||||
|
// This can't be done in SkipUnsupportedTest because the test framework is not initialized yet
|
||||||
if l.volumeType == utils.LocalVolumeGCELocalSSD {
|
if l.volumeType == utils.LocalVolumeGCELocalSSD {
|
||||||
ssdInterface := "scsi"
|
ssdInterface := "scsi"
|
||||||
filesystemType := "fs"
|
filesystemType := "fs"
|
||||||
|
@ -1663,15 +1674,6 @@ func (l *localDriver) SkipUnsupportedTest(pattern testpatterns.TestPattern) {
|
||||||
framework.Skipf("Requires at least 1 %s %s localSSD ", ssdInterface, filesystemType)
|
framework.Skipf("Requires at least 1 %s %s localSSD ", ssdInterface, filesystemType)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
func (l *localDriver) PrepareTest(f *framework.Framework) (*testsuites.PerTestConfig, func()) {
|
|
||||||
// choose a randome node to test against
|
|
||||||
nodes := framework.GetReadySchedulableNodesOrDie(f.ClientSet)
|
|
||||||
l.node = &nodes.Items[rand.Intn(len(nodes.Items))]
|
|
||||||
|
|
||||||
l.hostExec = utils.NewHostExec(f)
|
|
||||||
l.ltrMgr = utils.NewLocalResourceManager("local-driver", l.hostExec, "/tmp")
|
|
||||||
|
|
||||||
return &testsuites.PerTestConfig{
|
return &testsuites.PerTestConfig{
|
||||||
Driver: l,
|
Driver: l,
|
||||||
|
|
Loading…
Reference in New Issue