diff --git a/plugins/network-elements/nicira-nvp/test/com/cloud/network/resource/NiciraNvpResourceTest.java b/plugins/network-elements/nicira-nvp/test/com/cloud/network/resource/NiciraNvpResourceTest.java index 9fd2cef5b9c..7632703aecd 100644 --- a/plugins/network-elements/nicira-nvp/test/com/cloud/network/resource/NiciraNvpResourceTest.java +++ b/plugins/network-elements/nicira-nvp/test/com/cloud/network/resource/NiciraNvpResourceTest.java @@ -1,5 +1,22 @@ +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. package com.cloud.network.resource; +import static org.junit.Assert.*; import static org.mockito.Mockito.*; import java.util.Collections; @@ -11,6 +28,7 @@ import javax.naming.ConfigurationException; import org.junit.Before; import org.junit.Test; +import com.cloud.host.Host; import com.cloud.network.nicira.NiciraNvpApi; public class NiciraNvpResourceTest { @@ -44,6 +62,13 @@ public class NiciraNvpResourceTest { verify(_nvpApi).setAdminCredentials("adminuser", "adminpass"); verify(_nvpApi).setControllerAddress("127.0.0.1"); + + assertTrue("nvptestdevice".equals(_resource.getName())); + + /* Pretty lame test, but here to assure this plugin fails + * if the type name ever changes from L2Networking + */ + assertTrue(_resource.getType() == Host.Type.L2Networking); } }