1 package org.apache.archiva.rest.services.v2;
4 * Licensed to the Apache Software Foundation (ASF) under one
5 * or more contributor license agreements. See the NOTICE file
6 * distributed with this work for additional information
7 * regarding copyright ownership. The ASF licenses this file
8 * to you under the Apache License, Version 2.0 (the
9 * "License"); you may not use this file except in compliance
10 * with the License. You may obtain a copy of the License at
12 * http://www.apache.org/licenses/LICENSE-2.0
13 * Unless required by applicable law or agreed to in writing,
14 * software distributed under the License is distributed on an
15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16 * KIND, either express or implied. See the License for the
17 * specific language governing permissions and limitations
21 import io.restassured.response.Response;
22 import org.apache.archiva.components.rest.model.PagedResult;
23 import org.apache.archiva.components.rest.model.PropertyEntry;
24 import org.apache.archiva.rest.api.model.v2.BeanInformation;
25 import org.apache.archiva.rest.api.model.v2.CacheConfiguration;
26 import org.apache.archiva.rest.api.model.v2.LdapConfiguration;
27 import org.junit.jupiter.api.AfterAll;
28 import org.junit.jupiter.api.BeforeAll;
29 import org.junit.jupiter.api.DisplayName;
30 import org.junit.jupiter.api.MethodOrderer;
31 import org.junit.jupiter.api.Tag;
32 import org.junit.jupiter.api.Test;
33 import org.junit.jupiter.api.TestInstance;
34 import org.junit.jupiter.api.TestMethodOrder;
36 import java.util.Arrays;
37 import java.util.HashMap;
38 import java.util.List;
41 import static io.restassured.RestAssured.given;
42 import static io.restassured.http.ContentType.JSON;
43 import static org.junit.jupiter.api.Assertions.*;
46 * @author Martin Stockhammer <martin_s@apache.org>
48 @TestInstance( TestInstance.Lifecycle.PER_CLASS )
50 @TestMethodOrder( MethodOrderer.Random.class )
51 @DisplayName( "Native REST tests for V2 RepositoryGroupService" )
52 public class NativeRepositoryGroupServiceTest extends AbstractNativeRestServices
55 protected String getServicePath( )
57 return "/repository_groups";
61 void setup( ) throws Exception
67 void destroy( ) throws Exception
69 super.shutdownNative( );
73 void testGetConfiguration() {
74 String token = getAdminToken( );
75 Response response = given( ).spec( getRequestSpec( token ) ).contentType( JSON )
79 .then( ).statusCode( 200 ).extract( ).response( );
80 assertNotNull( response );