Mahesh Poojary S | d7a3692 | 2016-04-01 16:11:14 +0530 | [diff] [blame] | 1 | /* |
Brian O'Connor | a09fe5b | 2017-08-03 21:12:30 -0700 | [diff] [blame] | 2 | * Copyright 2016-present Open Networking Foundation |
Mahesh Poojary S | d7a3692 | 2016-04-01 16:11:14 +0530 | [diff] [blame] | 3 | * |
| 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | * you may not use this file except in compliance with the License. |
| 6 | * You may obtain a copy of the License at |
| 7 | * |
| 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | * |
| 10 | * Unless required by applicable law or agreed to in writing, software |
| 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | * See the License for the specific language governing permissions and |
| 14 | * limitations under the License. |
| 15 | */ |
Priyanka B | b977f56 | 2016-07-22 13:02:03 +0530 | [diff] [blame] | 16 | package org.onosproject.pcerest; |
Mahesh Poojary S | d7a3692 | 2016-04-01 16:11:14 +0530 | [diff] [blame] | 17 | |
| 18 | import org.glassfish.jersey.server.ResourceConfig; |
| 19 | import org.glassfish.jersey.test.JerseyTest; |
Yuta HIGUCHI | 1d63993 | 2017-04-21 14:22:49 -0700 | [diff] [blame] | 20 | import org.glassfish.jersey.test.TestProperties; |
Thomas Vachuska | 67484d9 | 2018-07-17 11:51:54 -0700 | [diff] [blame] | 21 | import org.onlab.rest.AuthorizationFilter; |
Mahesh Poojary S | d7a3692 | 2016-04-01 16:11:14 +0530 | [diff] [blame] | 22 | |
| 23 | /** |
| 24 | * Base class for pce rest api tests. Performs common configuration operations. |
| 25 | */ |
| 26 | public class PceResourceTest extends JerseyTest { |
| 27 | |
| 28 | /** |
| 29 | * Creates a new web-resource test. |
| 30 | */ |
| 31 | public PceResourceTest() { |
| 32 | super(ResourceConfig.forApplicationClass(PceWebApplication.class)); |
Thomas Vachuska | 67484d9 | 2018-07-17 11:51:54 -0700 | [diff] [blame] | 33 | AuthorizationFilter.disableForTests(); |
Yuta HIGUCHI | 1d63993 | 2017-04-21 14:22:49 -0700 | [diff] [blame] | 34 | set(TestProperties.CONTAINER_PORT, 0); |
Mahesh Poojary S | d7a3692 | 2016-04-01 16:11:14 +0530 | [diff] [blame] | 35 | } |
| 36 | } |