Tests: Increase coverage for floors logs tests#3952
Conversation
…nflict' into functional-tests/price-floors-logs
| assert response.ext?.warnings[PREBID]*.message == [WARNING_MESSAGE(message)] | ||
| } | ||
|
|
||
| def "PBS shouldn't emit error in log and response when floors is not in request and floors fetching disabled for account"() { |
There was a problem hiding this comment.
Please add account with disabled fetching
There was a problem hiding this comment.
it's right under comment
| requestFloors << [null, true] | ||
| } | ||
|
|
||
| def "PBS shouldn't emit error in log and response when floor data is empty and floors fetching disabled for account and disabled for request"() { |
There was a problem hiding this comment.
PBS shouldn't emit error in log and response when floor data is empty and floors fetching disabled for account and request
| assert metrics[ALERT_GENERAL] == 1 | ||
|
|
||
| where: | ||
| requestFloors << [null, true] |
There was a problem hiding this comment.
requestEnabledFloors << [null, true]
| config.auction.priceFloors.enabled = true | ||
| config.auction.priceFloors.fetch.enabled = true |
There was a problem hiding this comment.
it's enabled by default in getAccountWithEnabledFetch method
| assert !metrics[ALERT_GENERAL] | ||
|
|
||
| where: | ||
| requestFloors << [null, true] |
| requestFloors << [null, true] | ||
| } | ||
|
|
||
| def "PBS shouldn't emit error in log and response when data is invalid and floors disabled for request"() { |
There was a problem hiding this comment.
This one looks like the same as PBS shouldn't emit error in log and response when floor data is empty and floors fetching disabled for account and disabled for request
| assert !bidResponse.ext?.errors | ||
|
|
||
| and: "PBS shouldn't log a errors" | ||
| def message = 'Price floor rules data must be present' |
There was a problem hiding this comment.
| def message = 'Price floor rules data must be present' | |
| def message = "Price floor rules data must be present" |
| requestFloors << [null, true] | ||
| } | ||
|
|
||
| def "PBS shouldn't emit error in log and response when data is invalid and floors disabled for request"() { |
| def response = floorsPbsService.sendAuctionRequest(bidRequest) | ||
|
|
||
| then: "PBS should log a warning" | ||
| def message = 'Price floor rules data must be present' |
There was a problem hiding this comment.
Minor
| def message = 'Price floor rules data must be present' | |
| def message = "Price floor rules data must be present" |
🔧 Type of changes
✨ What's the context?
What's the context for the changes?
🧠 Rationale behind the change
Why did you choose to make these changes? Were there any trade-offs you had to consider?
🔎 New Bid Adapter Checklist
🧪 Test plan
How do you know the changes are safe to ship to production?
🏎 Quality check