Add e2e tests
This commit is contained in:
parent
99a355f25d
commit
601fb7dacf
1163 changed files with 289217 additions and 14195 deletions
8
vendor/k8s.io/kubernetes/pkg/volume/plugins_test.go
generated
vendored
8
vendor/k8s.io/kubernetes/pkg/volume/plugins_test.go
generated
vendored
|
|
@ -24,6 +24,8 @@ import (
|
|||
"k8s.io/apimachinery/pkg/types"
|
||||
)
|
||||
|
||||
const testPluginName = "kubernetes.io/testPlugin"
|
||||
|
||||
func TestSpecSourceConverters(t *testing.T) {
|
||||
v := &v1.Volume{
|
||||
Name: "foo",
|
||||
|
|
@ -62,7 +64,7 @@ func (plugin *testPlugins) Init(host VolumeHost) error {
|
|||
}
|
||||
|
||||
func (plugin *testPlugins) GetPluginName() string {
|
||||
return "testPlugin"
|
||||
return testPluginName
|
||||
}
|
||||
|
||||
func (plugin *testPlugins) GetVolumeName(spec *Spec) (string, error) {
|
||||
|
|
@ -106,11 +108,11 @@ func TestVolumePluginMgrFunc(t *testing.T) {
|
|||
var prober DynamicPluginProber = nil // TODO (#51147) inject mock
|
||||
vpm.InitPlugins(newTestPlugin(), prober, nil)
|
||||
|
||||
plug, err := vpm.FindPluginByName("testPlugin")
|
||||
plug, err := vpm.FindPluginByName(testPluginName)
|
||||
if err != nil {
|
||||
t.Errorf("Can't find the plugin by name")
|
||||
}
|
||||
if plug.GetPluginName() != "testPlugin" {
|
||||
if plug.GetPluginName() != testPluginName {
|
||||
t.Errorf("Wrong name: %s", plug.GetPluginName())
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue