Skip to content
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
14 changes: 14 additions & 0 deletions src/main/resources/bidder-config/adkernel.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,20 @@ adapters:
aliases:
rxnetwork: ~
152media: ~
xapads:
enabled: false
vendor-id: 1320
usersync:
enabled: true
cookie-family-name: xapads
redirect:
url: https://sync.adkernel.com/user-sync?t=image&zone=284803&gdpr={{gdpr}}&gdpr_consent={{gdpr_consent}}&us_privacy={{us_privacy}}&gpp={{gpp}}&gpp_sid={{gpp_sid}}&r={{redirect_url}}
support-cors: false
uid-macro: '{UID}'
iframe:
url: https://sync.adkernel.com/user-sync?t=iframe&zone=284803&gdpr={{gdpr}}&gdpr_consent={{gdpr_consent}}&us_privacy={{us_privacy}}&gpp={{gpp}}&gpp_sid={{gpp_sid}}&r={{redirect_url}}
support-cors: false
uid-macro: '{UID}'
meta-info:
maintainer-email: prebid-dev@adkernel.com
app-media-types:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public class OneFiveTwoMediaTest extends IntegrationTest {
@Test
public void openrtb2AuctionShouldRespondWithBidsFrom152Media() throws IOException, JSONException {
// given
WIRE_MOCK_RULE.stubFor(post(urlPathEqualTo("/adkernel-exchange"))
WIRE_MOCK_RULE.stubFor(post(urlPathEqualTo("/152media-exchange"))
.withRequestBody(equalToJson(jsonFrom("openrtb2/152media/test-152media-bid-request.json")))
.willReturn(aResponse().withBody(jsonFrom("openrtb2/152media/test-152media-bid-response.json"))));

Expand Down
2 changes: 1 addition & 1 deletion src/test/java/org/prebid/server/it/RxNetworkTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public class RxNetworkTest extends IntegrationTest {
@Test
public void openrtb2AuctionShouldRespondWithBidsFromRxNetwork() throws IOException, JSONException {
// given
WIRE_MOCK_RULE.stubFor(post(urlPathEqualTo("/adkernel-exchange"))
WIRE_MOCK_RULE.stubFor(post(urlPathEqualTo("/rxnetwork-exchange"))
.withRequestBody(equalToJson(jsonFrom("openrtb2/rxnetwork/test-rxnetwork-bid-request.json")))
.willReturn(aResponse().withBody(jsonFrom("openrtb2/rxnetwork/test-rxnetwork-bid-response.json"))));

Expand Down
33 changes: 33 additions & 0 deletions src/test/java/org/prebid/server/it/XapadsTest.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
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 XapadsTest extends IntegrationTest {

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

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

// then
assertJsonEquals("openrtb2/xapads/test-auction-xapads-response.json", response,
singletonList("xapads"));
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"id": "request_id",
"imp": [
{
"id": "imp_id",
"banner": {
"w": 320,
"h": 250
},
"ext": {
"xapads": {
"zoneId": 101
}
}
}
],
"tmax": 5000,
"regs": {
"ext": {
"gdpr": 0
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
{
"id": "request_id",
"seatbid": [
{
"bid": [
{
"id": "bid_id",
"impid": "imp_id",
"exp": 300,
"price": 2.25,
"adm": "<!-- admarkup -->",
"adid": "2002",
"adomain": [
"tag-example.com"
],
"cid": "1001",
"crid": "2002",
"mtype": 1,
"ext": {
"prebid": {
"type": "banner",
"meta": {
"adaptercode": "xapads"
}
},
"origbidcpm": 2.25
}
}
],
"seat": "xapads",
"group": 0
}
],
"cur": "USD",
"ext": {
"responsetimemillis": {
"xapads": "{{ xapads.response_time_ms }}"
},
"prebid": {
"auctiontimestamp": 0
},
"tmaxrequest": 5000
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
{
"id": "request_id",
"imp": [
{
"id": "imp_id",
"secure": 1,
"banner": {
"w": 320,
"h": 250
}
}
],
"source": {
"tid": "${json-unit.any-string}"
},
"site": {
"domain": "www.example.com",
"page": "http://www.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
}
},
"ext": {
"prebid": {
"server": {
"externalurl": "http://localhost:8080",
"gvlid": 1,
"datacenter": "local",
"endpoint": "/openrtb2/auction"
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"id": "request_id",
"seatbid": [
{
"bid": [
{
"id": "bid_id",
"impid": "imp_id",
"price": 2.25,
"cid": "1001",
"crid": "2002",
"adid": "2002",
"adm": "<!-- admarkup -->",
"mtype": 1,
"adomain": [
"tag-example.com"
]
}
]
}
],
"bidid": "bid_id"
}
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,13 @@ adapters.adhese.endpoint=http://localhost:8090/adhese-exchange
adapters.adkerneladn.enabled=true
adapters.adkerneladn.endpoint=http://localhost:8090/adkerneladn-exchange?account={{PublisherID}}
adapters.adkernel.enabled=true
adapters.adkernel.endpoint=http://localhost:8090/adkernel-exchange?zone=%s
adapters.adkernel.endpoint=http://localhost:8090/adkernel-exchange
adapters.adkernel.aliases.xapads.enabled=true
adapters.adkernel.aliases.xapads.endpoint=http://localhost:8090/xapads-exchange
adapters.adkernel.aliases.rxnetwork.enabled=true
adapters.adkernel.aliases.rxnetwork.endpoint=http://localhost:8090/rxnetwork-exchange
adapters.adkernel.aliases.152media.enabled=true
adapters.adkernel.aliases.152media.endpoint=http://localhost:8090/152media-exchange
adapters.adman.enabled=true
adapters.adman.endpoint=http://localhost:8090/adman-exchange
adapters.admatic.enabled=true
Expand Down
Loading