-
Notifications
You must be signed in to change notification settings - Fork 224
Adverxo: New adapter ported from Go #3705
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 2 commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
ae9b2f2
AdverxoTest does not work
przemkaczmarek 50062ce
fix checkstyle
przemkaczmarek 84a0490
Fix tests
przemkaczmarek 61c230f
fix clean code
przemkaczmarek 2be2f83
fix comments
przemkaczmarek a333369
fix comments
przemkaczmarek 37ee752
fix comments
przemkaczmarek c21a5aa
removing params in integration tests
przemkaczmarek 86b00f3
fix comments
przemkaczmarek 97c61ec
fix comments
przemkaczmarek aab6750
fix comments
przemkaczmarek 6f0427d
fix comments
przemkaczmarek File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -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: | ||
CTMBNara marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| enabled: true | ||
|
||
| cookie-family-name: adverxo | ||
| iframe: | ||
CTMBNara marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| 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: | ||
CTMBNara marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| 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' | ||
CTMBNara marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| 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: | ||
CTMBNara marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| enabled: true | ||
| cookie-family-name: adverxo | ||
CTMBNara marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| 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: | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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")); | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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")); | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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")); | ||
| } | ||
| } |
51 changes: 51 additions & 0 deletions
51
src/test/resources/org/prebid/server/it/openrtb2/adport/test-adport-bid-request.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 | ||
| } | ||
| } | ||
| } |
40 changes: 40 additions & 0 deletions
40
src/test/resources/org/prebid/server/it/openrtb2/adport/test-adport-bid-response.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 | ||
| } | ||
| } | ||
| } |
34 changes: 34 additions & 0 deletions
34
src/test/resources/org/prebid/server/it/openrtb2/adport/test-auction-adport-request.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 | ||
| } | ||
| } | ||
| } |
40 changes: 40 additions & 0 deletions
40
src/test/resources/org/prebid/server/it/openrtb2/adport/test-auction-adport-response.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 | ||
| } | ||
| } | ||
| } |
34 changes: 34 additions & 0 deletions
34
src/test/resources/org/prebid/server/it/openrtb2/bidsmind/test-auction-bidsmind-request.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 | ||
| } | ||
| } | ||
| } |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.