Make sparky deploy info match aai-common
[aai/sparky-be.git] / sparkybe-onap-service / src / test / java / org / onap / aai / sparky / dal / ElasticSearchAdapterTest.java
1 package org.onap.aai.sparky.dal;
2
3 import static org.junit.Assert.assertNotNull;
4
5 import javax.ws.rs.core.MediaType;
6
7 import org.junit.Before;
8 import org.junit.Test;
9 import org.junit.Ignore;
10 import org.onap.aai.restclient.enums.RestAuthenticationMode;
11 import org.onap.aai.sparky.dal.rest.config.RestEndpointConfig;
12 import org.onap.aai.sparky.dal.ElasticSearchAdapter;
13
14 @Ignore
15 public class ElasticSearchAdapterTest {
16         
17
18         private ElasticSearchAdapter elasticSearchAdapter;
19         private RestEndpointConfig  endpointConfig; 
20         
21         @Before
22           public void init() throws Exception {
23                 
24                 endpointConfig = new RestEndpointConfig(); 
25                 endpointConfig.setRestAuthenticationMode(RestAuthenticationMode.SSL_BASIC);
26                 elasticSearchAdapter = new ElasticSearchAdapter(endpointConfig);
27           }
28         
29         
30         @Test 
31         public void updateValues() {
32                 
33                 assertNotNull(elasticSearchAdapter.doPost("https://10.247.40.25:8000","{maxResults:10, queryStr: f}",MediaType.APPLICATION_JSON_TYPE));
34                 assertNotNull(elasticSearchAdapter.doGet("https://10.247.40.25:8000",MediaType.APPLICATION_JSON_TYPE));
35                 assertNotNull(elasticSearchAdapter.doHead("https://10.247.40.25:8000",MediaType.APPLICATION_JSON_TYPE));
36                 assertNotNull(elasticSearchAdapter.doPut("https://10.247.40.25:8000","{maxResults:10, queryStr: f}",MediaType.APPLICATION_JSON_TYPE));
37                 assertNotNull(elasticSearchAdapter.doPatch("https://10.247.40.25:8000","{maxResults:10, queryStr: f}",MediaType.APPLICATION_JSON_TYPE));
38                 assertNotNull(elasticSearchAdapter.doDelete("https://10.247.40.25:8000",MediaType.APPLICATION_JSON_TYPE));
39                 assertNotNull(elasticSearchAdapter.doBulkOperation("https://10.247.40.25:8000","{maxResults:10, queryStr: f}"));
40                 assertNotNull(elasticSearchAdapter.buildBulkImportOperationRequest("","","","",""));
41                 assertNotNull(elasticSearchAdapter.retrieveEntityById("","","","",""));
42                 assertNotNull(elasticSearchAdapter.buildElasticSearchUrlForApi("",""));
43                 assertNotNull(elasticSearchAdapter.buildElasticSearchUrl("",""));
44                 assertNotNull(elasticSearchAdapter.buildElasticSearchGetDocUrl("","",""));
45                 assertNotNull(elasticSearchAdapter.buildElasticSearchGetDocUrl("",""));
46                 assertNotNull(elasticSearchAdapter.buildElasticSearchPostUrl(""));
47                 assertNotNull(elasticSearchAdapter.getBulkUrl());
48
49         }
50
51
52 }