blob: a24c874b99215f1d97950de3d3857433242c8052 [file] [log] [blame]
Mahesh Poojary Sd7a36922016-04-01 16:11:14 +05301/*
Brian O'Connora09fe5b2017-08-03 21:12:30 -07002 * Copyright 2016-present Open Networking Foundation
Mahesh Poojary Sd7a36922016-04-01 16:11:14 +05303 *
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 Bb977f562016-07-22 13:02:03 +053016package org.onosproject.pcerest;
Mahesh Poojary Sd7a36922016-04-01 16:11:14 +053017
18import org.glassfish.jersey.server.ResourceConfig;
19import org.glassfish.jersey.test.JerseyTest;
Yuta HIGUCHI1d639932017-04-21 14:22:49 -070020import org.glassfish.jersey.test.TestProperties;
Thomas Vachuska67484d92018-07-17 11:51:54 -070021import org.onlab.rest.AuthorizationFilter;
Mahesh Poojary Sd7a36922016-04-01 16:11:14 +053022
23/**
24 * Base class for pce rest api tests. Performs common configuration operations.
25 */
26public class PceResourceTest extends JerseyTest {
27
28 /**
29 * Creates a new web-resource test.
30 */
31 public PceResourceTest() {
32 super(ResourceConfig.forApplicationClass(PceWebApplication.class));
Thomas Vachuska67484d92018-07-17 11:51:54 -070033 AuthorizationFilter.disableForTests();
Yuta HIGUCHI1d639932017-04-21 14:22:49 -070034 set(TestProperties.CONTAINER_PORT, 0);
Mahesh Poojary Sd7a36922016-04-01 16:11:14 +053035 }
36}