Skip to content

Commit 1dd7157

Browse files
committed
Add functional tests for /get endpoint parameters
1 parent 5a880fb commit 1dd7157

10 files changed

Lines changed: 2653 additions & 20 deletions

File tree

src/test/groovy/org/prebid/server/functional/model/request/auction/DeviceExt.groovy

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
package org.prebid.server.functional.model.request.auction
22

3+
import com.fasterxml.jackson.annotation.JsonProperty
34
import com.fasterxml.jackson.annotation.JsonValue
45
import groovy.transform.ToString
56

@@ -8,6 +9,8 @@ class DeviceExt {
89

910
Atts atts
1011
String cdep
12+
@JsonProperty("ifa_type")
13+
String ifaType
1114

1215
enum Atts {
1316

src/test/groovy/org/prebid/server/functional/model/request/auction/Prebid.groovy

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,8 @@ class Prebid {
4949
List<String> profileNames
5050
@JsonProperty("kvps")
5151
Map<String, String> keyValuePairs
52+
String outputFormat
53+
String outputModule
5254

5355
static class Channel {
5456

src/test/groovy/org/prebid/server/functional/model/request/auction/Regs.groovy

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ class Regs {
1010

1111
Integer coppa
1212
Integer gdpr
13+
Integer gpc
1314
String usPrivacy
1415
String gpp
1516
List<Integer> gppSid

src/test/groovy/org/prebid/server/functional/model/request/get/GeneralGetRequest.groovy

Lines changed: 20 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@ package org.prebid.server.functional.model.request.get
33
import com.fasterxml.jackson.annotation.JsonProperty
44
import org.prebid.server.functional.model.request.amp.ConsentType
55
import org.prebid.server.functional.model.request.auction.DebugCondition
6+
import org.prebid.server.functional.model.request.auction.DeviceType
7+
import org.prebid.server.functional.model.request.auction.VideoPlacementSubtypes
8+
import org.prebid.server.functional.model.request.auction.VideoPlcmtSubtype
69
import org.prebid.server.functional.util.PBSUtils
710

811
import static org.prebid.server.functional.model.request.auction.DebugCondition.ENABLED
@@ -82,7 +85,7 @@ class GeneralGetRequest {
8285
List<Integer> delivery
8386

8487
@JsonProperty("linearity")
85-
Integer linearityMode
88+
Integer linearity
8689

8790
@JsonProperty("minbr")
8891
Integer minBitrate
@@ -145,13 +148,13 @@ class GeneralGetRequest {
145148
Integer normalizedVolume
146149

147150
@JsonProperty("placement")
148-
Integer placement
151+
VideoPlacementSubtypes placement
149152

150153
@JsonProperty("plcmt")
151-
Integer placementSubtype
154+
VideoPlcmtSubtype placementSubtype
152155

153156
@JsonProperty("playbackend")
154-
Integer playbackEndMode
157+
Integer playbackEnd
155158

156159
@JsonProperty("playbackmethod")
157160
List<Integer> playbackMethods
@@ -172,19 +175,19 @@ class GeneralGetRequest {
172175
String targeting
173176

174177
@JsonProperty("consent")
175-
String gppConsent
178+
String consent
176179

177180
@JsonProperty("gdpr_consent")
178-
String gppConsentLegacy
181+
String consentLegacy
179182

180183
@JsonProperty("consent_string")
181-
String gppConsentStringLegacy
184+
String consentStringLegacy
182185

183186
@JsonProperty("gdpr")
184187
Integer gdpr
185188

186189
@JsonProperty("privacy")
187-
Integer privacy
190+
Integer gdprPrivacy
188191

189192
@JsonProperty("gdpr_applies")
190193
String gdprApplies
@@ -199,10 +202,10 @@ class GeneralGetRequest {
199202
ConsentType consentType
200203

201204
@JsonProperty("gpp_sid")
202-
Integer gppSid
205+
List<Integer> gppSid
203206

204207
@JsonProperty("coppa")
205-
Integer coppaFlag
208+
Integer coppa
206209

207210
@JsonProperty("gpc")
208211
Integer globalPrivacyControl
@@ -244,7 +247,7 @@ class GeneralGetRequest {
244247
Integer contentCategory
245248

246249
@JsonProperty("ccattax")
247-
List<String> contentCategoryTaxonomy
250+
List<Integer> contentCategoryTaxonomy
248251

249252
@JsonProperty("cseries")
250253
String contentSeries
@@ -268,7 +271,7 @@ class GeneralGetRequest {
268271
String deviceUa
269272

270273
@JsonProperty("dtype")
271-
String deviceType
274+
DeviceType deviceType
272275

273276
@JsonProperty("ifa")
274277
String deviceIfa
@@ -287,6 +290,10 @@ class GeneralGetRequest {
287290
}
288291

289292
String resolveStoredRequestId() {
290-
storedRequestId != null ? storedRequestId : storedRequestIdLegacy
293+
storedRequestId ?: storedRequestIdLegacy
294+
}
295+
296+
String resolveAccountId() {
297+
accountId ?: accountIdLegacy
291298
}
292299
}

0 commit comments

Comments
 (0)