Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Core: Add new Xtrmqb bidder #2870

Merged
merged 1 commit into from
Jan 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions src/main/resources/bidder-config/limelightDigital.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ adapters:
appstock:
enabled: false
endpoint: http://ads-pbs.pre.vr-tb.com/openrtb/{{PublisherID}}?host={{Host}}
xtrmqb:
enabled: false
endpoint: http://ads-pbs.ortb.tech/openrtb/{{PublisherID}}?host={{Host}}
meta-info:
maintainer-email: [email protected]
app-media-types:
Expand Down
38 changes: 38 additions & 0 deletions src/test/java/org/prebid/server/it/XtrmqbGameTest.java
Original file line number Diff line number Diff line change
@@ -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 XtrmqbGameTest extends IntegrationTest {

@Test
public void openrtb2AuctionShouldRespondWithBidsFromTheXtrmqbBidder() throws IOException, JSONException {
// given
WIRE_MOCK_RULE.stubFor(post(urlPathEqualTo("/xtrmqb-exchange/test.host/123456"))
.withRequestBody(equalToJson(
jsonFrom("openrtb2/xtrmqb/test-xtrmqb-bid-request.json")))
.willReturn(aResponse().withBody(
jsonFrom("openrtb2/xtrmqb/test-xtrmqb-bid-response.json"))));

// when
final Response response = responseFor("openrtb2/xtrmqb/test-auction-xtrmqb-request.json",
Endpoint.openrtb2_auction);

// then
assertJsonEquals("openrtb2/xtrmqb/test-auction-xtrmqb-response.json", response,
singletonList("xtrmqb"));
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"id": "request_id",
"imp": [
{
"id": "imp_id",
"banner": {
"w": 300,
"h": 250
},
"ext": {
"xtrmqb": {
"host": "test.host",
"publisherId": "123456"
}
}
}
],
"tmax": 5000,
"regs": {
"ext": {
"gdpr": 0
}
}
}
Original file line number Diff line number Diff line change
@@ -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": "xtrmqb",
"group": 0
}
],
"cur": "USD",
"ext": {
"responsetimemillis": {
"xtrmqb": "{{ xtrmqb.response_time_ms }}"
},
"prebid": {
"auctiontimestamp": 0
},
"tmaxrequest": 5000
}
}
Original file line number Diff line number Diff line change
@@ -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
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"id": "request_id",
"seatbid": [
{
"bid": [
{
"id": "bid_id",
"impid": "imp_id",
"price": 3.33,
"crid": "creativeId"
}
]
}
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,8 @@ 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.limelightDigital.aliases.xtrmqb.enabled=true
adapters.limelightDigital.aliases.xtrmqb.endpoint=http://localhost:8090/xtrmqb-exchange/{{Host}}/{{PublisherID}}
adapters.lockerdome.enabled=true
adapters.lockerdome.endpoint=http://localhost:8090/lockerdome-exchange
adapters.logan.enabled=true
Expand Down
Loading