From d136418be20ed13842612ba72d851fb4d6ecc63f Mon Sep 17 00:00:00 2001 From: serhiinahornyi Date: Tue, 2 Jan 2024 15:30:32 +0200 Subject: [PATCH] Axis: Updated url --- .../java/org/prebid/server/bidder/axis/AxisBidder.java | 10 +--------- src/main/resources/bidder-config/axis.yaml | 2 +- .../org/prebid/server/bidder/axis/AxisBidderTest.java | 4 ++-- src/test/java/org/prebid/server/it/AxisTest.java | 4 +--- .../org/prebid/server/it/test-application.properties | 2 +- 5 files changed, 6 insertions(+), 16 deletions(-) diff --git a/src/main/java/org/prebid/server/bidder/axis/AxisBidder.java b/src/main/java/org/prebid/server/bidder/axis/AxisBidder.java index 7c892a7c134..f038aec67fe 100644 --- a/src/main/java/org/prebid/server/bidder/axis/AxisBidder.java +++ b/src/main/java/org/prebid/server/bidder/axis/AxisBidder.java @@ -33,8 +33,6 @@ public class AxisBidder implements Bidder { private static final TypeReference> ADMAN_EXT_TYPE_REFERENCE = new TypeReference<>() { }; - private static final String ACCOUNT_ID_MACRO = "{{AccountID}}"; - private static final String SOURCE_ID_MACRO = "{{SourceId}}"; private final String endpointUrl; private final JacksonMapper mapper; @@ -74,13 +72,7 @@ private HttpRequest makeRequest(BidRequest bidRequest, Imp imp, ExtI .imp(Collections.singletonList(imp)) .build(); - return BidderUtil.defaultRequest(modifyBidRequest, resolveUrl(extImpAxis), mapper); - } - - private String resolveUrl(ExtImpAxis extImpAxis) { - return endpointUrl - .replace(ACCOUNT_ID_MACRO, HttpUtil.encodeUrl(extImpAxis.getIntegration())) - .replace(SOURCE_ID_MACRO, HttpUtil.encodeUrl(extImpAxis.getToken())); + return BidderUtil.defaultRequest(modifyBidRequest, endpointUrl, mapper); } @Override diff --git a/src/main/resources/bidder-config/axis.yaml b/src/main/resources/bidder-config/axis.yaml index 26bb8ae16ca..d4479973816 100644 --- a/src/main/resources/bidder-config/axis.yaml +++ b/src/main/resources/bidder-config/axis.yaml @@ -1,6 +1,6 @@ adapters: axis: - endpoint: http://prebid.axis-marketplace.com/{{AccountID}}?token={{SourceId}} + endpoint: http://prebid.axis-marketplace.com/pbserver meta-info: maintainer-email: help@axis-marketplace.com app-media-types: diff --git a/src/test/java/org/prebid/server/bidder/axis/AxisBidderTest.java b/src/test/java/org/prebid/server/bidder/axis/AxisBidderTest.java index b5a69fb9ec2..08378ecabbb 100644 --- a/src/test/java/org/prebid/server/bidder/axis/AxisBidderTest.java +++ b/src/test/java/org/prebid/server/bidder/axis/AxisBidderTest.java @@ -33,7 +33,7 @@ public class AxisBidderTest extends VertxTest { - public static final String ENDPOINT_URL = "https://test.endpoint.com/{{AccountID}}?token={{SourceId}}"; + public static final String ENDPOINT_URL = "https://test.endpoint.com"; private final AxisBidder target = new AxisBidder(ENDPOINT_URL, jacksonMapper); @@ -71,7 +71,7 @@ public void makeHttpRequestsShouldReturnExpectedUrl() { assertThat(result.getErrors()).isEmpty(); assertThat(result.getValue()) .extracting(HttpRequest::getUri) - .containsExactly("https://test.endpoint.com/testIntegration?token=testToken"); + .containsExactly("https://test.endpoint.com"); } @Test diff --git a/src/test/java/org/prebid/server/it/AxisTest.java b/src/test/java/org/prebid/server/it/AxisTest.java index 01051780441..861215b7506 100644 --- a/src/test/java/org/prebid/server/it/AxisTest.java +++ b/src/test/java/org/prebid/server/it/AxisTest.java @@ -10,7 +10,6 @@ import java.io.IOException; import static com.github.tomakehurst.wiremock.client.WireMock.aResponse; -import static com.github.tomakehurst.wiremock.client.WireMock.equalTo; import static com.github.tomakehurst.wiremock.client.WireMock.equalToJson; import static com.github.tomakehurst.wiremock.client.WireMock.post; import static com.github.tomakehurst.wiremock.client.WireMock.urlPathEqualTo; @@ -22,8 +21,7 @@ public class AxisTest extends IntegrationTest { @Test public void openrtb2AuctionShouldRespondWithBidsFromAxis() throws IOException, JSONException { // given - WIRE_MOCK_RULE.stubFor(post(urlPathEqualTo("/axis-exchange/intgrn")) - .withQueryParam("token", equalTo("tokenA")) + WIRE_MOCK_RULE.stubFor(post(urlPathEqualTo("/axis-exchange")) .withRequestBody(equalToJson(jsonFrom("openrtb2/axis/test-axis-bid-request.json"))) .willReturn(aResponse().withBody(jsonFrom("openrtb2/axis/test-axis-bid-response.json")))); diff --git a/src/test/resources/org/prebid/server/it/test-application.properties b/src/test/resources/org/prebid/server/it/test-application.properties index efe1fdb8b5f..4772c3eb9ea 100644 --- a/src/test/resources/org/prebid/server/it/test-application.properties +++ b/src/test/resources/org/prebid/server/it/test-application.properties @@ -94,7 +94,7 @@ adapters.automatad.endpoint=http://localhost:8090/automatad-exchange adapters.avocet.enabled=true adapters.avocet.endpoint=http://localhost:8090/avocet-exchange adapters.axis.enabled=true -adapters.axis.endpoint=http://localhost:8090/axis-exchange/{{AccountID}}?token={{SourceId}} +adapters.axis.endpoint=http://localhost:8090/axis-exchange adapters.axonix.enabled=true adapters.axonix.endpoint=http://localhost:8090/axonix-exchange adapters.beachfront.enabled=true