Imrpoved image handling since the size of the image is about 5MB.
This commit is contained in:
@@ -117,13 +117,40 @@ public class CustomerPictureResourceTest extends AbstractRestTest {
|
||||
assertEquals(401, code);
|
||||
}
|
||||
*/
|
||||
|
||||
@Test
|
||||
@Order(2)
|
||||
public void doTest() throws IOException {
|
||||
LOG.info("doAddCustomerPicture");
|
||||
|
||||
//String authorization = getBasicHeader();
|
||||
//LOG.info("authorization: " + authorization);
|
||||
String path = deploymentURL + PATH;
|
||||
Request request = Request.Options(path).addHeader("Accept", "application/json; charset=utf-8");
|
||||
//.addHeader("Authorization", authorization)
|
||||
//.bodyFile(new File(BASE_UPLOAD + "add.json"), ContentType.APPLICATION_JSON);
|
||||
|
||||
HttpResponse httpResponse = executeRequest(request);
|
||||
|
||||
var headers = httpResponse.getAllHeaders();
|
||||
for (var header : headers) {
|
||||
System.out.println(header.getName() + " " + header.getValue());
|
||||
}
|
||||
|
||||
int code = httpResponse.getStatusLine().getStatusCode();
|
||||
assertEquals(200, code);
|
||||
|
||||
}
|
||||
|
||||
public static void main(String[] args) throws IOException {
|
||||
|
||||
var test = new CustomerPictureResourceTest();
|
||||
|
||||
test.deploymentURL = "http://localhost:8080/";
|
||||
test.deploymentURL = "https://hartmann-cue.heydevelop.de/";
|
||||
test.username = "adm";
|
||||
test.password = "x1t0e7Pb49";
|
||||
|
||||
test.doAddCustomerWithPicture();
|
||||
test.doTest();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user