Skip to content

Commit

Permalink
LimeLightDigital: Filmzie Alias (#3384)
Browse files Browse the repository at this point in the history
  • Loading branch information
AntoxaAntoxic authored Aug 20, 2024
1 parent 53d615a commit e034cae
Show file tree
Hide file tree
Showing 7 changed files with 151 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/main/resources/bidder-config/limelightDigital.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ adapters:
limelightDigital:
endpoint: http://ads-pbs.ortb.net/openrtb/{{PublisherID}}?host={{Host}}
aliases:
filmzie:
enabled: false
iionads:
enabled: false
endpoint: http://ads-pbs.iionads.com/openrtb/{{PublisherID}}?host={{Host}}
Expand Down
35 changes: 35 additions & 0 deletions src/test/java/org/prebid/server/it/FilmzieTest.java
Original file line number Diff line number Diff line change
@@ -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 FilmzieTest extends IntegrationTest {

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

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

// then
assertJsonEquals("openrtb2/filmzie/test-auction-filmzie-response.json", response,
singletonList("filmzie"));
}
}
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": {
"filmzie": {
"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": "filmzie",
"group": 0
}
],
"cur": "USD",
"ext": {
"responsetimemillis": {
"filmzie": "{{ filmzie.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 @@ -269,6 +269,8 @@ adapters.limelightDigital.aliases.xtrmqb.enabled=true
adapters.limelightDigital.aliases.xtrmqb.endpoint=http://localhost:8090/xtrmqb-exchange/{{Host}}/{{PublisherID}}
adapters.limelightDigital.aliases.embimedia.enabled=true
adapters.limelightDigital.aliases.embimedia.endpoint=http://localhost:8090/embimedia-exchange/{{Host}}/{{PublisherID}}
adapters.limelightDigital.aliases.filmzie.enabled=true
adapters.limelightDigital.aliases.filmzie.endpoint=http://localhost:8090/filmzie-exchange/{{Host}}/{{PublisherID}}
adapters.lmkiviads.enabled=true
adapters.lmkiviads.endpoint=http://localhost:8090/lm-kiviads-exchange/{{SourceId}}/{{Host}}
adapters.lockerdome.enabled=true
Expand Down

0 comments on commit e034cae

Please sign in to comment.