Skip to content

Commit c7e0202

Browse files
New Adapter: Performist - Limelight Alias
1 parent 3f6fa1d commit c7e0202

File tree

7 files changed

+156
-0
lines changed

7 files changed

+156
-0
lines changed

src/main/resources/bidder-config/limelightDigital.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,9 @@ adapters:
5555
adtg_org:
5656
enabled: false
5757
endpoint: http://ads-pbs.rtb.adtarget.org/openrtb/{{PublisherID}}?host={{Host}}
58+
performist:
59+
enabled: false
60+
endpoint: http://ads-pbs.performserv.com/openrtb/{{PublisherID}}
5861
meta-info:
5962
maintainer-email: [email protected]
6063
app-media-types:
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
package org.prebid.server.it;
2+
3+
import io.restassured.response.Response;
4+
import org.json.JSONException;
5+
import org.junit.jupiter.api.Test;
6+
import org.prebid.server.model.Endpoint;
7+
8+
import java.io.IOException;
9+
10+
import static com.github.tomakehurst.wiremock.client.WireMock.aResponse;
11+
import static com.github.tomakehurst.wiremock.client.WireMock.equalToJson;
12+
import static com.github.tomakehurst.wiremock.client.WireMock.post;
13+
import static com.github.tomakehurst.wiremock.client.WireMock.urlPathEqualTo;
14+
import static java.util.Collections.singletonList;
15+
16+
public class PerformistTest extends IntegrationTest {
17+
18+
@Test
19+
public void openrtb2AuctionShouldRespondWithBidsFromThePerformistBidder() throws IOException, JSONException {
20+
// given
21+
WIRE_MOCK_RULE.stubFor(post(urlPathEqualTo("/performist-exchange/"))
22+
.withRequestBody(equalToJson(
23+
jsonFrom("openrtb2/performist/test-performist-bid-request.json")))
24+
.willReturn(aResponse().withBody(
25+
jsonFrom("openrtb2/performist/test-performist-bid-response.json"))));
26+
27+
// when
28+
final Response response = responseFor("openrtb2/performist/test-auction-performist-request.json",
29+
Endpoint.openrtb2_auction);
30+
31+
// then
32+
assertJsonEquals("openrtb2/performist/test-auction-performist-response.json", response,
33+
singletonList("performist"));
34+
}
35+
}
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
{
2+
"id": "request_id",
3+
"imp": [
4+
{
5+
"id": "imp_id",
6+
"banner": {
7+
"w": 300,
8+
"h": 250
9+
},
10+
"ext": {
11+
"performist": {
12+
"host": "test.host",
13+
"publisherId": "123456"
14+
}
15+
}
16+
}
17+
],
18+
"tmax": 5000,
19+
"regs": {
20+
"ext": {
21+
"gdpr": 0
22+
}
23+
}
24+
}
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
{
2+
"id": "request_id",
3+
"seatbid": [
4+
{
5+
"bid": [
6+
{
7+
"id": "bid_id",
8+
"impid": "imp_id",
9+
"exp": 300,
10+
"price": 3.33,
11+
"crid": "creativeId",
12+
"ext": {
13+
"origbidcpm": 3.33,
14+
"prebid": {
15+
"type": "banner",
16+
"meta": {
17+
"adaptercode": "performist"
18+
}
19+
}
20+
}
21+
}
22+
],
23+
"seat": "performist",
24+
"group": 0
25+
}
26+
],
27+
"cur": "USD",
28+
"ext": {
29+
"responsetimemillis": {
30+
"performist": "{{ performist.response_time_ms }}"
31+
},
32+
"prebid": {
33+
"auctiontimestamp": 0
34+
},
35+
"tmaxrequest": 5000
36+
}
37+
}
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
{
2+
"id": "request_id-imp_id",
3+
"imp": [
4+
{
5+
"id": "imp_id",
6+
"secure": 1,
7+
"banner": {
8+
"w": 300,
9+
"h": 250
10+
}
11+
}
12+
],
13+
"source": {
14+
"tid": "${json-unit.any-string}"
15+
},
16+
"site": {
17+
"domain": "www.example.com",
18+
"page": "http://www.example.com",
19+
"publisher": {
20+
"domain": "example.com"
21+
},
22+
"ext": {
23+
"amp": 0
24+
}
25+
},
26+
"device": {
27+
"ua": "userAgent",
28+
"ip": "193.168.244.1"
29+
},
30+
"at": 1,
31+
"tmax": "${json-unit.any-number}",
32+
"cur": [
33+
"USD"
34+
],
35+
"regs": {
36+
"ext": {
37+
"gdpr": 0
38+
}
39+
}
40+
}
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"id": "request_id",
3+
"seatbid": [
4+
{
5+
"bid": [
6+
{
7+
"id": "bid_id",
8+
"impid": "imp_id",
9+
"price": 3.33,
10+
"crid": "creativeId"
11+
}
12+
]
13+
}
14+
]
15+
}

src/test/resources/org/prebid/server/it/test-application.properties

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -353,6 +353,8 @@ adapters.limelightDigital.aliases.velonium.enabled=true
353353
adapters.limelightDigital.aliases.velonium.endpoint=http://localhost:8090/velonium-exchange/
354354
adapters.limelightDigital.aliases.adtg_org.enabled=true
355355
adapters.limelightDigital.aliases.adtg_org.endpoint=http://localhost:8090/adtg_org-exchange/
356+
adapters.limelightDigital.aliases.performist.enabled=true
357+
adapters.limelightDigital.aliases.performist.endpoint=http://localhost:8090/performist-exchange/
356358
adapters.lmkiviads.enabled=true
357359
adapters.lmkiviads.endpoint=http://localhost:8090/lm-kiviads-exchange/{{SourceId}}/{{Host}}
358360
adapters.lockerdome.enabled=true

0 commit comments

Comments
 (0)