diff --git a/pom.xml b/pom.xml index 77687dbaf52..73e7a7e8bc6 100644 --- a/pom.xml +++ b/pom.xml @@ -60,14 +60,14 @@ 4.0.0 3.21.0 2.31.0 - 4.1.0 + 4.1.1 9.4.44.v20210927 4.4.0 2.1.210 2.0-groovy-3.0 - 1.16.2 + 1.16.3 5.11.2 - 2.16.1 + 2.17.2 1.9.7 1.4.200 1.11.19 diff --git a/src/test/groovy/org/prebid/server/functional/model/deals/lineitem/LineItem.groovy b/src/test/groovy/org/prebid/server/functional/model/deals/lineitem/LineItem.groovy index 4f23c7e02ac..43051f0ab50 100644 --- a/src/test/groovy/org/prebid/server/functional/model/deals/lineitem/LineItem.groovy +++ b/src/test/groovy/org/prebid/server/functional/model/deals/lineitem/LineItem.groovy @@ -8,7 +8,7 @@ import org.prebid.server.functional.util.PBSUtils import java.time.ZoneId import java.time.ZonedDateTime -import static Status.ACTIVE +import static LineItemStatus.ACTIVE import static java.time.ZoneOffset.UTC import static org.prebid.server.functional.model.bidder.BidderName.GENERIC import static org.prebid.server.functional.model.deals.lineitem.RelativePriority.VERY_HIGH @@ -43,7 +43,7 @@ class LineItem { @JsonFormat(pattern = TIME_PATTERN) ZonedDateTime updatedTimeStamp - Status status + LineItemStatus status List frequencyCaps diff --git a/src/test/groovy/org/prebid/server/functional/model/deals/lineitem/LineItemSize.groovy b/src/test/groovy/org/prebid/server/functional/model/deals/lineitem/LineItemSize.groovy index c50b9fd4d58..2ff7af18dec 100644 --- a/src/test/groovy/org/prebid/server/functional/model/deals/lineitem/LineItemSize.groovy +++ b/src/test/groovy/org/prebid/server/functional/model/deals/lineitem/LineItemSize.groovy @@ -1,12 +1,8 @@ package org.prebid.server.functional.model.deals.lineitem -import com.fasterxml.jackson.annotation.JsonInclude import groovy.transform.ToString -import static com.fasterxml.jackson.annotation.JsonInclude.Include.ALWAYS - @ToString(includeNames = true) -@JsonInclude(content = ALWAYS) class LineItemSize { Integer w diff --git a/src/test/groovy/org/prebid/server/functional/model/deals/lineitem/Status.groovy b/src/test/groovy/org/prebid/server/functional/model/deals/lineitem/LineItemStatus.groovy similarity index 82% rename from src/test/groovy/org/prebid/server/functional/model/deals/lineitem/Status.groovy rename to src/test/groovy/org/prebid/server/functional/model/deals/lineitem/LineItemStatus.groovy index f6c5e5f884d..c2dded2d3d2 100644 --- a/src/test/groovy/org/prebid/server/functional/model/deals/lineitem/Status.groovy +++ b/src/test/groovy/org/prebid/server/functional/model/deals/lineitem/LineItemStatus.groovy @@ -2,7 +2,7 @@ package org.prebid.server.functional.model.deals.lineitem import com.fasterxml.jackson.annotation.JsonValue -enum Status { +enum LineItemStatus { ACTIVE("active"), DELETED("deleted"), @@ -11,7 +11,7 @@ enum Status { @JsonValue final String value - private Status(String value) { + private LineItemStatus(String value) { this.value = value } diff --git a/src/test/groovy/org/prebid/server/functional/model/deals/register/CurrencyServiceState.groovy b/src/test/groovy/org/prebid/server/functional/model/deals/register/CurrencyServiceState.groovy index df2731249f4..4c0db24acd3 100644 --- a/src/test/groovy/org/prebid/server/functional/model/deals/register/CurrencyServiceState.groovy +++ b/src/test/groovy/org/prebid/server/functional/model/deals/register/CurrencyServiceState.groovy @@ -4,7 +4,7 @@ import groovy.transform.ToString import java.time.ZonedDateTime -@ToString(includeNames = true) +@ToString(includeNames = true, ignoreNulls = true) class CurrencyServiceState { ZonedDateTime lastUpdate diff --git a/src/test/groovy/org/prebid/server/functional/model/deals/userdata/UserDetailsResponse.groovy b/src/test/groovy/org/prebid/server/functional/model/deals/userdata/UserDetailsResponse.groovy index 864cfe7a290..143aee234d9 100644 --- a/src/test/groovy/org/prebid/server/functional/model/deals/userdata/UserDetailsResponse.groovy +++ b/src/test/groovy/org/prebid/server/functional/model/deals/userdata/UserDetailsResponse.groovy @@ -3,7 +3,7 @@ package org.prebid.server.functional.model.deals.userdata import groovy.transform.ToString import org.prebid.server.functional.model.ResponseModel -@ToString(includeNames = true) +@ToString(includeNames = true, ignoreNulls = true) class UserDetailsResponse implements ResponseModel { User user diff --git a/src/test/groovy/org/prebid/server/functional/model/request/amp/AmpRequest.groovy b/src/test/groovy/org/prebid/server/functional/model/request/amp/AmpRequest.groovy index b4b8db9c7ae..99aeb50d2c7 100644 --- a/src/test/groovy/org/prebid/server/functional/model/request/amp/AmpRequest.groovy +++ b/src/test/groovy/org/prebid/server/functional/model/request/amp/AmpRequest.groovy @@ -4,7 +4,6 @@ import com.fasterxml.jackson.databind.PropertyNamingStrategies import com.fasterxml.jackson.databind.annotation.JsonNaming import groovy.transform.ToString import org.prebid.server.functional.util.PBSUtils -import org.prebid.server.functional.util.privacy.ConsentString @ToString(includeNames = true, ignoreNulls = true) @JsonNaming(PropertyNamingStrategies.SnakeCaseStrategy) diff --git a/src/test/groovy/org/prebid/server/functional/model/request/auction/AppExt.groovy b/src/test/groovy/org/prebid/server/functional/model/request/auction/AppExt.groovy index 4cb3b38dac5..b31926c14b5 100644 --- a/src/test/groovy/org/prebid/server/functional/model/request/auction/AppExt.groovy +++ b/src/test/groovy/org/prebid/server/functional/model/request/auction/AppExt.groovy @@ -1,5 +1,8 @@ package org.prebid.server.functional.model.request.auction +import groovy.transform.ToString + +@ToString(includeNames = true, ignoreNulls = true) class AppExt { AppExtData data diff --git a/src/test/groovy/org/prebid/server/functional/model/request/auction/AppExtData.groovy b/src/test/groovy/org/prebid/server/functional/model/request/auction/AppExtData.groovy index 6cdc86d35e5..3d12506410c 100644 --- a/src/test/groovy/org/prebid/server/functional/model/request/auction/AppExtData.groovy +++ b/src/test/groovy/org/prebid/server/functional/model/request/auction/AppExtData.groovy @@ -1,5 +1,8 @@ package org.prebid.server.functional.model.request.auction +import groovy.transform.ToString + +@ToString(includeNames = true, ignoreNulls = true) class AppExtData { String language diff --git a/src/test/groovy/org/prebid/server/functional/model/request/auction/DealExt.groovy b/src/test/groovy/org/prebid/server/functional/model/request/auction/DealExt.groovy index cbb9913acb4..90b57aa8fb9 100644 --- a/src/test/groovy/org/prebid/server/functional/model/request/auction/DealExt.groovy +++ b/src/test/groovy/org/prebid/server/functional/model/request/auction/DealExt.groovy @@ -5,5 +5,5 @@ import groovy.transform.ToString @ToString(includeNames = true) class DealExt { - DealLine line + DealLineItem line } diff --git a/src/test/groovy/org/prebid/server/functional/model/request/auction/DealLine.groovy b/src/test/groovy/org/prebid/server/functional/model/request/auction/DealLineItem.groovy similarity index 95% rename from src/test/groovy/org/prebid/server/functional/model/request/auction/DealLine.groovy rename to src/test/groovy/org/prebid/server/functional/model/request/auction/DealLineItem.groovy index 364d251f404..4ab7823193c 100644 --- a/src/test/groovy/org/prebid/server/functional/model/request/auction/DealLine.groovy +++ b/src/test/groovy/org/prebid/server/functional/model/request/auction/DealLineItem.groovy @@ -6,7 +6,7 @@ import groovy.transform.ToString @ToString(includeNames = true, ignoreNulls = true) @JsonNaming(PropertyNamingStrategies.LowerCaseStrategy) -class DealLine { +class DealLineItem { String lineItemId String extLineItemId diff --git a/src/test/groovy/org/prebid/server/functional/model/request/auction/ImpExtContext.groovy b/src/test/groovy/org/prebid/server/functional/model/request/auction/ImpExtContext.groovy index 66940990ade..bff08aa290b 100644 --- a/src/test/groovy/org/prebid/server/functional/model/request/auction/ImpExtContext.groovy +++ b/src/test/groovy/org/prebid/server/functional/model/request/auction/ImpExtContext.groovy @@ -1,5 +1,8 @@ package org.prebid.server.functional.model.request.auction +import groovy.transform.ToString + +@ToString(includeNames = true, ignoreNulls = true) class ImpExtContext { ImpExtContextData data diff --git a/src/test/groovy/org/prebid/server/functional/model/request/auction/ImpExtContextData.groovy b/src/test/groovy/org/prebid/server/functional/model/request/auction/ImpExtContextData.groovy index ae130fd85d9..f63b32f2833 100644 --- a/src/test/groovy/org/prebid/server/functional/model/request/auction/ImpExtContextData.groovy +++ b/src/test/groovy/org/prebid/server/functional/model/request/auction/ImpExtContextData.groovy @@ -1,5 +1,8 @@ package org.prebid.server.functional.model.request.auction +import groovy.transform.ToString + +@ToString(includeNames = true, ignoreNulls = true) class ImpExtContextData { String language diff --git a/src/test/groovy/org/prebid/server/functional/model/request/auction/SiteExtData.groovy b/src/test/groovy/org/prebid/server/functional/model/request/auction/SiteExtData.groovy index 9e2e82e6d60..09b545b2f32 100644 --- a/src/test/groovy/org/prebid/server/functional/model/request/auction/SiteExtData.groovy +++ b/src/test/groovy/org/prebid/server/functional/model/request/auction/SiteExtData.groovy @@ -1,5 +1,8 @@ package org.prebid.server.functional.model.request.auction +import groovy.transform.ToString + +@ToString(includeNames = true, ignoreNulls = true) class SiteExtData { String language diff --git a/src/test/groovy/org/prebid/server/functional/model/request/auction/UserExtData.groovy b/src/test/groovy/org/prebid/server/functional/model/request/auction/UserExtData.groovy index 0ec8f2e961b..56d69f1e4ce 100644 --- a/src/test/groovy/org/prebid/server/functional/model/request/auction/UserExtData.groovy +++ b/src/test/groovy/org/prebid/server/functional/model/request/auction/UserExtData.groovy @@ -1,5 +1,8 @@ package org.prebid.server.functional.model.request.auction +import groovy.transform.ToString + +@ToString(includeNames = true, ignoreNulls = true) class UserExtData { String language diff --git a/src/test/groovy/org/prebid/server/functional/model/request/dealsupdate/ForceDealsUpdateRequest.groovy b/src/test/groovy/org/prebid/server/functional/model/request/dealsupdate/ForceDealsUpdateRequest.groovy index 3cfdeec72ce..aaa1c0b2ece 100644 --- a/src/test/groovy/org/prebid/server/functional/model/request/dealsupdate/ForceDealsUpdateRequest.groovy +++ b/src/test/groovy/org/prebid/server/functional/model/request/dealsupdate/ForceDealsUpdateRequest.groovy @@ -11,7 +11,7 @@ import static org.prebid.server.functional.model.request.dealsupdate.ForceDealsU import static org.prebid.server.functional.model.request.dealsupdate.ForceDealsUpdateRequest.Action.SEND_REPORT import static org.prebid.server.functional.model.request.dealsupdate.ForceDealsUpdateRequest.Action.UPDATE_LINE_ITEMS -@ToString(includeNames = true) +@ToString(includeNames = true, ignoreNulls = true) @JsonNaming(PropertyNamingStrategies.SnakeCaseStrategy) class ForceDealsUpdateRequest { diff --git a/src/test/groovy/org/prebid/server/functional/testcontainers/PbsServiceFactory.groovy b/src/test/groovy/org/prebid/server/functional/testcontainers/PbsServiceFactory.groovy index 136f16feba2..89d8af6f700 100644 --- a/src/test/groovy/org/prebid/server/functional/testcontainers/PbsServiceFactory.groovy +++ b/src/test/groovy/org/prebid/server/functional/testcontainers/PbsServiceFactory.groovy @@ -6,6 +6,7 @@ import org.prebid.server.functional.testcontainers.container.PrebidServerContain import org.prebid.server.functional.util.ObjectMapperWrapper import org.prebid.server.functional.util.PBSUtils +// TODO make container instance into a POGO and add the ability for any given container to live through stopContainers() class PbsServiceFactory { private static final Map, PrebidServerContainer> containers = [:] diff --git a/src/test/groovy/org/prebid/server/functional/testcontainers/scaffolding/pg/GeneralPlanner.groovy b/src/test/groovy/org/prebid/server/functional/testcontainers/scaffolding/pg/GeneralPlanner.groovy index 0ce77f5a722..03774bd49df 100644 --- a/src/test/groovy/org/prebid/server/functional/testcontainers/scaffolding/pg/GeneralPlanner.groovy +++ b/src/test/groovy/org/prebid/server/functional/testcontainers/scaffolding/pg/GeneralPlanner.groovy @@ -28,7 +28,9 @@ class GeneralPlanner extends NetworkScaffolding { setResponse(statusCode) } - void initPlansResponse(PlansResponse plansResponse, HttpStatusCode statusCode = OK_200, Times times = Times.exactly(1)) { + void initPlansResponse(PlansResponse plansResponse, + HttpStatusCode statusCode = OK_200, + Times times = Times.exactly(1)) { resetPlansEndpoint() setPlansResponse(plansResponse, statusCode, times) } @@ -63,7 +65,9 @@ class GeneralPlanner extends NetworkScaffolding { getLastRecordedRequestHeaders(plansRequest) } - private void setPlansResponse(PlansResponse plansResponse, HttpStatusCode statusCode, Times times = Times.exactly(1)) { + private void setPlansResponse(PlansResponse plansResponse, + HttpStatusCode statusCode, + Times times = Times.exactly(1)) { setResponse(plansRequest, plansResponse, statusCode, times) } diff --git a/src/test/groovy/org/prebid/server/functional/tests/BidderParamsSpec.groovy b/src/test/groovy/org/prebid/server/functional/tests/BidderParamsSpec.groovy index 2866e3a5619..6e33dd5fa0e 100644 --- a/src/test/groovy/org/prebid/server/functional/tests/BidderParamsSpec.groovy +++ b/src/test/groovy/org/prebid/server/functional/tests/BidderParamsSpec.groovy @@ -19,7 +19,6 @@ import org.prebid.server.functional.util.PBSUtils import org.prebid.server.functional.util.privacy.CcpaConsent import static org.prebid.server.functional.model.bidder.BidderName.APPNEXUS -import static org.prebid.server.functional.model.response.auction.ErrorType.PREBID import static org.prebid.server.functional.util.privacy.CcpaConsent.Signal.ENFORCED @PBSTest diff --git a/src/test/groovy/org/prebid/server/functional/tests/HttpSettingsSpec.groovy b/src/test/groovy/org/prebid/server/functional/tests/HttpSettingsSpec.groovy index 86dec7566e2..692a0ffc0fb 100644 --- a/src/test/groovy/org/prebid/server/functional/tests/HttpSettingsSpec.groovy +++ b/src/test/groovy/org/prebid/server/functional/tests/HttpSettingsSpec.groovy @@ -1,12 +1,12 @@ package org.prebid.server.functional.tests +import org.prebid.server.functional.model.UidsCookie import org.prebid.server.functional.model.db.StoredRequest import org.prebid.server.functional.model.mock.services.httpsettings.HttpAccountsResponse import org.prebid.server.functional.model.request.amp.AmpRequest import org.prebid.server.functional.model.request.auction.BidRequest import org.prebid.server.functional.model.request.event.EventRequest import org.prebid.server.functional.model.request.setuid.SetuidRequest -import org.prebid.server.functional.model.UidsCookie import org.prebid.server.functional.model.request.vtrack.VtrackRequest import org.prebid.server.functional.model.request.vtrack.xml.Vast import org.prebid.server.functional.service.PrebidServerException @@ -120,7 +120,8 @@ class HttpSettingsSpec extends BaseSpec { assert response.uidsCookie.bday assert !response.uidsCookie.tempUIDs assert !response.uidsCookie.uids - assert response.responseBody == ResourceUtil.readByteArrayFromClassPath("org/prebid/server/functional/tracking-pixel.png") + assert response.responseBody == + ResourceUtil.readByteArrayFromClassPath("org/prebid/server/functional/tracking-pixel.png") and: "There should be only one account request" assert httpSettings.getRequestCount(request.account) == 1 diff --git a/src/test/groovy/org/prebid/server/functional/tests/SmokeSpec.groovy b/src/test/groovy/org/prebid/server/functional/tests/SmokeSpec.groovy index 374dae4518c..63e6e584183 100644 --- a/src/test/groovy/org/prebid/server/functional/tests/SmokeSpec.groovy +++ b/src/test/groovy/org/prebid/server/functional/tests/SmokeSpec.groovy @@ -1,5 +1,6 @@ package org.prebid.server.functional.tests +import org.prebid.server.functional.model.UidsCookie import org.prebid.server.functional.model.db.Account import org.prebid.server.functional.model.db.StoredRequest import org.prebid.server.functional.model.request.amp.AmpRequest @@ -8,7 +9,6 @@ import org.prebid.server.functional.model.request.cookiesync.CookieSyncRequest import org.prebid.server.functional.model.request.event.EventRequest import org.prebid.server.functional.model.request.logging.httpinteraction.HttpInteractionRequest import org.prebid.server.functional.model.request.setuid.SetuidRequest -import org.prebid.server.functional.model.UidsCookie import org.prebid.server.functional.model.request.vtrack.VtrackRequest import org.prebid.server.functional.model.request.vtrack.xml.Vast import org.prebid.server.functional.model.response.cookiesync.CookieSyncResponse diff --git a/src/test/groovy/org/prebid/server/functional/pg/AlertSpec.groovy b/src/test/groovy/org/prebid/server/functional/tests/pg/AlertSpec.groovy similarity index 99% rename from src/test/groovy/org/prebid/server/functional/pg/AlertSpec.groovy rename to src/test/groovy/org/prebid/server/functional/tests/pg/AlertSpec.groovy index ca3d124b293..0a52d3cb69e 100644 --- a/src/test/groovy/org/prebid/server/functional/pg/AlertSpec.groovy +++ b/src/test/groovy/org/prebid/server/functional/tests/pg/AlertSpec.groovy @@ -1,4 +1,4 @@ -package org.prebid.server.functional.pg +package org.prebid.server.functional.tests.pg import org.mockserver.matchers.Times import org.prebid.server.functional.model.mock.services.generalplanner.PlansResponse @@ -180,7 +180,6 @@ class AlertSpec extends BasePgSpec { alertRequest.source.hostId == pgPbsProperties.hostId } - cleanup: "Return initial Planner response status code" generalPlanner.initRegisterResponse() diff --git a/src/test/groovy/org/prebid/server/functional/pg/BasePgSpec.groovy b/src/test/groovy/org/prebid/server/functional/tests/pg/BasePgSpec.groovy similarity index 62% rename from src/test/groovy/org/prebid/server/functional/pg/BasePgSpec.groovy rename to src/test/groovy/org/prebid/server/functional/tests/pg/BasePgSpec.groovy index ad7ff68f4e2..7bb3dd758ee 100644 --- a/src/test/groovy/org/prebid/server/functional/pg/BasePgSpec.groovy +++ b/src/test/groovy/org/prebid/server/functional/tests/pg/BasePgSpec.groovy @@ -1,10 +1,10 @@ -package org.prebid.server.functional.pg +package org.prebid.server.functional.tests.pg import org.prebid.server.functional.model.deals.userdata.UserDetailsResponse import org.prebid.server.functional.model.request.dealsupdate.ForceDealsUpdateRequest import org.prebid.server.functional.service.PrebidServerService +import org.prebid.server.functional.testcontainers.Dependencies import org.prebid.server.functional.testcontainers.PBSTest -import org.prebid.server.functional.testcontainers.PbsContainerProperties import org.prebid.server.functional.testcontainers.PbsPgConfig import org.prebid.server.functional.testcontainers.PbsServiceFactory import org.prebid.server.functional.testcontainers.scaffolding.Bidder @@ -15,27 +15,23 @@ import org.prebid.server.functional.testcontainers.scaffolding.pg.UserData import org.prebid.server.functional.util.ObjectMapperWrapper import spock.lang.Specification -import static org.prebid.server.functional.testcontainers.Dependencies.networkServiceContainer -import static org.prebid.server.functional.testcontainers.Dependencies.objectMapperWrapper - @PBSTest +// TODO migrate this to extend BaseSpec abstract class BasePgSpec extends Specification { - protected static final ObjectMapperWrapper mapper = objectMapperWrapper - protected static final PbsServiceFactory pbsServiceFactory = new PbsServiceFactory(networkServiceContainer, mapper) + protected static final ObjectMapperWrapper mapper = Dependencies.objectMapperWrapper + protected static final PbsServiceFactory pbsServiceFactory = new PbsServiceFactory(Dependencies.networkServiceContainer, mapper) - protected static final GeneralPlanner generalPlanner = new GeneralPlanner(networkServiceContainer, mapper).tap { - setResponse() - } - protected static final DeliveryStatistics deliveryStatistics = new DeliveryStatistics(networkServiceContainer, mapper) - protected static final Alert alert = new Alert(networkServiceContainer, mapper) - protected static final UserData userData = new UserData(networkServiceContainer, mapper) + protected static final GeneralPlanner generalPlanner = new GeneralPlanner(Dependencies.networkServiceContainer, mapper) + protected static final DeliveryStatistics deliveryStatistics = new DeliveryStatistics(Dependencies.networkServiceContainer, mapper) + protected static final Alert alert = new Alert(Dependencies.networkServiceContainer, mapper) + protected static final UserData userData = new UserData(Dependencies.networkServiceContainer, mapper) private static final Map pgPbsConfig = pbsServiceFactory.generalSettings() + - PbsPgConfig.getPgConfig(networkServiceContainer) + PbsPgConfig.getPgConfig(Dependencies.networkServiceContainer) protected static final PrebidServerService pgPbsService = pbsServiceFactory.getService(pgPbsConfig) - protected static final PbsContainerProperties pgPbsProperties = new PbsContainerProperties(pbsServiceFactory.getContainer(pgPbsConfig)) - protected static final Bidder bidder = new Bidder(networkServiceContainer, mapper) + protected static final PgProperties pgPbsProperties = new PgProperties(pbsServiceFactory.getContainer(pgPbsConfig)) + protected static final Bidder bidder = new Bidder(Dependencies.networkServiceContainer, mapper) def setupSpec() { generalPlanner.setResponse() diff --git a/src/test/groovy/org/prebid/server/functional/pg/CurrencySpec.groovy b/src/test/groovy/org/prebid/server/functional/tests/pg/CurrencySpec.groovy similarity index 99% rename from src/test/groovy/org/prebid/server/functional/pg/CurrencySpec.groovy rename to src/test/groovy/org/prebid/server/functional/tests/pg/CurrencySpec.groovy index 6aa5b49009d..7d6c1076609 100644 --- a/src/test/groovy/org/prebid/server/functional/pg/CurrencySpec.groovy +++ b/src/test/groovy/org/prebid/server/functional/tests/pg/CurrencySpec.groovy @@ -1,4 +1,4 @@ -package org.prebid.server.functional.pg +package org.prebid.server.functional.tests.pg import org.prebid.server.functional.model.deals.lineitem.LineItem import org.prebid.server.functional.model.deals.lineitem.Price diff --git a/src/test/groovy/org/prebid/server/functional/pg/PgAuctionSpec.groovy b/src/test/groovy/org/prebid/server/functional/tests/pg/PgAuctionSpec.groovy similarity index 99% rename from src/test/groovy/org/prebid/server/functional/pg/PgAuctionSpec.groovy rename to src/test/groovy/org/prebid/server/functional/tests/pg/PgAuctionSpec.groovy index c4f7e9808ef..bfa44b1aa35 100644 --- a/src/test/groovy/org/prebid/server/functional/pg/PgAuctionSpec.groovy +++ b/src/test/groovy/org/prebid/server/functional/tests/pg/PgAuctionSpec.groovy @@ -1,4 +1,4 @@ -package org.prebid.server.functional.pg +package org.prebid.server.functional.tests.pg import org.prebid.server.functional.model.UidsCookie import org.prebid.server.functional.model.bidder.Generic @@ -25,13 +25,13 @@ import java.time.ZonedDateTime import static java.time.ZoneOffset.UTC import static org.prebid.server.functional.model.bidder.BidderName.GENERIC +import static org.prebid.server.functional.model.deals.lineitem.LineItemStatus.DELETED +import static org.prebid.server.functional.model.deals.lineitem.LineItemStatus.PAUSED import static org.prebid.server.functional.model.deals.lineitem.RelativePriority.HIGH import static org.prebid.server.functional.model.deals.lineitem.RelativePriority.LOW import static org.prebid.server.functional.model.deals.lineitem.RelativePriority.MEDIUM import static org.prebid.server.functional.model.deals.lineitem.RelativePriority.VERY_HIGH import static org.prebid.server.functional.model.deals.lineitem.RelativePriority.VERY_LOW -import static org.prebid.server.functional.model.deals.lineitem.Status.DELETED -import static org.prebid.server.functional.model.deals.lineitem.Status.PAUSED import static org.prebid.server.functional.model.deals.lineitem.targeting.MatchingFunction.IN import static org.prebid.server.functional.model.deals.lineitem.targeting.MatchingFunction.INTERSECTS import static org.prebid.server.functional.model.deals.lineitem.targeting.TargetingType.AD_UNIT_MEDIA_TYPE diff --git a/src/test/groovy/org/prebid/server/functional/pg/PgBidResponseSpec.groovy b/src/test/groovy/org/prebid/server/functional/tests/pg/PgBidResponseSpec.groovy similarity index 99% rename from src/test/groovy/org/prebid/server/functional/pg/PgBidResponseSpec.groovy rename to src/test/groovy/org/prebid/server/functional/tests/pg/PgBidResponseSpec.groovy index 4db8a1942f0..1664e118351 100644 --- a/src/test/groovy/org/prebid/server/functional/pg/PgBidResponseSpec.groovy +++ b/src/test/groovy/org/prebid/server/functional/tests/pg/PgBidResponseSpec.groovy @@ -1,4 +1,4 @@ -package org.prebid.server.functional.pg +package org.prebid.server.functional.tests.pg import org.prebid.server.functional.model.deals.lineitem.LineItemSize import org.prebid.server.functional.model.mock.services.generalplanner.PlansResponse diff --git a/src/test/groovy/org/prebid/server/functional/pg/PgBidderRequestSpec.groovy b/src/test/groovy/org/prebid/server/functional/tests/pg/PgBidderRequestSpec.groovy similarity index 98% rename from src/test/groovy/org/prebid/server/functional/pg/PgBidderRequestSpec.groovy rename to src/test/groovy/org/prebid/server/functional/tests/pg/PgBidderRequestSpec.groovy index 55b8ee2ed70..9f5bca6200c 100644 --- a/src/test/groovy/org/prebid/server/functional/pg/PgBidderRequestSpec.groovy +++ b/src/test/groovy/org/prebid/server/functional/tests/pg/PgBidderRequestSpec.groovy @@ -1,4 +1,4 @@ -package org.prebid.server.functional.pg +package org.prebid.server.functional.tests.pg import org.prebid.server.functional.model.UidsCookie import org.prebid.server.functional.model.bidder.Generic @@ -122,7 +122,7 @@ class PgBidderRequestSpec extends BasePgSpec { pgPbsService.sendForceDealsUpdateRequest(ForceDealsUpdateRequest.updateLineItemsRequest) when: "Sending auction request to PBS" - def auctionResponse = pgPbsService.sendAuctionRequest(bidRequest) + pgPbsService.sendAuctionRequest(bidRequest) then: "PBS sent a request to the bidder with two impressions" def bidderRequest = bidder.getBidderRequest(bidRequest.id) diff --git a/src/test/groovy/org/prebid/server/functional/testcontainers/PbsContainerProperties.groovy b/src/test/groovy/org/prebid/server/functional/tests/pg/PgProperties.groovy similarity index 91% rename from src/test/groovy/org/prebid/server/functional/testcontainers/PbsContainerProperties.groovy rename to src/test/groovy/org/prebid/server/functional/tests/pg/PgProperties.groovy index 7539e9b1a91..6e55e920895 100644 --- a/src/test/groovy/org/prebid/server/functional/testcontainers/PbsContainerProperties.groovy +++ b/src/test/groovy/org/prebid/server/functional/tests/pg/PgProperties.groovy @@ -1,10 +1,10 @@ -package org.prebid.server.functional.testcontainers +package org.prebid.server.functional.tests.pg import org.prebid.server.functional.testcontainers.container.PrebidServerContainer import static org.prebid.server.functional.testcontainers.container.PrebidServerContainer.normalizeProperty -class PbsContainerProperties { +class PgProperties { String env String dataCenter @@ -18,7 +18,7 @@ class PbsContainerProperties { int maxDealsPerBidder int lineItemsPerReport - PbsContainerProperties(PrebidServerContainer prebidServerContainer) { + PgProperties(PrebidServerContainer prebidServerContainer) { Map properties = prebidServerContainer.envMap env = getStringProperty(properties, "profile") diff --git a/src/test/groovy/org/prebid/server/functional/pg/PlansSpec.groovy b/src/test/groovy/org/prebid/server/functional/tests/pg/PlansSpec.groovy similarity index 98% rename from src/test/groovy/org/prebid/server/functional/pg/PlansSpec.groovy rename to src/test/groovy/org/prebid/server/functional/tests/pg/PlansSpec.groovy index ca076853b56..70b9b95dd21 100644 --- a/src/test/groovy/org/prebid/server/functional/pg/PlansSpec.groovy +++ b/src/test/groovy/org/prebid/server/functional/tests/pg/PlansSpec.groovy @@ -1,5 +1,4 @@ -package org.prebid.server.functional.pg - +package org.prebid.server.functional.tests.pg import org.prebid.server.functional.model.mock.services.generalplanner.PlansResponse import org.prebid.server.functional.model.request.dealsupdate.ForceDealsUpdateRequest diff --git a/src/test/groovy/org/prebid/server/functional/pg/RegisterSpec.groovy b/src/test/groovy/org/prebid/server/functional/tests/pg/RegisterSpec.groovy similarity index 99% rename from src/test/groovy/org/prebid/server/functional/pg/RegisterSpec.groovy rename to src/test/groovy/org/prebid/server/functional/tests/pg/RegisterSpec.groovy index 4f788d9f048..4b8364fd3a4 100644 --- a/src/test/groovy/org/prebid/server/functional/pg/RegisterSpec.groovy +++ b/src/test/groovy/org/prebid/server/functional/tests/pg/RegisterSpec.groovy @@ -1,4 +1,4 @@ -package org.prebid.server.functional.pg +package org.prebid.server.functional.tests.pg import org.prebid.server.functional.model.mock.services.generalplanner.PlansResponse import org.prebid.server.functional.model.request.auction.BidRequest diff --git a/src/test/groovy/org/prebid/server/functional/pg/ReportSpec.groovy b/src/test/groovy/org/prebid/server/functional/tests/pg/ReportSpec.groovy similarity index 99% rename from src/test/groovy/org/prebid/server/functional/pg/ReportSpec.groovy rename to src/test/groovy/org/prebid/server/functional/tests/pg/ReportSpec.groovy index 28bd7751823..c7fd66c5704 100644 --- a/src/test/groovy/org/prebid/server/functional/pg/ReportSpec.groovy +++ b/src/test/groovy/org/prebid/server/functional/tests/pg/ReportSpec.groovy @@ -1,4 +1,4 @@ -package org.prebid.server.functional.pg +package org.prebid.server.functional.tests.pg import org.prebid.server.functional.model.deals.lineitem.DeliverySchedule import org.prebid.server.functional.model.deals.lineitem.LineItem diff --git a/src/test/groovy/org/prebid/server/functional/pg/TargetingSpec.groovy b/src/test/groovy/org/prebid/server/functional/tests/pg/TargetingSpec.groovy similarity index 99% rename from src/test/groovy/org/prebid/server/functional/pg/TargetingSpec.groovy rename to src/test/groovy/org/prebid/server/functional/tests/pg/TargetingSpec.groovy index 6a7edd5b509..c8ee2910bb7 100644 --- a/src/test/groovy/org/prebid/server/functional/pg/TargetingSpec.groovy +++ b/src/test/groovy/org/prebid/server/functional/tests/pg/TargetingSpec.groovy @@ -1,4 +1,4 @@ -package org.prebid.server.functional.pg +package org.prebid.server.functional.tests.pg import org.prebid.server.functional.model.bidder.Rubicon import org.prebid.server.functional.model.deals.lineitem.LineItemSize diff --git a/src/test/groovy/org/prebid/server/functional/pg/TokenSpec.groovy b/src/test/groovy/org/prebid/server/functional/tests/pg/TokenSpec.groovy similarity index 99% rename from src/test/groovy/org/prebid/server/functional/pg/TokenSpec.groovy rename to src/test/groovy/org/prebid/server/functional/tests/pg/TokenSpec.groovy index 8b1002a19f0..190da3a6101 100644 --- a/src/test/groovy/org/prebid/server/functional/pg/TokenSpec.groovy +++ b/src/test/groovy/org/prebid/server/functional/tests/pg/TokenSpec.groovy @@ -1,4 +1,4 @@ -package org.prebid.server.functional.pg +package org.prebid.server.functional.tests.pg import org.prebid.server.functional.model.deals.lineitem.Token import org.prebid.server.functional.model.mock.services.generalplanner.PlansResponse diff --git a/src/test/groovy/org/prebid/server/functional/pg/UserDetailsSpec.groovy b/src/test/groovy/org/prebid/server/functional/tests/pg/UserDetailsSpec.groovy similarity index 99% rename from src/test/groovy/org/prebid/server/functional/pg/UserDetailsSpec.groovy rename to src/test/groovy/org/prebid/server/functional/tests/pg/UserDetailsSpec.groovy index 147346fff80..c50e03e7763 100644 --- a/src/test/groovy/org/prebid/server/functional/pg/UserDetailsSpec.groovy +++ b/src/test/groovy/org/prebid/server/functional/tests/pg/UserDetailsSpec.groovy @@ -1,4 +1,4 @@ -package org.prebid.server.functional.pg +package org.prebid.server.functional.tests.pg import org.prebid.server.functional.model.UidsCookie import org.prebid.server.functional.model.deals.lineitem.FrequencyCap diff --git a/src/test/groovy/org/prebid/server/functional/util/ObjectMapperWrapper.groovy b/src/test/groovy/org/prebid/server/functional/util/ObjectMapperWrapper.groovy index bf44c768156..4016cf7ad73 100644 --- a/src/test/groovy/org/prebid/server/functional/util/ObjectMapperWrapper.groovy +++ b/src/test/groovy/org/prebid/server/functional/util/ObjectMapperWrapper.groovy @@ -7,6 +7,7 @@ import com.fasterxml.jackson.databind.ObjectMapper import com.fasterxml.jackson.dataformat.xml.XmlMapper import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule +// TODO make this into a Trait so that we won't need to pass it around. This will allow us to use it in the models class ObjectMapperWrapper { private final ObjectMapper mapper