-
Notifications
You must be signed in to change notification settings - Fork 224
Test: Bidder Specific Imp Level Params Should Apply to a Specific Alias #4195
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
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -19,6 +19,7 @@ import static org.prebid.server.functional.model.bidder.BidderName.OPENX | |
| import static org.prebid.server.functional.model.bidder.BidderName.RUBICON | ||
| import static org.prebid.server.functional.model.bidder.BidderName.UNKNOWN | ||
| import static org.prebid.server.functional.model.bidder.BidderName.WILDCARD | ||
| import static org.prebid.server.functional.model.response.auction.ErrorType.GENER_X | ||
|
||
| import static org.prebid.server.functional.model.response.auction.ErrorType.PREBID | ||
| import static org.prebid.server.functional.testcontainers.Dependencies.getNetworkServiceContainer | ||
|
|
||
|
|
@@ -131,6 +132,42 @@ class ImpRequestSpec extends BaseSpec { | |
| ALIAS_CAMEL_CASE | GENERIC_CAMEL_CASE | ||
| } | ||
|
|
||
| def "PBS should update imp fields only for specific alias when request has multiple aliases"() { | ||
| given: "Default basic BidRequest" | ||
| def storedPmp = Pmp.defaultPmp | ||
| def originalPmp = Pmp.defaultPmp | ||
| def bidRequest = BidRequest.defaultBidRequest.tap { | ||
| imp.first.tap { | ||
| bidFloor = 15 | ||
|
||
| pmp = originalPmp | ||
| ext.prebid.imp = [(aliasName): new Imp(pmp: storedPmp)] | ||
| ext.prebid.bidder.generic = null | ||
| ext.prebid.bidder.generX = new Generic() | ||
| ext.prebid.bidder.alias = new Generic() | ||
| } | ||
| ext.prebid.aliases = [(GENER_X.value): bidderName, | ||
| (aliasName.value): bidderName, | ||
| ] | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Formating |
||
| } | ||
|
|
||
| when: "Requesting PBS auction" | ||
| def response = defaultPbsService.sendAuctionRequest(bidRequest) | ||
|
|
||
| then: "BidderRequest should update imp information for specific alias" | ||
| def bidderRequests = getRequests(response) | ||
| assert bidderRequests[ALIAS.value].imp.pmp.flatten() == [storedPmp] | ||
marki1an marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| and: "Left original information for other" | ||
| assert bidderRequests[GENER_X.value].imp.pmp.flatten() == [originalPmp] | ||
|
|
||
| where: | ||
| aliasName | bidderName | ||
| ALIAS | GENERIC | ||
| ALIAS_CAMEL_CASE | GENERIC | ||
| ALIAS | GENERIC_CAMEL_CASE | ||
| ALIAS_CAMEL_CASE | GENERIC_CAMEL_CASE | ||
| } | ||
|
|
||
| def "PBS shouldn't update imp fields when imp.ext.prebid.imp contain only bidder with invalid name"() { | ||
| given: "Default basic BidRequest" | ||
| def impPmp = Pmp.defaultPmp | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove from here