Skip to content

Commit

Permalink
Change logging of MockServer
Browse files Browse the repository at this point in the history
  • Loading branch information
StefanBratanov committed Jan 23, 2024
1 parent 446d95f commit 301dfaa
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@
import org.junit.jupiter.api.AfterAll;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.BeforeAll;
import org.mockserver.configuration.Configuration;
import org.mockserver.integration.ClientAndServer;
import org.slf4j.event.Level;

public class OpenAIIntegrationTestBase {

Expand All @@ -27,7 +29,8 @@ public class OpenAIIntegrationTestBase {
public static void setUp() {
String apiKey = System.getenv("OPENAI_API_KEY");
openAI = OpenAI.newBuilder(apiKey).build();
mockServer = ClientAndServer.startClientAndServer();
mockServer =
ClientAndServer.startClientAndServer(Configuration.configuration().logLevel(Level.WARN));
mockServer.upsert(openAPIExpectation(OPEN_AI_SPECIFICATION_URL));
openAIWithMockServer =
OpenAI.newBuilder(apiKey).baseUrl("http://localhost:" + mockServer.getPort()).build();
Expand Down

0 comments on commit 301dfaa

Please sign in to comment.