diff options
author | Bin Yang <bin.yang@windriver.com> | 2019-08-05 07:19:37 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2019-08-05 07:19:37 +0000 |
commit | 7c4eb36248331166a6fc3e57fb304a8113edc175 (patch) | |
tree | 9f9354cd49d0103c89cd9791c387a43ec8eb7f14 /src/k8splugin/plugins/network/plugin_test.go | |
parent | 4798f0f660de48e43e79626685e8b28bac7f2615 (diff) | |
parent | 1b282801d6a7a0e9104984895911b828da402623 (diff) |
Merge changes I46d47e64,I14d8eb6b
* changes:
Add test case for loading vFW Helm chart
Correct cni retrieval process from resource name
Diffstat (limited to 'src/k8splugin/plugins/network/plugin_test.go')
-rw-r--r-- | src/k8splugin/plugins/network/plugin_test.go | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/src/k8splugin/plugins/network/plugin_test.go b/src/k8splugin/plugins/network/plugin_test.go index 586bccb8..33cae1c7 100644 --- a/src/k8splugin/plugins/network/plugin_test.go +++ b/src/k8splugin/plugins/network/plugin_test.go @@ -130,18 +130,23 @@ func TestDeleteNetwork(t *testing.T) { }{ { label: "Fail to load non-existing plugin", - input: "test", - expectedError: "No plugin for resource", + input: "non-existing-cni_test", + expectedError: "No plugin for resource non-existing-cni", }, { - label: "Fail to delete a network", + label: "Fail to extract cni from network name", input: "1_ovn4nfvk8s_test", + expectedError: "Error extracting CNI type from resource: Couldn't split resource '1_ovn4nfvk8s_test' into CNI type and Network name", + }, + { + label: "Fail to delete a network", + input: "ovn4nfvk8s_test", mockError: "Internal error", expectedError: "Error during the deletion for ovn4nfvk8s plugin: Internal error", }, { label: "Successfully delete a ovn4nfv network", - input: "1_ovn4nfvk8s_test", + input: "ovn4nfvk8s_test", }, } |