Skip to content
Open
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
4 changes: 4 additions & 0 deletions src/main/resources/bidder-config/freewheelssp.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ adapters:
ortb-version: "2.6"
modifying-vast-xml-allowed: true
aliases:
freewheel-ssp:
enabled: false
meta-info:
vendor-id: 285
fwssp:
enabled: false
endpoint: "https://prebid.v.fwmrm.net/ortb/ssp"
Expand Down
18 changes: 18 additions & 0 deletions src/test/java/org/prebid/server/it/FreewheelSSPTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,22 @@ public void openrtb2AuctionShouldRespondWithBidsFromFreewheelSSP() throws IOExce
assertJsonEquals("openrtb2/freewheelssp/test-auction-freewheelssp-response.json", response,
singletonList("freewheelssp"));
}

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

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

// then
assertJsonEquals("openrtb2/freewheel-ssp/test-auction-freewheel-ssp-response.json", response,
singletonList("freewheel-ssp"));
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
"id": "request_id",
"imp": [
{
"id": "imp-1",
"video": {
"mimes": ["video/mp4"],
"w": 300,
"h": 250
},
"ext": {
"freewheel-ssp": {
"zoneId": 12345
}
}
}
],
"tmax": 5000,
"cur": [
"USD"
],
"regs": {
"ext": {
"gdpr": 0
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
{
"id": "request_id",
"seatbid": [
{
"bid": [
{
"id": "12345_freewheelssp-test_1",
"impid": "imp-1",
"exp": 1500,
"price": 1.0,
"adid": "7857",
"adm": "<?xml version='1.0' encoding='UTF-8'?><VAST version='2.0'></VAST>",
"cid": "4001",
"crid": "7857",
"ext": {
"prebid": {
"type": "video",
"meta": {
"adaptercode": "freewheel-ssp"
}
},
"origbidcpm": 1
}
}
],
"seat": "freewheel-ssp",
"group": 0
}
],
"cur": "USD",
"ext": {
"responsetimemillis": {
"freewheel-ssp": "{{ freewheel-ssp.response_time_ms }}"
},
"prebid": {
"auctiontimestamp": 0
},
"tmaxrequest": 5000
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
{
"id": "request_id",
"imp": [
{
"id": "imp-1",
"video": {
"mimes": [
"video/mp4"
],
"w": 300,
"h": 250
},
"secure": 1,
"ext": {
"zoneId": "12345"
}
}
],
"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" : {
"gdpr" : 0
},
"ext": {
"prebid": {
"server": {
"externalurl": "http://localhost:8080",
"gvlid": 1,
"datacenter": "local",
"http_method": "POST",
"endpoint": "/openrtb2/auction"
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"id": "request_id",
"seatbid": [
{
"bid": [
{
"id": "12345_freewheelssp-test_1",
"impid": "imp-1",
"price": 1.0,
"adid": "7857",
"adm": "<?xml version='1.0' encoding='UTF-8'?><VAST version='2.0'></VAST>",
"cid": "4001",
"crid": "7857"
}
],
"type": "video"
}
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,8 @@ adapters.audiencenetwork.platform-id=101
adapters.audiencenetwork.app-secret=67234
adapters.freewheelssp.enabled=true
adapters.freewheelssp.endpoint=http://localhost:8090/freewheelssp-exchange
adapters.freewheelssp.aliases.freewheel-ssp.enabled=true
adapters.freewheelssp.aliases.freewheel-ssp.endpoint=http://localhost:8090/freewheel-ssp-exchange
adapters.freewheelssp.aliases.fwssp.enabled=true
adapters.freewheelssp.aliases.fwssp.endpoint=http://localhost:8090/fwssp-exchange
adapters.frvradn.enabled=true
Expand Down
Loading