<groupId>org.onap.dmaap.messagerouter.dmaapclient</groupId>
<artifactId>dmaapClient</artifactId>
<packaging>jar</packaging>
- <version>1.1.7-SNAPSHOT</version>
+ <version>1.1.8-SNAPSHOT</version>
<name>dmaap-messagerouter-dmaapclient</name>
<description>Client library for MR event routing API</description>
<url>https://github.com/att/dmaap-framework</url>
}
}
- public JSONObject getNoAuth(final String path, final String username, final String password,
- final String protocolFlag) throws HttpException, JSONException {
- if (null != username && null != password) {
- WebTarget target=null;
- Response response=null;
- target = DmaapClientUtil.getTarget(path, username, password);
- response = DmaapClientUtil.getResponsewtNoAuth(target);
+ public JSONObject getNoAuth(final String path) throws HttpException, JSONException {
- return getResponseDataInJson(response);
- } else {
- throw new HttpException(
- "Authentication Failed: Username/password/AuthKey/Authdate parameter(s) cannot be null or empty.");
- }
+ WebTarget target = null;
+ Response response = null;
+ target = DmaapClientUtil.getTarget(path);
+ response = DmaapClientUtil.getResponsewtNoAuth(target);
+
+ return getResponseDataInJson(response);
}
public String getAuthResponse(final String path, final String authKey, final String authDate, final String username,
fGroup, fId, props.getProperty("Protocol")), timeoutMs, limit);
try {
- final JSONObject o = getNoAuth(urlPath, username, password, protocolFlag);
+ final JSONObject o = getNoAuth(urlPath);
if (o != null) {
final JSONArray a = o.getJSONArray("result");
if (a != null) {
PowerMockito.when(response.getHeaders()).thenReturn(map);
PowerMockito.when(DmaapClientUtil.getResponsewtNoAuth(DmaapClientUtil.getTarget("/path"))).thenReturn(response);
- mrBaseClient.getNoAuth("/path", "username", "password", "HTTPAUTH");
+ mrBaseClient.getNoAuth("/path");
assertTrue(true);
}
- @Test(expected = HttpException.class)
- public void testGetNoAuth_error() throws JSONException, HttpException {
-
- ResponseBuilder responseBuilder = Response.ok();
- PowerMockito.when(DmaapClientUtil.getResponsewtNoAuth(DmaapClientUtil.getTarget("/path"))).thenReturn(
- responseBuilder.header("transactionid", "transactionid").entity("{\"test\":\"test\"}").build());
- mrBaseClient.getNoAuth("/path", null, null, "HTTPAUTH");
- assertTrue(true);
-
- }
@Test
public void testGetHTTPErrorResponseMessage() {
major=1
minor=1
-patch=7
+patch=8
base_version=${major}.${minor}.${patch}