diff --git a/extra/bundle/pom.xml b/extra/bundle/pom.xml index e42e142caf6..f97e8777cb4 100644 --- a/extra/bundle/pom.xml +++ b/extra/bundle/pom.xml @@ -5,7 +5,7 @@ org.prebid prebid-server-aggregator - 2.1.0-SNAPSHOT + 2.2.0-SNAPSHOT ../../extra/pom.xml @@ -74,17 +74,17 @@ org.prebid prebid-server - 2.1.0-SNAPSHOT + 2.2.0-SNAPSHOT org.prebid.server.hooks.modules confiant-ad-quality - 2.1.0-SNAPSHOT + 2.2.0-SNAPSHOT org.prebid.server.hooks.modules ortb2-blocking - 2.1.0-SNAPSHOT + 2.2.0-SNAPSHOT diff --git a/extra/modules/confiant-ad-quality/pom.xml b/extra/modules/confiant-ad-quality/pom.xml index c463bd69985..4874c8e832a 100644 --- a/extra/modules/confiant-ad-quality/pom.xml +++ b/extra/modules/confiant-ad-quality/pom.xml @@ -5,7 +5,7 @@ org.prebid.server.hooks.modules all-modules - 2.1.0-SNAPSHOT + 2.2.0-SNAPSHOT confiant-ad-quality diff --git a/extra/modules/ortb2-blocking/pom.xml b/extra/modules/ortb2-blocking/pom.xml index 68cb84bd7f0..f296de57989 100644 --- a/extra/modules/ortb2-blocking/pom.xml +++ b/extra/modules/ortb2-blocking/pom.xml @@ -5,7 +5,7 @@ org.prebid.server.hooks.modules all-modules - 2.1.0-SNAPSHOT + 2.2.0-SNAPSHOT ortb2-blocking diff --git a/extra/modules/pom.xml b/extra/modules/pom.xml index 23e4c093c96..720f6e86ac9 100644 --- a/extra/modules/pom.xml +++ b/extra/modules/pom.xml @@ -5,7 +5,7 @@ org.prebid prebid-server-aggregator - 2.1.0-SNAPSHOT + 2.2.0-SNAPSHOT ../../extra/pom.xml @@ -28,7 +28,7 @@ ${java.version} ${java.version} - 2.1.0-SNAPSHOT + 2.2.0-SNAPSHOT 1.18.22 diff --git a/extra/pom.xml b/extra/pom.xml index 0673916e6ab..71cef1f3c0f 100644 --- a/extra/pom.xml +++ b/extra/pom.xml @@ -4,7 +4,7 @@ org.prebid prebid-server-aggregator - 2.1.0-SNAPSHOT + 2.2.0-SNAPSHOT pom diff --git a/pom.xml b/pom.xml index 4d3b8e34614..fd67628d5f9 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ org.prebid prebid-server-aggregator - 2.1.0-SNAPSHOT + 2.2.0-SNAPSHOT extra/pom.xml diff --git a/src/main/resources/bidder-config/limelightDigital.yaml b/src/main/resources/bidder-config/limelightDigital.yaml index ed904f8a190..27493c1e875 100644 --- a/src/main/resources/bidder-config/limelightDigital.yaml +++ b/src/main/resources/bidder-config/limelightDigital.yaml @@ -11,6 +11,9 @@ adapters: adsyield: enabled: false endpoint: http://ads-pbs.open-adsyield.com/openrtb/{{PublisherID}}?host={{Host}} + greedygame: + enabled: false + endpoint: http://ads-pbs.rtb-greedygame.com/openrtb/{{.PublisherID}}?host={{.Host}} meta-info: maintainer-email: engineering@project-limelight.com app-media-types: diff --git a/src/test/java/org/prebid/server/it/GreedyGameTest.java b/src/test/java/org/prebid/server/it/GreedyGameTest.java new file mode 100644 index 00000000000..2e306022630 --- /dev/null +++ b/src/test/java/org/prebid/server/it/GreedyGameTest.java @@ -0,0 +1,38 @@ +package org.prebid.server.it; + +import io.restassured.response.Response; +import org.json.JSONException; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.prebid.server.model.Endpoint; +import org.springframework.test.context.junit4.SpringRunner; + +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; + +@RunWith(SpringRunner.class) +public class GreedyGameTest extends IntegrationTest { + + @Test + public void openrtb2AuctionShouldRespondWithBidsFromTheGreedyGameBidder() throws IOException, JSONException { + // given + WIRE_MOCK_RULE.stubFor(post(urlPathEqualTo("/greedygame-exchange/test.host/123456")) + .withRequestBody(equalToJson( + jsonFrom("openrtb2/greedygame/test-greedygame-bid-request.json"))) + .willReturn(aResponse().withBody( + jsonFrom("openrtb2/greedygame/test-greedygame-bid-response.json")))); + + // when + final Response response = responseFor("openrtb2/greedygame/test-auction-greedygame-request.json", + Endpoint.openrtb2_auction); + + // then + assertJsonEquals("openrtb2/greedygame/test-auction-greedygame-response.json", response, + singletonList("greedygame")); + } +} diff --git a/src/test/resources/org/prebid/server/it/openrtb2/greedygame/test-auction-greedygame-request.json b/src/test/resources/org/prebid/server/it/openrtb2/greedygame/test-auction-greedygame-request.json new file mode 100644 index 00000000000..db878dd6a74 --- /dev/null +++ b/src/test/resources/org/prebid/server/it/openrtb2/greedygame/test-auction-greedygame-request.json @@ -0,0 +1,24 @@ +{ + "id": "request_id", + "imp": [ + { + "id": "imp_id", + "banner": { + "w": 300, + "h": 250 + }, + "ext": { + "greedygame": { + "host": "test.host", + "publisherId": "123456" + } + } + } + ], + "tmax": 5000, + "regs": { + "ext": { + "gdpr": 0 + } + } +} diff --git a/src/test/resources/org/prebid/server/it/openrtb2/greedygame/test-auction-greedygame-response.json b/src/test/resources/org/prebid/server/it/openrtb2/greedygame/test-auction-greedygame-response.json new file mode 100644 index 00000000000..df8a43a904f --- /dev/null +++ b/src/test/resources/org/prebid/server/it/openrtb2/greedygame/test-auction-greedygame-response.json @@ -0,0 +1,33 @@ +{ + "id": "request_id", + "seatbid": [ + { + "bid": [ + { + "id": "bid_id", + "impid": "imp_id", + "price": 3.33, + "crid": "creativeId", + "ext": { + "origbidcpm": 3.33, + "prebid": { + "type": "banner" + } + } + } + ], + "seat": "greedygame", + "group": 0 + } + ], + "cur": "USD", + "ext": { + "responsetimemillis": { + "greedygame": "{{ greedygame.response_time_ms }}" + }, + "prebid": { + "auctiontimestamp": 0 + }, + "tmaxrequest": 5000 + } +} diff --git a/src/test/resources/org/prebid/server/it/openrtb2/greedygame/test-greedygame-bid-request.json b/src/test/resources/org/prebid/server/it/openrtb2/greedygame/test-greedygame-bid-request.json new file mode 100644 index 00000000000..8e58e53ba4b --- /dev/null +++ b/src/test/resources/org/prebid/server/it/openrtb2/greedygame/test-greedygame-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/greedygame/test-greedygame-bid-response.json b/src/test/resources/org/prebid/server/it/openrtb2/greedygame/test-greedygame-bid-response.json new file mode 100644 index 00000000000..04d26e04318 --- /dev/null +++ b/src/test/resources/org/prebid/server/it/openrtb2/greedygame/test-greedygame-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 24d8c7909d5..91578791a3c 100644 --- a/src/test/resources/org/prebid/server/it/test-application.properties +++ b/src/test/resources/org/prebid/server/it/test-application.properties @@ -215,6 +215,8 @@ adapters.limelightDigital.aliases.iionads.enabled=true adapters.limelightDigital.aliases.iionads.endpoint=http://localhost:8090/iionads-exchange/{{Host}}/{{PublisherID}} adapters.limelightDigital.aliases.adsyield.enabled=true adapters.limelightDigital.aliases.adsyield.endpoint=http://localhost:8090/adsyield-exchange/{{Host}}/{{PublisherID}} +adapters.limelightDigital.aliases.greedygame.enabled=true +adapters.limelightDigital.aliases.greedygame.endpoint=http://localhost:8090/greedygame-exchange/{{Host}}/{{PublisherID}} adapters.lockerdome.enabled=true adapters.lockerdome.endpoint=http://localhost:8090/lockerdome-exchange adapters.logan.enabled=true