Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 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
30 changes: 21 additions & 9 deletions src/main/resources/bidder-config/adverxo.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,34 +5,46 @@ adapters:
aliases:
adport:
enabled: false
endpoint: https://adport.pbsadverxo.com/auction?id={{adUnit}}&auth={{auth}}
endpoint: https://adport.pbsadverxo.com/auction?id={{adUnitId}}&auth={{auth}}
userSync:
enabled: true
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

enabled: false for all aliases

cookie-family-name: adverxo
iframe:
url: https://adport.pbsadverxo.com/usync?type=iframe&gdpr={{gdpr}}&consent={{gdpr_consent}}&us_privacy={{us_privacy}}&redirect={{redirect_url}}
userMacro: '[UID]'
userMacro: '$UID'
support-cors: false
redirect:
url: https://adport.pbsadverxo.com/usync?type=image&gdpr={{gdpr}}&consent={{gdpr_consent}}&us_privacy={{us_privacy}}&redirect={{redirect_url}}
userMacro: '[UID]'
userMacro: '$UID'
support-cors: false
bidsmind:
enabled: false
endpoint: https://bidsmind.pbsadverxo.com/auction?id={{adUnit}}&auth={{auth}}
endpoint: https://bidsmind.pbsadverxo.com/auction?id={{adUnitId}}&auth={{auth}}
userSync:
enabled: true
cookie-family-name: adverxo
iframe:
url: https://bidsmind.pbsadverxo.com/usync?type=iframe&gdpr={{gdpr}}&consent={{gdpr_consent}}&us_privacy={{us_privacy}}&redirect={{redirect_url}}
userMacro: '[UID]'
userMacro: '$UID'
support-cors: false
redirect:
url: https://bidsmind.pbsadverxo.com/usync?type=image&gdpr={{gdpr}}&consent={{gdpr_consent}}&us_privacy={{us_privacy}}&redirect={{redirect_url}}
userMacro: '[UID]'
userMacro: '$UID'
support-cors: false
mobupps:
enabled: false
endpoint: https://mobupps.pbsadverxo.com/auction?id={{adUnit}}&auth={{auth}}
endpoint: https://mobupps.pbsadverxo.com/auction?id={{adUnitId}}&auth={{auth}}
userSync:
enabled: true
cookie-family-name: adverxo
iframe:
url: https://mobupps.pbsadverxo.com/usync?type=iframe&gdpr={{gdpr}}&consent={{gdpr_consent}}&us_privacy={{us_privacy}}&redirect={{redirect_url}}
userMacro: '[UID]'
userMacro: '$UID'
support-cors: false
redirect:
url: https://mobupps.pbsadverxo.com/usync?type=image&gdpr={{gdpr}}&consent={{gdpr_consent}}&us_privacy={{us_privacy}}&redirect={{redirect_url}}
userMacro: '[UID]'
userMacro: '$UID'
support-cors: false
meta-info:
maintainer-email: developer@adverxo.com
app-media-types:
Expand Down
33 changes: 33 additions & 0 deletions src/test/java/org/prebid/server/it/AdportTest.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 AdportTest extends IntegrationTest {

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

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

// then
assertJsonEquals("openrtb2/adport/test-auction-adport-response.json", response,
singletonList("adport"));
}
}
33 changes: 33 additions & 0 deletions src/test/java/org/prebid/server/it/BidsmindTest.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 BidsmindTest extends IntegrationTest {

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

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

// then
assertJsonEquals("openrtb2/bidsmind/test-auction-bidsmind-response.json", response,
singletonList("bidsmind"));
}
}
33 changes: 33 additions & 0 deletions src/test/java/org/prebid/server/it/MobuppsTest.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 MobuppsTest extends IntegrationTest {

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

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

// then
assertJsonEquals("openrtb2/mobupps/test-auction-mobupps-response.json", response,
singletonList("mobupps"));
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
{
"id": "test-auction-request",
"imp": [
{
"id": "imp1",
"banner": {
"format": [
{
"w": 300,
"h": 250
}
]
},
"secure": 1,
"ext": {
"tid": "${json-unit.any-string}",
"bidder": {
"adUnitId": 1,
"auth": "123456"
}
}
}
],
"site": {
"domain": "testpage.com",
"page": "http://testpage.com",
"publisher": {
"domain": "testpage.com"
},
"ext": {
"amp": 0
}
},
"device": {
"ua": "Mozilla/5.0",
"ip": "193.168.244.1"
},
"at": 1,
"tmax": "${json-unit.any-number}",
"cur": [
"USD"
],
"source": {
"tid": "${json-unit.any-string}"
},
"regs": {
"ext": {
"gdpr": 0
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
{
"id": "test-auction-request",
"seatbid": [
{
"seat": "adport",
"group": 0,
"bid": [
{
"id": "bid1",
"impid": "imp1",
"price": 1.23,
"adm": "<script>Ad markup with 1.23</script>",
"nurl": "https://example.com/win?price=1.23",
"crid": "creative1",
"w": 300,
"h": 250,
"exp": 300,
"mtype": 1,
"ext": {
"origbidcpm": 1.23,
"origbidcur": "USD",
"prebid": {
"type": "banner"
}
}
}
]
}
],
"cur": "USD",
"ext": {
"responsetimemillis": {
"adport": 0
},
"tmaxrequest": 5000,
"prebid": {
"auctiontimestamp": 0
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
{
"id": "test-auction-request",
"imp": [
{
"id": "imp1",
"banner": {
"format": [
{
"w": 300,
"h": 250
}
]
},
"ext": {
"adport": {
"adUnitId": 1,
"auth": "123456"
}
}
}
],
"site": {
"page": "http://testpage.com"
},
"device": {
"ua": "Mozilla/5.0"
},
"tmax": 5000,
"regs": {
"ext": {
"gdpr": 0
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
{
"id": "test-auction-request",
"seatbid": [
{
"seat": "adport",
"group": 0,
"bid": [
{
"id": "bid1",
"impid": "imp1",
"price": 1.23,
"adm": "<script>Ad markup with 1.23</script>",
"nurl": "https://example.com/win?price=1.23",
"crid": "creative1",
"w": 300,
"h": 250,
"exp": 300,
"mtype": 1,
"ext": {
"origbidcpm": 1.23,
"origbidcur": "USD",
"prebid": {
"type": "banner"
}
}
}
]
}
],
"cur": "USD",
"ext": {
"responsetimemillis": {
"adport": 0
},
"tmaxrequest": 5000,
"prebid": {
"auctiontimestamp": 0
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
{
"id": "test-auction-request",
"imp": [
{
"id": "imp1",
"banner": {
"format": [
{
"w": 300,
"h": 250
}
]
},
"ext": {
"bidsmind": {
"adUnitId": 1,
"auth": "123456"
}
}
}
],
"site": {
"page": "http://testpage.com"
},
"device": {
"ua": "Mozilla/5.0"
},
"tmax": 5000,
"regs": {
"ext": {
"gdpr": 0
}
}
}
Loading
Loading