-
Notifications
You must be signed in to change notification settings - Fork 175
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
Add tests for Zero Non Deal Bids Warning Only in Debug #3528
Add tests for Zero Non Deal Bids Warning Only in Debug #3528
Conversation
it.dooh = Dooh.defaultDooh | ||
}, |
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.
Update style please
test = 0 | ||
ext.prebid.debug = 0 |
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.
If you don't mind, please make test and debug like enum DISABLED(0), ENABLED(1)
then: "Invalid bid should be deleted" | ||
assert response.seatbid.size() == 0 | ||
|
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.
Strangely, seat bid is not about invalid bids, better to check the seatNonBid field.
def bidResponse = BidResponse.getDefaultBidResponse(bidRequest) | ||
def bid = bidResponse.seatbid.first().bid.first() | ||
bid.dealid = dealId | ||
bid.price = bidPrice |
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.
def bidResponse = BidResponse.getDefaultBidResponse(bidRequest).tap{
it.bid.tap{
dealid = dealId
price = bidPrice
}
}
1 | 0 | null | null | ||
} | ||
|
||
def "PBS should drop invalid bid without debug error when request debug disabled and bid price is #bidPrice and deal id is #dealId"() { |
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.
Did the bidder call happen in such case?
def "PBS should update 'adapter.generic.requests.bid_validation' metric when bid validation error appears"() { | ||
given: "Initial 'adapter.generic.requests.bid_validation' metric value" | ||
def initialMetricValue = getCurrentMetricValue(defaultPbsService, "adapter.generic.requests.bid_validation") | ||
def "PBS should only drop invalid bid without discarding whole seat without debug error when request debug disabled "() { |
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.
Please add a test to the end of the spec.
then: "Invalid bids should be deleted" | ||
assert response.seatbid?.first()?.bid*.id == [validBidId] |
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.
Better description: "Bid response contains only valid bid"
🔧 Type of changes
✨ What's the context?
What's the context for the changes? Are there any
🧠 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