diff --git a/src/test/groovy/org/prebid/server/functional/tests/SetUidSpec.groovy b/src/test/groovy/org/prebid/server/functional/tests/SetUidSpec.groovy index d8cf909537d..9d00e2470e9 100644 --- a/src/test/groovy/org/prebid/server/functional/tests/SetUidSpec.groovy +++ b/src/test/groovy/org/prebid/server/functional/tests/SetUidSpec.groovy @@ -15,6 +15,7 @@ import java.time.Clock import java.time.ZonedDateTime import java.time.temporal.ChronoUnit +import static org.prebid.server.functional.model.bidder.BidderName.ALIAS import static org.prebid.server.functional.model.bidder.BidderName.ALIAS_CAMEL_CASE import static org.prebid.server.functional.model.bidder.BidderName.APPNEXUS import static org.prebid.server.functional.model.bidder.BidderName.GENERIC @@ -385,7 +386,23 @@ class SetUidSpec extends BaseSpec { assert exception.responseBody == 'Invalid request format: "bidder" query param is invalid' where: - bidderName << [UNKNOWN, WILDCARD, GENERIC_CAMEL_CASE, ALIAS_CAMEL_CASE] + bidderName << [UNKNOWN, WILDCARD] + } + + def "PBS setuid should treat bidder name as case insensitive"() { + given: "Default SetuidRequest" + def request = SetuidRequest.getDefaultSetuidRequest().tap { + it.bidder = bidderName + } + + when: "PBS processes setuid request" + def response = singleCookiesPbsService.sendSetUidRequest(request, UidsCookie.defaultUidsCookie) + + then: "Response should contain requested tempUIDs" + assert response.uidsCookie.tempUIDs[GENERIC] + + where: + bidderName << [GENERIC, ALIAS, GENERIC_CAMEL_CASE, ALIAS_CAMEL_CASE] } def "PBS should throw an exception when incoming request have optout flag"() { diff --git a/src/test/groovy/org/prebid/server/functional/tests/privacy/gpp/GppAmpSpec.groovy b/src/test/groovy/org/prebid/server/functional/tests/privacy/gpp/GppAmpSpec.groovy index 2813af53e97..73e966d61db 100644 --- a/src/test/groovy/org/prebid/server/functional/tests/privacy/gpp/GppAmpSpec.groovy +++ b/src/test/groovy/org/prebid/server/functional/tests/privacy/gpp/GppAmpSpec.groovy @@ -68,7 +68,7 @@ class GppAmpSpec extends PrivacyBaseSpec { def "PBS shouldn't populate bid request with regs when consent type is GPP and gppSid contain invalid value"() { given: "Default AmpRequest with consent_type = gpp" - def consentString = PBSUtils.randomString + def consentString = getInvalidGppString() def gppSids = "${TCF_EU_V2.value},${PBSUtils.randomString}" as String def ampRequest = getGppAmpRequest(consentString, gppSids) def ampStoredRequest = BidRequest.defaultBidRequest.tap { @@ -94,7 +94,7 @@ class GppAmpSpec extends PrivacyBaseSpec { def "PBS should emit warning when consent_string is invalid"() { given: "Default amp request with invalid consent_string" - def invalidConsentString = "Invalid_Consent_String" + def invalidConsentString = getInvalidGppString() def ampRequest = AmpRequest.defaultAmpRequest.tap { it.consentString = invalidConsentString consentType = GPP