mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-01-05 15:37:24 +00:00
Adding 'flexvolume' prefix to FlexVolume plugin names.
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
"swagger": "2.0",
|
||||
"info": {
|
||||
"title": "Kubernetes",
|
||||
"version": "v1.7.0"
|
||||
"version": "v1.8.0"
|
||||
},
|
||||
"paths": {
|
||||
"/api/": {
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
"swagger": "2.0",
|
||||
"info": {
|
||||
"title": "Generic API Server",
|
||||
"version": "v1.7.0"
|
||||
"version": "v1.8.0"
|
||||
},
|
||||
"paths": {
|
||||
"/api/": {
|
||||
|
||||
@@ -175,11 +175,11 @@ func TestCanSupport(t *testing.T) {
|
||||
plugMgr := volume.VolumePluginMgr{}
|
||||
installPluginUnderTest(t, "kubernetes.io", "fakeAttacher", tmpDir, execScriptTempl1, nil)
|
||||
plugMgr.InitPlugins(ProbeVolumePlugins(tmpDir), volumetest.NewFakeVolumeHost("fake", nil, nil))
|
||||
plugin, err := plugMgr.FindPluginByName("kubernetes.io/fakeAttacher")
|
||||
plugin, err := plugMgr.FindPluginByName("flexvolume-kubernetes.io/fakeAttacher")
|
||||
if err != nil {
|
||||
t.Errorf("Can't find the plugin by name")
|
||||
}
|
||||
if plugin.GetPluginName() != "kubernetes.io/fakeAttacher" {
|
||||
if plugin.GetPluginName() != "flexvolume-kubernetes.io/fakeAttacher" {
|
||||
t.Errorf("Wrong name: %s", plugin.GetPluginName())
|
||||
}
|
||||
if !plugin.CanSupport(&volume.Spec{Volume: &v1.Volume{VolumeSource: v1.VolumeSource{FlexVolume: &v1.FlexVolumeSource{Driver: "kubernetes.io/fakeAttacher"}}}}) {
|
||||
@@ -204,7 +204,7 @@ func TestGetAccessModes(t *testing.T) {
|
||||
installPluginUnderTest(t, "kubernetes.io", "fakeAttacher", tmpDir, execScriptTempl1, nil)
|
||||
plugMgr.InitPlugins(ProbeVolumePlugins(tmpDir), volumetest.NewFakeVolumeHost(tmpDir, nil, nil))
|
||||
|
||||
plugin, err := plugMgr.FindPersistentPluginByName("kubernetes.io/fakeAttacher")
|
||||
plugin, err := plugMgr.FindPersistentPluginByName("flexvolume-kubernetes.io/fakeAttacher")
|
||||
if err != nil {
|
||||
t.Fatalf("Can't find the plugin by name")
|
||||
}
|
||||
|
||||
@@ -62,7 +62,7 @@ func (plugin *flexVolumePlugin) getExecutable() string {
|
||||
|
||||
// Name is part of the volume.VolumePlugin interface.
|
||||
func (plugin *flexVolumePlugin) GetPluginName() string {
|
||||
return plugin.driverName
|
||||
return "flexvolume-" + plugin.driverName
|
||||
}
|
||||
|
||||
// GetVolumeName is part of the volume.VolumePlugin interface.
|
||||
|
||||
Reference in New Issue
Block a user