Skip to content

Commit

Permalink
Update GPP functional test to be in-line with the new GPP library names
Browse files Browse the repository at this point in the history
  • Loading branch information
Net-burst committed Apr 22, 2024
1 parent 46c2f5f commit 67b6df5
Show file tree
Hide file tree
Showing 9 changed files with 650 additions and 650 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class GppModuleConfig {
List<GppSectionId> skipSids

static GppModuleConfig getDefaultModuleConfig(ActivityConfig activityConfig = ActivityConfig.configWithDefaultRestrictRules,
List<GppSectionId> sids = [GppSectionId.USP_NAT_V1],
List<GppSectionId> sids = [GppSectionId.US_NAT_V1],
Boolean normalizeFlags = true) {
new GppModuleConfig().tap {
it.activityConfig = [activityConfig]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@ enum GppSectionId {
HEADER_V1(HeaderV1.ID),
TCF_CA_V1(TcfCaV1.ID),
USP_V1(UspV1.ID),
USP_NAT_V1(UsNatV1.ID),
USP_CA_V1(UsCaV1.ID),
USP_VA_V1(UsVaV1.ID),
USP_CO_V1(UsCoV1.ID),
USP_UT_V1(UsUtV1.ID),
USP_CT_V1(UsCtV1.ID)
US_NAT_V1(UsNatV1.ID),
US_CA_V1(UsCaV1.ID),
US_VA_V1(UsVaV1.ID),
US_CO_V1(UsCoV1.ID),
US_UT_V1(UsUtV1.ID),
US_CT_V1(UsCtV1.ID)

@JsonValue
final Integer value
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ import org.prebid.server.functional.util.privacy.gpp.UsNatV1Consent
import static org.prebid.server.functional.model.bidder.BidderName.GENERIC
import static org.prebid.server.functional.model.pricefloors.Country.CAN
import static org.prebid.server.functional.model.pricefloors.Country.USA
import static org.prebid.server.functional.model.request.GppSectionId.USP_CA_V1
import static org.prebid.server.functional.model.request.GppSectionId.USP_CO_V1
import static org.prebid.server.functional.model.request.GppSectionId.US_CA_V1
import static org.prebid.server.functional.model.request.GppSectionId.US_CO_V1
import static org.prebid.server.functional.model.request.auction.ActivityType.FETCH_BIDS
import static org.prebid.server.functional.model.request.auction.ActivityType.TRANSMIT_PRECISE_GEO
import static org.prebid.server.functional.model.request.auction.ActivityType.TRANSMIT_TID
Expand Down Expand Up @@ -193,14 +193,14 @@ class ActivityTraceLogSpec extends PrivacyBaseSpec {
ext.prebid.trace = VERBOSE
device = new Device(geo: new Geo(country: USA, region: ALABAMA.abbreviation))
regs.ext.gpc = PBSUtils.randomString
regs.gppSid = [USP_CA_V1.intValue]
regs.gppSid = [US_CA_V1.intValue]
setAccountId(accountId)
}

and: "Set up activities"
def gpc = PBSUtils.randomString
def condition = Condition.baseCondition.tap {
it.gppSid = [USP_CO_V1.intValue]
it.gppSid = [US_CO_V1.intValue]
it.gpc = gpc
it.geo = [CAN.withState(ARIZONA)]
}
Expand Down Expand Up @@ -299,7 +299,7 @@ class ActivityTraceLogSpec extends PrivacyBaseSpec {
ext.prebid.trace = VERBOSE
device = new Device(geo: new Geo(country: USA, region: ALABAMA.abbreviation))
regs.ext.gpc = PBSUtils.randomString
regs.gppSid = [USP_CA_V1.intValue]
regs.gppSid = [US_CA_V1.intValue]
regs.gpp = new UsNatV1Consent.Builder().setGpc(true).build()
setAccountId(accountId)
}
Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import org.prebid.server.functional.util.privacy.gpp.TcfEuV2Consent
import org.prebid.server.functional.util.privacy.gpp.UspV1Consent

import static org.prebid.server.functional.model.bidder.BidderName.GENERIC
import static org.prebid.server.functional.model.request.GppSectionId.USP_NAT_V1
import static org.prebid.server.functional.model.request.GppSectionId.US_NAT_V1
import static org.prebid.server.functional.util.privacy.TcfConsent.GENERIC_VENDOR_ID

class GppSetUidSpec extends PrivacyBaseSpec {
Expand All @@ -18,7 +18,7 @@ class GppSetUidSpec extends PrivacyBaseSpec {
given: "Set uid request with invalid GPP"
def setUidRequest = SetuidRequest.defaultSetuidRequest.tap {
it.gpp = "Invalid_GPP_Consent_String"
it.gppSid = USP_NAT_V1.value
it.gppSid = US_NAT_V1.value
it.uid = UUID.randomUUID().toString()
it.gdpr = null
it.gdprConsent = null
Expand Down

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

0 comments on commit 67b6df5

Please sign in to comment.