From 31a7a356d70c8e1a69bf3be33f5f04e3107ad8cd Mon Sep 17 00:00:00 2001 From: osulzhenko Date: Fri, 25 Sep 2026 11:48:28 +0300 Subject: [PATCH 1/2] Port pgamrtb: New alias for LimelightDigital --- .../bidder-config/limelightDigital.yaml | 5 +++ .../org/prebid/server/it/PgamrtbTest.java | 35 ++++++++++++++++ .../pgamrtb/test-auction-pgamrtb-request.json | 24 +++++++++++ .../test-auction-pgamrtb-response.json | 37 +++++++++++++++++ .../pgamrtb/test-pgamrtb-bid-request.json | 40 +++++++++++++++++++ .../pgamrtb/test-pgamrtb-bid-response.json | 15 +++++++ .../server/it/test-application.properties | 2 + 7 files changed, 158 insertions(+) create mode 100644 src/test/java/org/prebid/server/it/PgamrtbTest.java create mode 100644 src/test/resources/org/prebid/server/it/openrtb2/pgamrtb/test-auction-pgamrtb-request.json create mode 100644 src/test/resources/org/prebid/server/it/openrtb2/pgamrtb/test-auction-pgamrtb-response.json create mode 100644 src/test/resources/org/prebid/server/it/openrtb2/pgamrtb/test-pgamrtb-bid-request.json create mode 100644 src/test/resources/org/prebid/server/it/openrtb2/pgamrtb/test-pgamrtb-bid-response.json diff --git a/src/main/resources/bidder-config/limelightDigital.yaml b/src/main/resources/bidder-config/limelightDigital.yaml index 8b7822cecf2..5331c4982a7 100644 --- a/src/main/resources/bidder-config/limelightDigital.yaml +++ b/src/main/resources/bidder-config/limelightDigital.yaml @@ -84,6 +84,11 @@ adapters: endpoint: http://ads-pbs.performserv.com/openrtb/{PublisherID} meta-info: vendor-id: 0 + pgamrtb: + enabled: false + endpoint: http://ads-pbs.pgamrtb.com/openrtb/{PublisherID}?host={Host} + meta-info: + vendor-id: 0 meta-info: maintainer-email: engineering@project-limelight.com app-media-types: diff --git a/src/test/java/org/prebid/server/it/PgamrtbTest.java b/src/test/java/org/prebid/server/it/PgamrtbTest.java new file mode 100644 index 00000000000..f1d1bd9a2df --- /dev/null +++ b/src/test/java/org/prebid/server/it/PgamrtbTest.java @@ -0,0 +1,35 @@ +package org.prebid.server.it; + +import io.restassured.response.Response; +import org.json.JSONException; +import org.junit.jupiter.api.Test; +import org.prebid.server.model.Endpoint; + +import java.io.IOException; + +import static com.github.tomakehurst.wiremock.client.WireMock.aResponse; +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; +import static java.util.Collections.singletonList; + +public class PgamrtbTest extends IntegrationTest { + + @Test + public void openrtb2AuctionShouldRespondWithBidsFromPgamrtbBidder() throws IOException, JSONException { + // given + WIRE_MOCK_RULE.stubFor(post(urlPathEqualTo("/pgamrtb-exchange/")) + .withRequestBody(equalToJson( + jsonFrom("openrtb2/pgamrtb/test-pgamrtb-bid-request.json"))) + .willReturn(aResponse().withBody( + jsonFrom("openrtb2/pgamrtb/test-pgamrtb-bid-response.json")))); + + // when + final Response response = responseFor("openrtb2/pgamrtb/test-auction-pgamrtb-request.json", + Endpoint.openrtb2_auction); + + // then + assertJsonEquals("openrtb2/pgamrtb/test-auction-pgamrtb-response.json", response, + singletonList("pgamrtb")); + } +} diff --git a/src/test/resources/org/prebid/server/it/openrtb2/pgamrtb/test-auction-pgamrtb-request.json b/src/test/resources/org/prebid/server/it/openrtb2/pgamrtb/test-auction-pgamrtb-request.json new file mode 100644 index 00000000000..917ad19f323 --- /dev/null +++ b/src/test/resources/org/prebid/server/it/openrtb2/pgamrtb/test-auction-pgamrtb-request.json @@ -0,0 +1,24 @@ +{ + "id": "request_id", + "imp": [ + { + "id": "imp_id", + "banner": { + "w": 300, + "h": 250 + }, + "ext": { + "pgamrtb": { + "host": "test.host", + "publisherId": "123456" + } + } + } + ], + "tmax": 5000, + "regs": { + "ext": { + "gdpr": 0 + } + } +} diff --git a/src/test/resources/org/prebid/server/it/openrtb2/pgamrtb/test-auction-pgamrtb-response.json b/src/test/resources/org/prebid/server/it/openrtb2/pgamrtb/test-auction-pgamrtb-response.json new file mode 100644 index 00000000000..d8e4ab9a505 --- /dev/null +++ b/src/test/resources/org/prebid/server/it/openrtb2/pgamrtb/test-auction-pgamrtb-response.json @@ -0,0 +1,37 @@ +{ + "id": "request_id", + "seatbid": [ + { + "bid": [ + { + "id": "bid_id", + "impid": "imp_id", + "exp": 300, + "price": 3.33, + "crid": "creativeId", + "ext": { + "origbidcpm": 3.33, + "prebid": { + "type": "banner", + "meta": { + "adaptercode": "pgamrtb" + } + } + } + } + ], + "seat": "pgamrtb", + "group": 0 + } + ], + "cur": "USD", + "ext": { + "responsetimemillis": { + "pgamrtb": "{{ performist.response_time_ms }}" + }, + "prebid": { + "auctiontimestamp": 0 + }, + "tmaxrequest": 5000 + } +} diff --git a/src/test/resources/org/prebid/server/it/openrtb2/pgamrtb/test-pgamrtb-bid-request.json b/src/test/resources/org/prebid/server/it/openrtb2/pgamrtb/test-pgamrtb-bid-request.json new file mode 100644 index 00000000000..8e58e53ba4b --- /dev/null +++ b/src/test/resources/org/prebid/server/it/openrtb2/pgamrtb/test-pgamrtb-bid-request.json @@ -0,0 +1,40 @@ +{ + "id": "request_id-imp_id", + "imp": [ + { + "id": "imp_id", + "secure": 1, + "banner": { + "w": 300, + "h": 250 + } + } + ], + "source": { + "tid": "${json-unit.any-string}" + }, + "site": { + "domain": "www.example.com", + "page": "http://www.example.com", + "publisher": { + "domain": "example.com" + }, + "ext": { + "amp": 0 + } + }, + "device": { + "ua": "userAgent", + "ip": "193.168.244.1" + }, + "at": 1, + "tmax": "${json-unit.any-number}", + "cur": [ + "USD" + ], + "regs": { + "ext": { + "gdpr": 0 + } + } +} diff --git a/src/test/resources/org/prebid/server/it/openrtb2/pgamrtb/test-pgamrtb-bid-response.json b/src/test/resources/org/prebid/server/it/openrtb2/pgamrtb/test-pgamrtb-bid-response.json new file mode 100644 index 00000000000..04d26e04318 --- /dev/null +++ b/src/test/resources/org/prebid/server/it/openrtb2/pgamrtb/test-pgamrtb-bid-response.json @@ -0,0 +1,15 @@ +{ + "id": "request_id", + "seatbid": [ + { + "bid": [ + { + "id": "bid_id", + "impid": "imp_id", + "price": 3.33, + "crid": "creativeId" + } + ] + } + ] +} 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 41a8ecc8636..470e6fa1b6a 100644 --- a/src/test/resources/org/prebid/server/it/test-application.properties +++ b/src/test/resources/org/prebid/server/it/test-application.properties @@ -370,6 +370,8 @@ adapters.limelightDigital.aliases.adtg_org.enabled=true adapters.limelightDigital.aliases.adtg_org.endpoint=http://localhost:8090/adtg_org-exchange/ adapters.limelightDigital.aliases.performist.enabled=true adapters.limelightDigital.aliases.performist.endpoint=http://localhost:8090/performist-exchange/ +adapters.limelightDigital.aliases.pgamrtb.enabled=true +adapters.limelightDigital.aliases.pgamrtb.endpoint=http://localhost:8090/pgamrtb-exchange/ adapters.lmkiviads.enabled=true adapters.lmkiviads.endpoint=http://localhost:8090/lm-kiviads-exchange adapters.lockerdome.enabled=true From 19bdbb7e48047c28783e8a394b902006ce8e9087 Mon Sep 17 00:00:00 2001 From: osulzhenko Date: Fri, 25 Sep 2026 16:26:33 +0300 Subject: [PATCH 2/2] minor update --- .../it/openrtb2/pgamrtb/test-auction-pgamrtb-response.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/test/resources/org/prebid/server/it/openrtb2/pgamrtb/test-auction-pgamrtb-response.json b/src/test/resources/org/prebid/server/it/openrtb2/pgamrtb/test-auction-pgamrtb-response.json index d8e4ab9a505..bb47845f857 100644 --- a/src/test/resources/org/prebid/server/it/openrtb2/pgamrtb/test-auction-pgamrtb-response.json +++ b/src/test/resources/org/prebid/server/it/openrtb2/pgamrtb/test-auction-pgamrtb-response.json @@ -27,7 +27,7 @@ "cur": "USD", "ext": { "responsetimemillis": { - "pgamrtb": "{{ performist.response_time_ms }}" + "pgamrtb": "{{ pgamrtb.response_time_ms }}" }, "prebid": { "auctiontimestamp": 0