Quickly add the license header before Chip finds out.

This commit is contained in:
Hugo Trippaers 2012-12-02 11:19:32 -08:00
parent 751e74708e
commit 0902f60c61

View File

@ -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);
}
}