Skip to content
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

Move the container creation from the parameterization block to the test #1719

Merged
merged 1 commit into from
Feb 7, 2022
Merged
Changes from all 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
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,10 @@ class DebugSpec extends BaseSpec {
}

def "PBS should return debug information when bidder-level setting debug.allowed = #debugAllowedConfig and account-level setting debug-allowed = #debugAllowedAccount is overridden by x-pbs-debug-override header"() {
given: "Default basic generic BidRequest"
given: "PBS with debug configuration"
def pbsService = pbsServiceFactory.getService(pbdConfig)

and: "Default basic generic BidRequest"
def bidRequest = BidRequest.defaultBidRequest
bidRequest.ext.prebid.debug = 1

Expand All @@ -197,7 +200,7 @@ class DebugSpec extends BaseSpec {
accountDao.save(account)

when: "PBS processes auction request"
def response = pbdService.sendAuctionRequest(bidRequest, ["x-pbs-debug-override": overrideToken])
def response = pbsService.sendAuctionRequest(bidRequest, ["x-pbs-debug-override": overrideToken])

then: "Response should contain ext.debug"
assert response.ext?.debug?.httpcalls[BidderName.GENERIC.value]
Expand All @@ -206,13 +209,13 @@ class DebugSpec extends BaseSpec {
assert !response.ext?.warnings

where:
debugAllowedConfig | debugAllowedAccount | pbdService
false | true | pbsServiceFactory.getService(["debug.override-token" : overrideToken,
"adapters.generic.debug.allow": "false"])
true | false | pbsServiceFactory.getService(["debug.override-token" : overrideToken,
"adapters.generic.debug.allow": "true"])
false | false | pbsServiceFactory.getService(["debug.override-token" : overrideToken,
"adapters.generic.debug.allow": "false"])
debugAllowedConfig | debugAllowedAccount | pbdConfig
false | true | ["debug.override-token" : overrideToken,
"adapters.generic.debug.allow": "false"]
true | false | ["debug.override-token" : overrideToken,
"adapters.generic.debug.allow": "true"]
false | false | ["debug.override-token" : overrideToken,
"adapters.generic.debug.allow": "false"]
}

def "PBS should not return debug information when x-pbs-debug-override header is incorrect"() {
Expand Down