Skip to content

Commit

Permalink
Fix functional tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
CTMBNara committed Jan 30, 2024
1 parent 06866c1 commit ad8611f
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ enum ActivityType {
REPORT_ANALYTICS("reportAnalytics"),
TRANSMIT_UFPD("transmitUfpd"),
TRANSMIT_PRECISE_GEO("transmitPreciseGeo"),
TRANSMIT_TID("transmitTid")
TRANSMIT_TID("transmitTid"),
TRANSMIT_EIDS("transmitEids"),

@JsonValue
final String value
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,8 +128,8 @@ class GppTransmitUfpdActivitiesSpec extends PrivacyBaseSpec {

and: "Metrics processed across activities should be updated"
def metrics = activityPbsService.sendCollectedMetricsRequest()
assert metrics[ACTIVITY_RULES_PROCESSED_COUNT] == 1
assert metrics[ACTIVITY_PROCESSED_RULES_FOR_ACCOUNT.formatted(accountId)] == 1
assert metrics[ACTIVITY_RULES_PROCESSED_COUNT] == 2
assert metrics[ACTIVITY_PROCESSED_RULES_FOR_ACCOUNT.formatted(accountId)] == 2
}

def "PBS auction call when transmit UFPD activities is rejecting requests should remove UFPD fields in request and update disallowed metrics"() {
Expand Down Expand Up @@ -377,8 +377,8 @@ class GppTransmitUfpdActivitiesSpec extends PrivacyBaseSpec {

and: "Metrics processed across activities should be updated"
def metrics = activityPbsService.sendCollectedMetricsRequest()
assert metrics[ACTIVITY_RULES_PROCESSED_COUNT] == 1
assert metrics[ACTIVITY_PROCESSED_RULES_FOR_ACCOUNT.formatted(accountId)] == 1
assert metrics[ACTIVITY_RULES_PROCESSED_COUNT] == 2
assert metrics[ACTIVITY_PROCESSED_RULES_FOR_ACCOUNT.formatted(accountId)] == 2

where:
regsGppSid | conditionGppSid
Expand Down Expand Up @@ -494,8 +494,8 @@ class GppTransmitUfpdActivitiesSpec extends PrivacyBaseSpec {

and: "Metrics processed across activities should be updated"
def metrics = activityPbsService.sendCollectedMetricsRequest()
assert metrics[ACTIVITY_RULES_PROCESSED_COUNT] == 1
assert metrics[ACTIVITY_PROCESSED_RULES_FOR_ACCOUNT.formatted(accountId)] == 1
assert metrics[ACTIVITY_RULES_PROCESSED_COUNT] == 2
assert metrics[ACTIVITY_PROCESSED_RULES_FOR_ACCOUNT.formatted(accountId)] == 2

where:
deviceGeo | conditionGeo
Expand Down Expand Up @@ -619,8 +619,8 @@ class GppTransmitUfpdActivitiesSpec extends PrivacyBaseSpec {

and: "Metrics processed across activities should be updated"
def metrics = activityPbsService.sendCollectedMetricsRequest()
assert metrics[ACTIVITY_RULES_PROCESSED_COUNT] == 1
assert metrics[ACTIVITY_PROCESSED_RULES_FOR_ACCOUNT.formatted(accountId)] == 1
assert metrics[ACTIVITY_RULES_PROCESSED_COUNT] == 2
assert metrics[ACTIVITY_PROCESSED_RULES_FOR_ACCOUNT.formatted(accountId)] == 2
}

def "PBS auction should disallowed rule when regs.ext.gpc intersection with condition.gpc"() {
Expand Down Expand Up @@ -732,8 +732,8 @@ class GppTransmitUfpdActivitiesSpec extends PrivacyBaseSpec {

and: "Metrics processed across activities should be updated"
def metrics = activityPbsService.sendCollectedMetricsRequest()
assert metrics[ACTIVITY_RULES_PROCESSED_COUNT] == 1
assert metrics[ACTIVITY_PROCESSED_RULES_FOR_ACCOUNT.formatted(accountId)] == 1
assert metrics[ACTIVITY_RULES_PROCESSED_COUNT] == 2
assert metrics[ACTIVITY_PROCESSED_RULES_FOR_ACCOUNT.formatted(accountId)] == 2
}

def "PBS auction should disallowed rule when header gpc intersection with condition.gpc"() {
Expand Down Expand Up @@ -1528,7 +1528,7 @@ class GppTransmitUfpdActivitiesSpec extends PrivacyBaseSpec {

and: "Metrics processed across activities should be updated"
def metrics = activityPbsService.sendCollectedMetricsRequest()
assert metrics[ACTIVITY_RULES_PROCESSED_COUNT] == 1
assert metrics[ACTIVITY_RULES_PROCESSED_COUNT] == 2
}

def "PBS amp call when transmit UFPD activities is rejecting request should remove UFPD fields field in active request and update disallowed metrics"() {
Expand Down Expand Up @@ -1885,7 +1885,7 @@ class GppTransmitUfpdActivitiesSpec extends PrivacyBaseSpec {

and: "Metrics processed across activities should be updated"
def metrics = activityPbsService.sendCollectedMetricsRequest()
assert metrics[ACTIVITY_RULES_PROCESSED_COUNT] == 1
assert metrics[ACTIVITY_RULES_PROCESSED_COUNT] == 2
}

def "PBS amp call when privacy regulation match and rejecting should remove UFPD fields in request"() {
Expand Down Expand Up @@ -2688,6 +2688,7 @@ class GppTransmitUfpdActivitiesSpec extends PrivacyBaseSpec {
dpidmd5 = PBSUtils.randomString
}
it.user = User.defaultUser
it.user.customdata = PBSUtils.randomString
it.user.eids = [Eid.defaultEid]
it.user.data = [new Data(name: PBSUtils.randomString)]
it.user.buyeruid = PBSUtils.randomString
Expand Down

0 comments on commit ad8611f

Please sign in to comment.