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