Skip to content

Commit

Permalink
feat: Update to Wiremock 3.5.2
Browse files Browse the repository at this point in the history
Adjustments after merge
  • Loading branch information
holomekc committed Apr 1, 2024
1 parent 2c31ae7 commit 455744c
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 43 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@ private ResponseDefinition copyResponseDefinition(
response.getBodyFileName(),
response.getHeaders(),
response.getAdditionalProxyRequestHeaders(),
response.getRemoveProxyRequestHeaders(),
response.getFixedDelayMilliseconds(),
response.getDelayDistribution(),
response.getChunkedDribbleDelay(),
Expand All @@ -145,6 +146,7 @@ private ResponseDefinition copyResponseDefinition(
response.getBodyFileName(),
response.getHeaders(),
response.getAdditionalProxyRequestHeaders(),
response.getRemoveProxyRequestHeaders(),
response.getFixedDelayMilliseconds(),
response.getDelayDistribution(),
response.getChunkedDribbleDelay(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,62 +17,25 @@

import static com.github.tomakehurst.wiremock.common.ParameterUtils.getFirstNonNull;

import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.UUID;
import java.util.stream.Collectors;

import org.apache.commons.lang3.mutable.MutableBoolean;

import com.github.tomakehurst.wiremock.admin.AdminRoutes;
import com.github.tomakehurst.wiremock.admin.LimitAndOffsetPaginator;
import com.github.tomakehurst.wiremock.admin.model.GetGlobalSettingsResult;
import com.github.tomakehurst.wiremock.admin.model.GetScenariosResult;
import com.github.tomakehurst.wiremock.admin.model.GetServeEventsResult;
import com.github.tomakehurst.wiremock.admin.model.ListStubMappingsResult;
import com.github.tomakehurst.wiremock.admin.model.ProxyConfig;
import com.github.tomakehurst.wiremock.admin.model.ServeEventQuery;
import com.github.tomakehurst.wiremock.admin.model.SingleServedStubResult;
import com.github.tomakehurst.wiremock.admin.model.SingleStubMappingResult;
import com.github.tomakehurst.wiremock.admin.model.*;
import com.github.tomakehurst.wiremock.common.BrowserProxySettings;
import com.github.tomakehurst.wiremock.common.FileSource;
import com.github.tomakehurst.wiremock.common.xml.Xml;
import com.github.tomakehurst.wiremock.extension.AdminApiExtension;
import com.github.tomakehurst.wiremock.extension.Extensions;
import com.github.tomakehurst.wiremock.extension.GlobalSettingsListener;
import com.github.tomakehurst.wiremock.extension.MappingsLoaderExtension;
import com.github.tomakehurst.wiremock.extension.PostServeAction;
import com.github.tomakehurst.wiremock.extension.ResponseDefinitionTransformer;
import com.github.tomakehurst.wiremock.extension.ResponseDefinitionTransformerV2;
import com.github.tomakehurst.wiremock.extension.ResponseTransformer;
import com.github.tomakehurst.wiremock.extension.ResponseTransformerV2;
import com.github.tomakehurst.wiremock.extension.ServeEventListener;
import com.github.tomakehurst.wiremock.extension.StubLifecycleListener;
import com.github.tomakehurst.wiremock.extension.*;
import com.github.tomakehurst.wiremock.extension.requestfilter.RequestFilter;
import com.github.tomakehurst.wiremock.extension.requestfilter.RequestFilterV2;
import com.github.tomakehurst.wiremock.global.GlobalSettings;
import com.github.tomakehurst.wiremock.gui.GuiServeEventListener;
import com.github.tomakehurst.wiremock.http.AdminRequestHandler;
import com.github.tomakehurst.wiremock.http.BasicResponseRenderer;
import com.github.tomakehurst.wiremock.http.ProxyResponseRenderer;
import com.github.tomakehurst.wiremock.http.ResponseDefinition;
import com.github.tomakehurst.wiremock.http.StubRequestHandler;
import com.github.tomakehurst.wiremock.http.StubResponseRenderer;
import com.github.tomakehurst.wiremock.http.*;
import com.github.tomakehurst.wiremock.http.client.HttpClient;
import com.github.tomakehurst.wiremock.jetty.websockets.Message;
import com.github.tomakehurst.wiremock.jetty.websockets.WebSocketEndpoint;
import com.github.tomakehurst.wiremock.matching.RequestMatcherExtension;
import com.github.tomakehurst.wiremock.matching.RequestPattern;
import com.github.tomakehurst.wiremock.matching.StringValuePattern;
import com.github.tomakehurst.wiremock.recording.RecordSpec;
import com.github.tomakehurst.wiremock.recording.RecordSpecBuilder;
import com.github.tomakehurst.wiremock.recording.Recorder;
import com.github.tomakehurst.wiremock.recording.RecordingStatusResult;
import com.github.tomakehurst.wiremock.recording.SnapshotRecordResult;
import com.github.tomakehurst.wiremock.recording.*;
import com.github.tomakehurst.wiremock.standalone.MappingsLoader;
import com.github.tomakehurst.wiremock.store.DefaultStores;
import com.github.tomakehurst.wiremock.store.SettingsStore;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
import io.jsonwebtoken.JwtBuilder;
import io.jsonwebtoken.Jwts;
import io.jsonwebtoken.SignatureAlgorithm;
import org.apache.commons.lang3.StringUtils;
import org.bouncycastle.jce.provider.BouncyCastleProvider;

import javax.crypto.spec.SecretKeySpec;
Expand Down Expand Up @@ -66,7 +65,7 @@ private String createJWT(SignatureAlgorithm signatureAlgorithm, final String api

if (signatureAlgorithm != SignatureAlgorithm.NONE) {

if (StringUtils.isBlank(apiKey)) {
if (apiKey == null || apiKey.trim().isEmpty()) {
throw new IllegalStateException("key must not be empty in case algo is defined");
}

Expand Down

0 comments on commit 455744c

Please sign in to comment.