Skip to content

Commit

Permalink
Merge pull request #166 from keploy/release-fix
Browse files Browse the repository at this point in the history
  • Loading branch information
re-Tick committed Feb 22, 2024
2 parents 2f5d2ce + b29a3cd commit e1613b0
Show file tree
Hide file tree
Showing 12 changed files with 4,776 additions and 6,245 deletions.

This file was deleted.

29 changes: 2 additions & 27 deletions api/src/main/java/io/keploy/service/HttpPostMultipart.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,6 @@ public class HttpPostMultipart {
private final OutputStream outputStream;
private final PrintWriter writer;

/**
* This constructor initializes a new HTTP POST request with content type
* is set to multipart/form-data
*
* @param charset
* @throws IOException
*/
public HttpPostMultipart(String charset, HttpURLConnection httpConn) throws IOException {
boundary = UUID.randomUUID().toString();
this.charset = charset;
Expand All @@ -43,12 +36,6 @@ public HttpPostMultipart(String charset, HttpURLConnection httpConn) throws IOEx
writer = new PrintWriter(new OutputStreamWriter(outputStream, charset), true);
}

/**
* Adds a form field to the request
*
* @param name field name
* @param value field value
*/
public void addFormField(String name, String value) {
writer.append("--" + boundary).append(LINE);
writer.append("Content-Disposition: form-data; name=\"" + name + "\"").append(LINE);
Expand All @@ -58,13 +45,7 @@ public void addFormField(String name, String value) {
writer.flush();
}

/**
* Adds a upload file section to the request
*
* @param fieldName
* @param uploadFile
* @throws IOException
*/

public void addFilePart(String fieldName, File uploadFile)
throws IOException {
String fileName = uploadFile.getName();
Expand All @@ -87,13 +68,7 @@ public void addFilePart(String fieldName, File uploadFile)
writer.flush();
}

/**
* Completes the request and receives response from the server.
*
* @return String as response in case the server returned
* status OK, otherwise an exception is thrown.
* @throws IOException
*/

public void finish() throws IOException {
String responseBody = "";
writer.flush();
Expand Down
10 changes: 0 additions & 10 deletions api/src/main/java/io/keploy/service/mock/MockLib.java
Original file line number Diff line number Diff line change
Expand Up @@ -121,16 +121,6 @@ public Kcontext NewContext() {
return kctx;
}

/**
* Checks whether the mock path is available or not.
*
* @param kctx - Kcontext
* @param path - mock path
* @param mode - Kelpoy mode
* @param name - app name
* @param overWrite - determines to overwrite the exiting file or not
* @return - Boolean which determines whether file exists in that path or not
*/
public static boolean StartRecordingMocks(String path, String mode, String name, Boolean overWrite) {
Service.StartMockReq startMockReq = Service.StartMockReq.newBuilder().setMode(mode).setPath(path).setName(name).setOverWrite(overWrite).build();
Service.StartMockResp startMockResp = blockingStub.startMocking(startMockReq);
Expand Down
46 changes: 32 additions & 14 deletions integration/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,16 @@
<version>1.0.0-SNAPSHOT</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.jline</groupId>
<artifactId>jline</artifactId>
<version>3.20.0</version> <!-- Check for the latest version -->
</dependency>
<dependency>
<groupId>me.tongfei</groupId>
<artifactId>progressbar</artifactId>
<version>0.5.5</version>
</dependency>
<dependency>
<groupId>io.keploy</groupId>
<artifactId>common</artifactId>
Expand Down Expand Up @@ -60,11 +70,11 @@
<version>2.1.214</version>
<scope>provided</scope>
</dependency>
<!-- <dependency>-->
<!-- <groupId>org.mockito</groupId>-->
<!-- <artifactId>mockito-all</artifactId>-->
<!-- <version>1.10.19</version>-->
<!-- </dependency>-->
<dependency>
<groupId>org.yaml</groupId>
<artifactId>snakeyaml</artifactId>
<version>1.28</version> <!-- Use the latest version available -->
</dependency>
<dependency>
<groupId>org.mariadb.jdbc</groupId>
<artifactId>mariadb-java-client</artifactId>
Expand All @@ -80,9 +90,8 @@
<dependency>
<groupId>com.squareup.okhttp3</groupId>
<artifactId>okhttp</artifactId>
<!-- <version>4.10.0</version>-->
<!-- <version>4.10.0</version>-->
<version>3.14.9</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
Expand All @@ -103,6 +112,11 @@
<version>1.11.857</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.jacoco</groupId>
<artifactId>org.jacoco.core</artifactId>
<version>0.8.7</version>
</dependency>
<dependency>
<groupId>com.google.maps</groupId>
<artifactId>google-maps-services</artifactId>
Expand All @@ -115,15 +129,19 @@
<version>2.11.0</version>
</dependency>
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
<version>2.8.9</version>
<groupId>io.btrace</groupId>
<artifactId>btrace-client</artifactId>
<version>2.2.3</version>
</dependency>
<dependency>
<groupId>io.btrace</groupId>
<artifactId>btrace-agent</artifactId>
<version>2.2.3</version>
</dependency>
<!-- https://mvnrepository.com/artifact/redis.clients/jedis -->
<dependency>
<groupId>redis.clients</groupId>
<artifactId>jedis</artifactId>
<version>2.9.3</version>
<groupId>io.btrace</groupId>
<artifactId>btrace-boot</artifactId>
<version>2.2.3</version>
</dependency>
</dependencies>

Expand Down
Loading

0 comments on commit e1613b0

Please sign in to comment.