mirror of
https://github.com/optim-enterprises-bv/kubernetes.git
synced 2025-11-30 21:33:53 +00:00
Fixed a possible nil pointer dereference caused by variable plug
This commit is contained in:
committed by
Mengjiao Liu
parent
5de1a754c8
commit
c24b87b133
@@ -41,7 +41,7 @@ func TestCanSupport(t *testing.T) {
|
||||
|
||||
plug, err := plugMgr.FindPluginByName(azureDataDiskPluginName)
|
||||
if err != nil {
|
||||
t.Errorf("Can't find the plugin by name")
|
||||
t.Fatal("Can't find the plugin by name")
|
||||
}
|
||||
if plug.GetPluginName() != azureDataDiskPluginName {
|
||||
t.Errorf("Wrong name: %s", plug.GetPluginName())
|
||||
@@ -98,7 +98,7 @@ func TestUnsupportedVolumeHost(t *testing.T) {
|
||||
|
||||
plug, err := plugMgr.FindPluginByName(azureDataDiskPluginName)
|
||||
if err != nil {
|
||||
t.Errorf("Can't find the plugin by name")
|
||||
t.Fatal("Can't find the plugin by name")
|
||||
}
|
||||
|
||||
_, err = plug.ConstructVolumeSpec("", "")
|
||||
|
||||
Reference in New Issue
Block a user