diff --git a/src/main/java/org/prebid/server/auction/BidResponseCreator.java b/src/main/java/org/prebid/server/auction/BidResponseCreator.java index f624248a5c1..f920e95134e 100644 --- a/src/main/java/org/prebid/server/auction/BidResponseCreator.java +++ b/src/main/java/org/prebid/server/auction/BidResponseCreator.java @@ -30,6 +30,7 @@ import org.prebid.server.auction.model.MultiBidConfig; import org.prebid.server.auction.model.TargetingBidInfo; import org.prebid.server.bidder.BidderCatalog; +import org.prebid.server.bidder.model.BidderBid; import org.prebid.server.bidder.model.BidderError; import org.prebid.server.bidder.model.BidderSeatBid; import org.prebid.server.cache.CacheService; @@ -154,6 +155,17 @@ Future create(List bidderResponses, boolean debugEnabled) { final long auctionTimestamp = auctionTimestamp(auctionContext); + final Account account = auctionContext.getAccount(); + + final EventsContext eventsContext = EventsContext.builder() + .enabledForAccount(eventsEnabledForAccount(auctionContext)) + .enabledForRequest(eventsEnabledForRequest(auctionContext)) + .auctionTimestamp(auctionTimestamp) + .integration(integrationFrom(auctionContext)) + .build(); + + final Map bidIdToGeneratedBidId = new HashMap<>(); + updateBidAdmInBidderResponses(bidderResponses, account, bidIdToGeneratedBidId, eventsContext); if (isEmptyBidderResponses(bidderResponses)) { final BidRequest bidRequest = auctionContext.getBidRequest(); @@ -178,10 +190,41 @@ Future create(List bidderResponses, auctionContext, cacheInfo, bidderToMultiBids, - auctionTimestamp, + bidIdToGeneratedBidId, + eventsContext, debugEnabled); } + private void updateBidAdmInBidderResponses(List bidderResponses, + Account account, + Map bidIdToGeneratedBidId, + EventsContext eventsContext) { + for (BidderResponse bidderResponse : bidderResponses) { + final String bidder = bidderResponse.getBidder(); + + for (BidderBid bidderBid : bidderResponse.getSeatBid().getBids()) { + final Bid bid = bidderBid.getBid(); + final String generatedBidId = bidIdGenerator.getType() != IdGeneratorType.none + ? bidIdGenerator.generateId() + : null; + final String bidId = bid.getId(); + bidIdToGeneratedBidId.put(bidId, generatedBidId); + + if (bidderBid.getType().equals(BidType.video)) { + final String adm = vastModifier.createBidVastXml( + bidder, + bid.getAdm(), + bid.getNurl(), + generatedBidId == null ? bidId : generatedBidId, + account.getId(), + eventsContext); + + bid.setAdm(adm); + } + } + } + } + private static int validateTruncateAttrChars(int truncateAttrChars) { if (truncateAttrChars < 0 || truncateAttrChars > 255) { throw new IllegalArgumentException("truncateAttrChars must be between 0 and 255"); @@ -202,13 +245,14 @@ private Future cacheBidsAndCreateResponse(List bidd AuctionContext auctionContext, BidRequestCacheInfo cacheInfo, Map bidderToMultiBids, - long auctionTimestamp, + Map bidIdToGeneratedBidId, + EventsContext eventsContext, boolean debugEnabled) { final BidRequest bidRequest = auctionContext.getBidRequest(); final List imps = bidRequest.getImp(); final Map> bidderResponseToTargetingBidInfos = - toBidderResponseWithTargetingBidInfos(bidderResponses, imps, bidderToMultiBids); + toBidderResponseWithTargetingBidInfos(bidderResponses, imps, bidderToMultiBids, bidIdToGeneratedBidId); final Set bidInfos = bidderResponseToTargetingBidInfos.values().stream() .filter(CollectionUtils::isNotEmpty) @@ -228,13 +272,6 @@ private Future cacheBidsAndCreateResponse(List bidd final Set bidsToCache = cacheInfo.isShouldCacheWinningBidsOnly() ? winningBidInfos : bidInfos; - final EventsContext eventsContext = EventsContext.builder() - .enabledForAccount(eventsEnabledForAccount(auctionContext)) - .enabledForRequest(eventsEnabledForRequest(auctionContext)) - .auctionTimestamp(auctionTimestamp) - .integration(integrationFrom(auctionContext)) - .build(); - return cacheBids(bidsToCache, auctionContext, cacheInfo, eventsContext) .compose(cacheResult -> videoStoredDataResult(auctionContext) .map(videoStoredDataResult -> toBidResponse( @@ -245,7 +282,6 @@ private Future cacheBidsAndCreateResponse(List bidd cacheResult, videoStoredDataResult, eventsContext, - auctionTimestamp, debugEnabled))); } @@ -258,12 +294,14 @@ private static ExtRequestTargeting targeting(BidRequest bidRequest) { private Map> toBidderResponseWithTargetingBidInfos( List bidderResponses, List imps, - Map bidderToMultiBids) { + Map bidderToMultiBids, + Map bidIdToGeneratedBidId) { final Map> bidderResponseToReducedBidInfos = bidderResponses.stream() .collect(Collectors.toMap( Function.identity(), - bidderResponse -> toSortedMultiBidInfo(bidderResponse, imps, bidderToMultiBids))); + bidderResponse -> toSortedMultiBidInfo(bidderResponse, imps, bidderToMultiBids, + bidIdToGeneratedBidId))); final Map>> impIdToBidderToBidInfos = bidderResponseToReducedBidInfos.values() .stream() @@ -300,8 +338,9 @@ private Map> toBidderResponseWithTargetin private List toSortedMultiBidInfo(BidderResponse bidderResponse, List imps, - Map bidderToMultiBids) { - final List bidInfos = toBidInfo(bidderResponse, imps); + Map bidderToMultiBids, + Map bidIdToGeneratedBidId) { + final List bidInfos = toBidInfo(bidderResponse, imps, bidIdToGeneratedBidId); final Map> impIdToBidInfos = bidInfos.stream() .collect(Collectors.groupingBy(bidInfo -> bidInfo.getCorrespondingImp().getId())); @@ -314,20 +353,27 @@ private List toSortedMultiBidInfo(BidderResponse bidderResponse, .collect(Collectors.toList()); } - private List toBidInfo(BidderResponse bidderResponse, List imps) { + private List toBidInfo(BidderResponse bidderResponse, + List imps, + Map bidIdToGeneratedBidId) { return Stream.of(bidderResponse) .map(BidderResponse::getSeatBid) .filter(Objects::nonNull) .map(BidderSeatBid::getBids) .filter(Objects::nonNull) .flatMap(Collection::stream) - .map(bidderBid -> toBidInfo(bidderBid.getBid(), bidderBid.getType(), imps, bidderResponse.getBidder())) + .map(bidderBid -> toBidInfo(bidderBid.getBid(), bidderBid.getType(), imps, bidderResponse.getBidder(), + bidIdToGeneratedBidId)) .collect(Collectors.toList()); } - private BidInfo toBidInfo(Bid bid, BidType type, List imps, String bidder) { + private BidInfo toBidInfo(Bid bid, + BidType type, + List imps, + String bidder, + Map bidIdToGeneratedBidId) { return BidInfo.builder() - .generatedBidId(bidIdGenerator.getType() != IdGeneratorType.none ? bidIdGenerator.generateId() : null) + .generatedBidId(bidIdToGeneratedBidId.get(bid.getId())) .bid(bid) .bidType(type) .bidder(bidder) @@ -693,7 +739,6 @@ private BidResponse toBidResponse(Map> bi CacheServiceResult cacheResult, VideoStoredDataResult videoStoredDataResult, EventsContext eventsContext, - long auctionTimestamp, boolean debugEnabled) { final BidRequest bidRequest = auctionContext.getBidRequest(); @@ -714,6 +759,7 @@ private BidResponse toBidResponse(Map> bi eventsContext)) .collect(Collectors.toList()); + final Long auctionTimestamp = eventsContext.getAuctionTimestamp(); final ExtBidResponse extBidResponse = toExtBidResponse( bidderResponseToTargetingBidInfos.keySet(), auctionContext, @@ -839,16 +885,6 @@ private Bid toBid(TargetingBidInfo targetingBidInfo, if ((videoCacheId != null && !requestCacheInfo.isReturnCreativeVideoBids()) || (cacheId != null && !requestCacheInfo.isReturnCreativeBids())) { bid.setAdm(null); - } else if (bidType.equals(BidType.video)) { - final String adm = vastModifier.createBidVastXml( - bidder, - bid.getAdm(), - bid.getNurl(), - bidInfo.getBidId(), - account.getId(), - eventsContext); - - bid.setAdm(adm); } final boolean isApp = bidRequest.getApp() != null; diff --git a/src/main/java/org/prebid/server/cache/CacheService.java b/src/main/java/org/prebid/server/cache/CacheService.java index a7ab3788f69..c7ce05d6bf3 100644 --- a/src/main/java/org/prebid/server/cache/CacheService.java +++ b/src/main/java/org/prebid/server/cache/CacheService.java @@ -282,7 +282,7 @@ private Future doCacheOpenrtb(List bids, final String accountId = account.getId(); final List cachedCreatives = Stream.concat( bids.stream().map(cacheBid -> createJsonPutObjectOpenrtb(cacheBid, accountId, eventsContext)), - videoBids.stream().map(cacheBid -> createXmlPutObjectOpenrtb(cacheBid, accountId, eventsContext))) + videoBids.stream().map(this::createXmlPutObjectOpenrtb)) .collect(Collectors.toList()); if (cachedCreatives.isEmpty()) { @@ -403,18 +403,10 @@ private CachedCreative createJsonPutObjectOpenrtb(CacheBid cacheBid, /** * Makes XML type {@link PutObject} from {@link com.iab.openrtb.response.Bid}. Used for OpenRTB auction request. */ - private CachedCreative createXmlPutObjectOpenrtb(CacheBid cacheBid, - String accountId, - EventsContext eventsContext) { + private CachedCreative createXmlPutObjectOpenrtb(CacheBid cacheBid) { final BidInfo bidInfo = cacheBid.getBidInfo(); final com.iab.openrtb.response.Bid bid = bidInfo.getBid(); - final String vastXml = vastModifier.createBidVastXml( - bidInfo.getBidder(), - bid.getAdm(), - bid.getNurl(), - bidInfo.getBidId(), - accountId, - eventsContext); + final String vastXml = bid.getAdm(); final PutObject payload = PutObject.builder() .type("xml") diff --git a/src/test/java/org/prebid/server/auction/BidResponseCreatorTest.java b/src/test/java/org/prebid/server/auction/BidResponseCreatorTest.java index 6e1d08f71d8..590766301fc 100644 --- a/src/test/java/org/prebid/server/auction/BidResponseCreatorTest.java +++ b/src/test/java/org/prebid/server/auction/BidResponseCreatorTest.java @@ -18,7 +18,6 @@ import com.iab.openrtb.response.Response; import com.iab.openrtb.response.SeatBid; import io.vertx.core.Future; -import org.apache.commons.collections4.CollectionUtils; import org.junit.Before; import org.junit.Rule; import org.junit.Test; @@ -315,10 +314,12 @@ public void shouldRequestCacheServiceWithWinningBidsOnlyWhenWinningonlyIsTrue() eq(EventsContext.builder().auctionTimestamp(1000L).build())); } + @SuppressWarnings("unchecked") @Test public void shouldRequestCacheServiceWithVideoBidsToModify() { // given - final Account account = Account.builder().id("accountId").eventsEnabled(true).build(); + final String accountId = "accountId"; + final Account account = Account.builder().id(accountId).eventsEnabled(true).build(); final Imp imp1 = givenImp("impId1"); final Imp imp2 = givenImp("impId2"); @@ -329,10 +330,14 @@ public void shouldRequestCacheServiceWithVideoBidsToModify() { imp1, imp2), contextBuilder -> contextBuilder.account(account)); - final Bid bid1 = Bid.builder().id("bidId1").impid("impId1").price(BigDecimal.valueOf(5.67)).build(); + final String bidId1 = "bidId1"; + final Bid bid1 = Bid.builder().id(bidId1).impid("impId1").price(BigDecimal.valueOf(5.67)).nurl(BID_NURL) + .build(); final Bid bid2 = Bid.builder().id("bidId2").impid("impId2").price(BigDecimal.valueOf(7.19)).build(); + + final String bidder1 = "bidder1"; final List bidderResponses = asList( - BidderResponse.of("bidder1", givenSeatBid(BidderBid.of(bid1, video, "USD")), 100), + BidderResponse.of(bidder1, givenSeatBid(BidderBid.of(bid1, video, "USD")), 100), BidderResponse.of("bidder2", givenSeatBid(BidderBid.of(bid2, banner, "USD")), 100)); final BidRequestCacheInfo cacheInfo = BidRequestCacheInfo.builder() @@ -340,6 +345,9 @@ public void shouldRequestCacheServiceWithVideoBidsToModify() { .shouldCacheVideoBids(true) .build(); + final String modifiedAdm = "modifiedAdm"; + given(vastModifier.createBidVastXml(any(), any(), any(), any(), any(), any())).willReturn(modifiedAdm); + // just a stub to get through method call chain givenCacheServiceResult(singletonMap(bid1, CacheInfo.empty())); @@ -347,17 +355,63 @@ public void shouldRequestCacheServiceWithVideoBidsToModify() { bidResponseCreator.create(bidderResponses, auctionContext, cacheInfo, MULTI_BIDS, false); // then - final BidInfo bidInfo1 = toBidInfo(bid1, imp1, "bidder1", video); - final BidInfo bidInfo2 = toBidInfo(bid2, imp2, "bidder2", banner); + final EventsContext expectedEventContext = EventsContext.builder() + .enabledForAccount(true) + .enabledForRequest(true) + .auctionTimestamp(1000L) + .build(); + + verify(vastModifier).createBidVastXml(bidder1, null, BID_NURL, bidId1, accountId, expectedEventContext); + + final ArgumentCaptor> bidInfoCaptor = ArgumentCaptor.forClass(List.class); verify(cacheService).cacheBidsOpenrtb( - argThat(argument -> CollectionUtils.isEqualCollection(argument, asList(bidInfo1, bidInfo2))), + bidInfoCaptor.capture(), same(auctionContext), eq(CacheContext.builder().shouldCacheVideoBids(true).build()), - eq(EventsContext.builder() - .enabledForAccount(true) - .enabledForRequest(true) - .auctionTimestamp(1000L) - .build())); + eq(expectedEventContext)); + + final Bid expectedUpdatedBid1 = bid1.toBuilder().adm(modifiedAdm).build(); + final BidInfo bidInfo1 = toBidInfo(expectedUpdatedBid1, imp1, bidder1, video); + final BidInfo bidInfo2 = toBidInfo(bid2, imp2, "bidder2", banner); + assertThat(bidInfoCaptor.getValue()).containsOnly(bidInfo1, bidInfo2); + } + + @Test + public void shouldModifyBidAdmWhenBidVideoAndVastModifierReturnValue() { + // given + final AuctionContext auctionContext = givenAuctionContext(givenBidRequest( + identity(), + extBuilder -> extBuilder.targeting(givenTargeting()), + givenImp())); + + final String bidId = "bid_id"; + final Bid bid = Bid.builder() + .id(bidId) + .price(BigDecimal.ONE) + .adm(BID_ADM) + .nurl(BID_NURL) + .impid(IMP_ID) + .build(); + + final String bidder = "bidder1"; + final List bidderResponses = singletonList( + BidderResponse.of(bidder, givenSeatBid(BidderBid.of(bid, video, "USD")), 100)); + + final String modifiedVast = "modifiedVast"; + given(vastModifier.createBidVastXml(anyString(), anyString(), anyString(), anyString(), anyString(), any())) + .willReturn(modifiedVast); + + // when + final BidResponse bidResponse = + bidResponseCreator.create(bidderResponses, auctionContext, CACHE_INFO, MULTI_BIDS, false).result(); + + // then + assertThat(bidResponse.getSeatbid()) + .flatExtracting(SeatBid::getBid).hasSize(1) + .extracting(Bid::getAdm) + .containsOnly(modifiedVast); + + verify(vastModifier).createBidVastXml(eq(bidder), eq(BID_ADM), eq(BID_NURL), eq(bidId), eq("accountId"), any()); } @Test @@ -865,44 +919,6 @@ public void shouldSetBidAdmToNullIfVideoCacheIdIsPresentAndReturnCreativeVideoBi verify(cacheService).cacheBidsOpenrtb(anyList(), any(), any(), any()); } - @Test - public void shouldModifyBidAdmWhenBidVideoAndVastModifierReturnValue() { - // given - final AuctionContext auctionContext = givenAuctionContext(givenBidRequest( - identity(), - extBuilder -> extBuilder.targeting(givenTargeting()), - givenImp())); - - final String bidId = "bid_id"; - final Bid bid = Bid.builder() - .id(bidId) - .price(BigDecimal.ONE) - .adm(BID_ADM) - .nurl(BID_NURL) - .impid(IMP_ID) - .build(); - - final String bidder = "bidder1"; - final List bidderResponses = singletonList( - BidderResponse.of(bidder, givenSeatBid(BidderBid.of(bid, video, "USD")), 100)); - - final String modifiedVast = "modifiedVast"; - given(vastModifier.createBidVastXml(anyString(), anyString(), anyString(), anyString(), anyString(), any())) - .willReturn(modifiedVast); - - // when - final BidResponse bidResponse = - bidResponseCreator.create(bidderResponses, auctionContext, CACHE_INFO, MULTI_BIDS, false).result(); - - // then - assertThat(bidResponse.getSeatbid()) - .flatExtracting(SeatBid::getBid).hasSize(1) - .extracting(Bid::getAdm) - .containsOnly(modifiedVast); - - verify(vastModifier).createBidVastXml(eq(bidder), eq(BID_ADM), eq(BID_NURL), eq(bidId), eq("accountId"), any()); - } - @Test public void shouldSetBidExpWhenCacheIdIsMatched() { // given diff --git a/src/test/java/org/prebid/server/cache/CacheServiceTest.java b/src/test/java/org/prebid/server/cache/CacheServiceTest.java index 9ea10cffaf2..921dcbc3146 100644 --- a/src/test/java/org/prebid/server/cache/CacheServiceTest.java +++ b/src/test/java/org/prebid/server/cache/CacheServiceTest.java @@ -403,17 +403,12 @@ public void cacheBidsOpenrtbShouldReturnExpectedCacheBids() { public void cacheBidsOpenrtbShouldPerformHttpRequestWithExpectedBody() throws IOException { // given final String receivedBid2Adm = "adm2"; - final String generatedId = "generatedId"; - final String bidder = "bidder2"; final BidInfo bidInfo1 = givenBidInfo(builder -> builder.id("bidId1"), null, BidType.banner, "bidder1"); - final BidInfo bidInfo2 = givenBidInfo(builder -> builder.id("bidId2").adm(receivedBid2Adm), generatedId, - BidType.video, - bidder); + final BidInfo bidInfo2 = givenBidInfo(builder -> builder.id("bidId2").adm(receivedBid2Adm), "generatedId", + BidType.video, "bidder2"); final EventsContext eventsContext = EventsContext.builder().auctionTimestamp(1000L).build(); - given(vastModifier.createBidVastXml(any(), any(), any(), any(), any(), any())).willReturn(receivedBid2Adm); - // when cacheService.cacheBidsOpenrtb( asList(bidInfo1, bidInfo2), @@ -431,14 +426,13 @@ public void cacheBidsOpenrtbShouldPerformHttpRequestWithExpectedBody() throws IO final Bid bid1 = bidInfo1.getBid(); final Bid bid2 = bidInfo2.getBid(); - verify(vastModifier).createBidVastXml(bidder, receivedBid2Adm, null, generatedId, ACCOUNT_ID, eventsContext); final BidCacheRequest bidCacheRequest = captureBidCacheRequest(); assertThat(bidCacheRequest.getPuts()).hasSize(3) .containsOnly( PutObject.builder().type("json").value(mapper.valueToTree(bid1)).build(), PutObject.builder().type("json").value(mapper.valueToTree(bid2)).build(), - PutObject.builder().type("xml").value(new TextNode(bid2.getAdm())).build()); + PutObject.builder().type("xml").value(new TextNode(receivedBid2Adm)).build()); } @Test @@ -674,14 +668,8 @@ public void cacheBidsOpenrtbShouldReturnExpectedResultForBids() { @Test public void cacheBidsOpenrtbShouldReturnExpectedResultForVideoBids() { // given - final String receivedAdm = "adm1"; - final String bidId = "bidId1"; - final String bidder = "bidder"; - final BidInfo bidInfo = givenBidInfo(bidBuilder -> bidBuilder.id(bidId).adm(receivedAdm), null, - BidType.video, bidder); - - given(vastModifier.createBidVastXml(anyString(), anyString(), anyString(), anyString(), anyString(), any())) - .willReturn(receivedAdm); + final BidInfo bidInfo = givenBidInfo(bidBuilder -> bidBuilder.id("bidId1").adm("adm1"), null, + BidType.video, "bidder"); // when final Future future = cacheService.cacheBidsOpenrtb( @@ -693,8 +681,6 @@ public void cacheBidsOpenrtbShouldReturnExpectedResultForVideoBids() { eventsContext); // then - verify(vastModifier).createBidVastXml(bidder, receivedAdm, null, bidId, ACCOUNT_ID, eventsContext); - assertThat(future.result().getCacheBids()).hasSize(1) .containsEntry(bidInfo.getBid(), CacheInfo.of(null, "uuid1", null, null)); } @@ -708,13 +694,9 @@ public void cacheBidsOpenrtbShouldReturnExpectedResultForBidsAndVideoBids() thro CacheObject.of("uuid2"), CacheObject.of("videoUuid1"))))); - final String bidder1 = "bidder1"; - final String bidId1 = "bidId1"; - final BidInfo bidInfo1 = givenBidInfo(builder -> builder.id(bidId1), null, BidType.video, bidder1); + final BidInfo bidInfo1 = givenBidInfo(builder -> builder.id("bidId1"), null, BidType.video, "bidder1"); final BidInfo bidInfo2 = givenBidInfo(builder -> builder.id("bidId2"), null, BidType.banner, "bidder2"); - given(vastModifier.createBidVastXml(any(), any(), any(), any(), any(), any())).willReturn("modifiedAdm"); - // when final Future future = cacheService.cacheBidsOpenrtb( asList(bidInfo1, bidInfo2), @@ -726,45 +708,12 @@ public void cacheBidsOpenrtbShouldReturnExpectedResultForBidsAndVideoBids() thro eventsContext); // then - verify(vastModifier).createBidVastXml(bidder1, null, null, bidId1, ACCOUNT_ID, eventsContext); - assertThat(future.result().getCacheBids()).hasSize(2) .containsOnly( entry(bidInfo1.getBid(), CacheInfo.of("uuid1", "videoUuid1", null, null)), entry(bidInfo2.getBid(), CacheInfo.of("uuid2", null, null, null))); } - @Test - public void cacheBidsOpenrtbShouldModifyVastXmlWhenVastModifierReturnAdm() throws IOException { - // given - final String generatedId = "generatedId"; - final String bidder = "bidder1"; - final String adm = "adm1"; - final BidInfo bidInfo = givenBidInfo(builder -> builder.id("bidId1").adm(adm), generatedId, BidType.video, - bidder); - - given(vastModifier.createBidVastXml(any(), any(), any(), any(), any(), any())).willReturn("modifiedAdm"); - - // when - cacheService.cacheBidsOpenrtb( - singletonList(bidInfo), - givenAuctionContext(), - CacheContext.builder() - .shouldCacheBids(true) - .shouldCacheVideoBids(true) - .build(), - eventsContext); - - // then - verify(vastModifier).createBidVastXml(bidder, adm, null, generatedId, ACCOUNT_ID, eventsContext); - - final BidCacheRequest bidCacheRequest = captureBidCacheRequest(); - assertThat(bidCacheRequest.getPuts()).hasSize(2) - .containsOnly( - PutObject.builder().type("json").value(mapper.valueToTree(bidInfo.getBid())).build(), - PutObject.builder().type("xml").value(new TextNode("modifiedAdm")).build()); - } - @Test public void cachePutObjectsShouldTolerateGlobalTimeoutAlreadyExpired() { // when diff --git a/src/test/resources/org/prebid/server/it/openrtb2/aja/test-cache-aja-request.json b/src/test/resources/org/prebid/server/it/openrtb2/aja/test-cache-aja-request.json index 127a65adcc2..d354d797b62 100644 --- a/src/test/resources/org/prebid/server/it/openrtb2/aja/test-cache-aja-request.json +++ b/src/test/resources/org/prebid/server/it/openrtb2/aja/test-cache-aja-request.json @@ -24,6 +24,7 @@ "psacentral.org" ], "nurl": "https://example.com/nurl", + "adm": "prebid.org wrapper", "cid": "cid002", "crid": "crid002", "w": 300, diff --git a/src/test/resources/org/prebid/server/it/openrtb2/datablocks/test-auction-datablocks-response.json b/src/test/resources/org/prebid/server/it/openrtb2/datablocks/test-auction-datablocks-response.json index 91d0f09bdff..c72cf8a0c3b 100644 --- a/src/test/resources/org/prebid/server/it/openrtb2/datablocks/test-auction-datablocks-response.json +++ b/src/test/resources/org/prebid/server/it/openrtb2/datablocks/test-auction-datablocks-response.json @@ -97,7 +97,7 @@ "cache": [ { "uri": "{{ cache.endpoint }}", - "requestbody": "{\"puts\":[{\"type\":\"json\",\"value\":{\"id\":\"bid001\",\"impid\":\"impId001\",\"price\":7.77,\"adm\":\"adm001\",\"adid\":\"adid001\",\"cid\":\"cid001\",\"crid\":\"crid001\",\"w\":300,\"h\":250}},{\"type\":\"json\",\"value\":{\"id\":\"bid002\",\"impid\":\"impId002\",\"price\":9.99,\"nurl\":\"https://example.com/nurl\",\"adomain\":[\"psacentral.org\"],\"cid\":\"cid002\",\"crid\":\"crid002\",\"w\":300,\"h\":250}},{\"type\":\"xml\",\"value\":\"prebid.org wrapper\",\"expiry\":120}]}", + "requestbody": "{\"puts\":[{\"type\":\"json\",\"value\":{\"id\":\"bid001\",\"impid\":\"impId001\",\"price\":7.77,\"adm\":\"adm001\",\"adid\":\"adid001\",\"cid\":\"cid001\",\"crid\":\"crid001\",\"w\":300,\"h\":250}},{\"type\":\"json\",\"value\":{\"id\":\"bid002\",\"impid\":\"impId002\",\"price\":9.99,\"nurl\":\"https://example.com/nurl\",\"adm\":\"prebid.org wrapper\",\"adomain\":[\"psacentral.org\"],\"cid\":\"cid002\",\"crid\":\"crid002\",\"w\":300,\"h\":250}},{\"type\":\"xml\",\"value\":\"prebid.org wrapper\",\"expiry\":120}]}", "responsebody": "{\"responses\":[{\"uuid\":\"c1662cf6-f00a-4066-b71a-46d97abccc35\"},{\"uuid\":\"dbaa191c-5a56-4655-85eb-da079f94e09f\"},{\"uuid\":\"62019cff-d657-42fc-8366-16c34e1fd28c\"}]}", "status": 200 } diff --git a/src/test/resources/org/prebid/server/it/openrtb2/datablocks/test-cache-datablocks-request.json b/src/test/resources/org/prebid/server/it/openrtb2/datablocks/test-cache-datablocks-request.json index d22654a542b..abf2fab21df 100644 --- a/src/test/resources/org/prebid/server/it/openrtb2/datablocks/test-cache-datablocks-request.json +++ b/src/test/resources/org/prebid/server/it/openrtb2/datablocks/test-cache-datablocks-request.json @@ -24,6 +24,7 @@ "psacentral.org" ], "nurl": "https://example.com/nurl", + "adm": "prebid.org wrapper", "cid": "cid002", "crid": "crid002", "w": 300, diff --git a/src/test/resources/org/prebid/server/it/openrtb2/rubicon_appnexus/test-auction-rubicon-appnexus-response.json b/src/test/resources/org/prebid/server/it/openrtb2/rubicon_appnexus/test-auction-rubicon-appnexus-response.json index bb740a478e9..b7038b9b337 100644 --- a/src/test/resources/org/prebid/server/it/openrtb2/rubicon_appnexus/test-auction-rubicon-appnexus-response.json +++ b/src/test/resources/org/prebid/server/it/openrtb2/rubicon_appnexus/test-auction-rubicon-appnexus-response.json @@ -367,7 +367,7 @@ "cache": [ { "uri": "{{ cache.endpoint }}", - "requestbody": "{\"puts\":[{\"type\":\"json\",\"value\":{\"id\":\"7706636740145184840\",\"impid\":\"impId3\",\"price\":5,\"adm\":\"some-test-ad\",\"adid\":\"29681110\",\"adomain\":[\"appnexus.com\"],\"iurl\":\"http://nym1-ib.adnxs.com/cr?id=29681110\",\"cid\":\"958\",\"crid\":\"29681110\",\"cat\":[],\"w\":300,\"h\":250,\"ext\":{\"appnexus\":{\"brand_id\":350,\"brand_category_id\":350,\"auction_id\":8189378542222915031,\"bidder_id\":2,\"bid_ad_type\":0,\"ranking_price\":0.0}},\"wurl\":\"http://localhost:8080/event?t=win&b=7706636740145184840&a=5001&ts=1000&bidder=appnexusAlias&f=i&int=dmbjs\"}},{\"type\":\"json\",\"value\":{\"id\":\"466223845\",\"impid\":\"impId2\",\"price\":4.26,\"adm\":\"adm2\",\"crid\":\"crid2\",\"w\":300,\"h\":600,\"wurl\":\"http://localhost:8080/event?t=win&b=466223845&a=5001&ts=1000&bidder=rubicon&f=i&int=dmbjs\"}},{\"type\":\"json\",\"value\":{\"id\":\"a121a07f-1579-4465-bc5e-5c5b02a0c421\",\"impid\":\"impStoredAuctionResponse\",\"price\":0.9,\"crid\":\"crid1\",\"wurl\":\"http://localhost:8080/event?t=win&b=a121a07f-1579-4465-bc5e-5c5b02a0c421&a=5001&ts=1000&bidder=appnexus&f=i&int=dmbjs\"}},{\"type\":\"json\",\"value\":{\"id\":\"880290288\",\"impid\":\"impId1\",\"price\":8.43,\"adm\":\"\",\"crid\":\"crid1\",\"w\":300,\"h\":250,\"ext\":{\"rp\":{\"targeting\":[{\"key\":\"rpfl_1001\",\"values\":[\"2_tier0100\"]}]}},\"wurl\":\"http://localhost:8080/event?t=win&b=880290288&a=5001&ts=1000&bidder=rubicon&f=i&int=dmbjs\"}},{\"type\":\"json\",\"value\":{\"id\":\"f227a07f-1579-4465-bc5e-5c5b02a0c180\",\"impid\":\"impStoredAuctionResponse\",\"price\":0.8,\"crid\":\"crid1\",\"wurl\":\"http://localhost:8080/event?t=win&b=f227a07f-1579-4465-bc5e-5c5b02a0c180&a=5001&ts=1000&bidder=rubicon&f=i&int=dmbjs\"}},{\"type\":\"json\",\"value\":{\"id\":\"928185755156387460\",\"impid\":\"impId131\",\"price\":1,\"adm\":\"{\\\"assets\\\":[{\\\"id\\\":0,\\\"img\\\":{\\\"url\\\":\\\"http://vcdn.adnxs.com/p/creative-image/5e/b6/de/c3/5eb6dec3-4854-4dcd-980a-347f36ab502e.jpg\\\",\\\"w\\\":3000,\\\"h\\\":2250,\\\"ext\\\":{\\\"appnexus\\\":{\\\"prevent_crop\\\":0}}}},{\\\"id\\\":1,\\\"title\\\":{\\\"text\\\":\\\"This is an example Prebid Native creative\\\"}},{\\\"id\\\":2,\\\"data\\\":{\\\"value\\\":\\\"Prebid.org\\\"}},{\\\"id\\\":3,\\\"data\\\":{\\\"value\\\":\\\"ThisisaPrebidNativeCreative.Therearemanylikeit,butthisoneismine.\\\"}}],\\\"link\\\":{\\\"url\\\":\\\"http://nym1-ib.adnxs.com/click?AAAAAAAA8D8AAAAAAADwPwAAAAAAAAAAAAAAAAAA8D8AAAAAAADwPwhdYz3ZyNFNG3fXpZUyLXNZ0o5aAAAAACrElgC-AwAAvgMAAAIAAAC98iUEeP4QAAAAAABVU0QAVVNEAAEAAQARIAAAAAABAgQCAAAAAAEAhBaSXgAAAAA./pp=${AUCTION_PRICE}/cnd=%21OwwGAQiGmooHEL3llyEY-PxDIAQoADoRZGVmYXVsdCNOWU0yOjQwMjM./bn=75922/test=1/referrer=prebid.org/clickenc=http%3A%2F%2Fprebid.org%2Fdev-docs%2Fshow-native-ads.html\\\"},\\\"imptrackers\\\":[\\\"http://nym1-ib.adnxs.com/openrtb_win?e=wqT_3QLFBqBFAwAAAwDWAAUBCNmku9QFEIi6jeuTm_LoTRib7t2u2tLMlnMqNgkAAAECCPA_EQEHEAAA8D8ZCQkIAAAhCQkI8D8pEQkAMQkJqAAAMKqI2wQ4vgdAvgdIAlC95ZchWPj8Q2AAaJFAeJLRBIABAYoBA1VTRJIFBvBQmAEBoAEBqAEBsAEAuAECwAEEyAEC0AEJ2AEA4AEB8AEAigI7dWYoJ2EnLCAxMzc2ODYwLCAxNTE5MzA5NDAxKTt1ZigncicsIDY5NTk1ODM3Nh4A8IqSAvUBIXRETkdfUWlHbW9vSEVMM2xseUVZQUNENF9FTXdBRGdBUUFSSXZnZFFxb2piQkZnQVlMTURhQUJ3QUhnQWdBRUFpQUVBa0FFQm1BRUJvQUVCcUFFRHNBRUF1UUVwaTRpREFBRHdQOEVCS1l1SWd3QUE4RF9KQVhfelYzek1zXzBfMlFFQUFBAQMkRHdQLUFCQVBVQgEOLEFKZ0NBS0FDQUxVQwUQBEwwCQjwTE1BQ0FNZ0NBT0FDQU9nQ0FQZ0NBSUFEQVpBREFKZ0RBYWdEaHBxS0I3b0RFV1JsWm1GMWJIUWpUbGxOTWpvME1ESXqaAjkhT3d3R0FRNvgA8E4tUHhESUFRb0FEb1JaR1ZtWVhWc2RDTk9XVTB5T2pRd01qTS7YAugH4ALH0wHqAgpwcmViaWQub3Jn8gIRCgZBRFZfSUQSBzEzNzY4NjDyARQMQ1BHXwEUNDM1MDMwOTjyAhEKBUNQARPwmQgxNDg0NzIzOIADAYgDAZADAJgDFKADAaoDAMADkBzIAwDYAwDgAwDoAwD4AwOABACSBAkvb3BlbnJ0YjKYBACiBAwxNTIuMTkzLjYuNzSoBJrMI7IEDAgAEAAYACAAMAA4ALgEAMAEAMgEANIEEWRlZmF1bHQjTllNMjo0MDIz2gQCCADgBADwBL3llyGIBQGYBQCgBf____8FA1ABqgULc29tZS1yZXEtaWTABQDJBQAFARTwP9IFCQkFC2QAAADYBQHgBQHwBd4C-gUECAAQAJAGAZgGAA..&s=08b1535744639c904684afe46e3c6c0e4786089f&test=1&referrer=prebid.org&pp=${AUCTION_PRICE}\\\"],\\\"jstracker\\\":\\\"\\\"}\",\"adid\":\"69595837\",\"adomain\":[\"appnexus.com\"],\"iurl\":\"http://nym1-ib.adnxs.com/cr?id=69595837\",\"cid\":\"958\",\"crid\":\"69595837\",\"cat\":[\"IAB20-3\"],\"ext\":{\"appnexus\":{\"brand_id\":1,\"brand_category_id\":1,\"auction_id\":5607483846416358664,\"bidder_id\":2,\"bid_ad_type\":3}},\"wurl\":\"http://localhost:8080/event?t=win&b=928185755156387460&a=5001&ts=1000&bidder=appnexus&f=i&int=dmbjs\"}},{\"type\":\"json\",\"value\":{\"id\":\"7706636740145184841\",\"impid\":\"impId3\",\"price\":5.5,\"adm\":\"some-test-ad\",\"adid\":\"29681110\",\"adomain\":[\"appnexus.com\"],\"iurl\":\"http://nym1-ib.adnxs.com/cr?id=29681110\",\"cid\":\"958\",\"crid\":\"29681110\",\"w\":300,\"h\":250,\"ext\":{\"appnexus\":{\"brand_id\":1,\"auction_id\":8189378542222915032,\"bidder_id\":2,\"bid_ad_type\":0,\"ranking_price\":0.0}},\"wurl\":\"http://localhost:8080/event?t=win&b=7706636740145184841&a=5001&ts=1000&bidder=appnexus&f=i&int=dmbjs\"}},{\"type\":\"xml\",\"value\":\"\",\"expiry\":120}]}", + "requestbody": "{\"puts\":[{\"type\":\"json\",\"value\":{\"id\":\"7706636740145184840\",\"impid\":\"impId3\",\"price\":5,\"adm\":\"some-test-ad\",\"adid\":\"29681110\",\"adomain\":[\"appnexus.com\"],\"iurl\":\"http://nym1-ib.adnxs.com/cr?id=29681110\",\"cid\":\"958\",\"crid\":\"29681110\",\"cat\":[],\"w\":300,\"h\":250,\"ext\":{\"appnexus\":{\"brand_id\":350,\"brand_category_id\":350,\"auction_id\":8189378542222915031,\"bidder_id\":2,\"bid_ad_type\":0,\"ranking_price\":0.0}},\"wurl\":\"http://localhost:8080/event?t=win&b=7706636740145184840&a=5001&ts=1000&bidder=appnexusAlias&f=i&int=dmbjs\"}},{\"type\":\"json\",\"value\":{\"id\":\"466223845\",\"impid\":\"impId2\",\"price\":4.26,\"adm\":\"adm2\",\"crid\":\"crid2\",\"w\":300,\"h\":600,\"wurl\":\"http://localhost:8080/event?t=win&b=466223845&a=5001&ts=1000&bidder=rubicon&f=i&int=dmbjs\"}},{\"type\":\"json\",\"value\":{\"id\":\"a121a07f-1579-4465-bc5e-5c5b02a0c421\",\"impid\":\"impStoredAuctionResponse\",\"price\":0.9,\"crid\":\"crid1\",\"wurl\":\"http://localhost:8080/event?t=win&b=a121a07f-1579-4465-bc5e-5c5b02a0c421&a=5001&ts=1000&bidder=appnexus&f=i&int=dmbjs\"}},{\"type\":\"json\",\"value\":{\"id\":\"880290288\",\"impid\":\"impId1\",\"price\":8.43,\"adm\":\"\",\"crid\":\"crid1\",\"w\":300,\"h\":250,\"ext\":{\"rp\":{\"targeting\":[{\"key\":\"rpfl_1001\",\"values\":[\"2_tier0100\"]}]}},\"wurl\":\"http://localhost:8080/event?t=win&b=880290288&a=5001&ts=1000&bidder=rubicon&f=i&int=dmbjs\"}},{\"type\":\"json\",\"value\":{\"id\":\"f227a07f-1579-4465-bc5e-5c5b02a0c180\",\"impid\":\"impStoredAuctionResponse\",\"price\":0.8,\"crid\":\"crid1\",\"wurl\":\"http://localhost:8080/event?t=win&b=f227a07f-1579-4465-bc5e-5c5b02a0c180&a=5001&ts=1000&bidder=rubicon&f=i&int=dmbjs\"}},{\"type\":\"json\",\"value\":{\"id\":\"928185755156387460\",\"impid\":\"impId131\",\"price\":1,\"adm\":\"{\\\"assets\\\":[{\\\"id\\\":0,\\\"img\\\":{\\\"url\\\":\\\"http://vcdn.adnxs.com/p/creative-image/5e/b6/de/c3/5eb6dec3-4854-4dcd-980a-347f36ab502e.jpg\\\",\\\"w\\\":3000,\\\"h\\\":2250,\\\"ext\\\":{\\\"appnexus\\\":{\\\"prevent_crop\\\":0}}}},{\\\"id\\\":1,\\\"title\\\":{\\\"text\\\":\\\"This is an example Prebid Native creative\\\"}},{\\\"id\\\":2,\\\"data\\\":{\\\"value\\\":\\\"Prebid.org\\\"}},{\\\"id\\\":3,\\\"data\\\":{\\\"value\\\":\\\"ThisisaPrebidNativeCreative.Therearemanylikeit,butthisoneismine.\\\"}}],\\\"link\\\":{\\\"url\\\":\\\"http://nym1-ib.adnxs.com/click?AAAAAAAA8D8AAAAAAADwPwAAAAAAAAAAAAAAAAAA8D8AAAAAAADwPwhdYz3ZyNFNG3fXpZUyLXNZ0o5aAAAAACrElgC-AwAAvgMAAAIAAAC98iUEeP4QAAAAAABVU0QAVVNEAAEAAQARIAAAAAABAgQCAAAAAAEAhBaSXgAAAAA./pp=${AUCTION_PRICE}/cnd=%21OwwGAQiGmooHEL3llyEY-PxDIAQoADoRZGVmYXVsdCNOWU0yOjQwMjM./bn=75922/test=1/referrer=prebid.org/clickenc=http%3A%2F%2Fprebid.org%2Fdev-docs%2Fshow-native-ads.html\\\"},\\\"imptrackers\\\":[\\\"http://nym1-ib.adnxs.com/openrtb_win?e=wqT_3QLFBqBFAwAAAwDWAAUBCNmku9QFEIi6jeuTm_LoTRib7t2u2tLMlnMqNgkAAAECCPA_EQEHEAAA8D8ZCQkIAAAhCQkI8D8pEQkAMQkJqAAAMKqI2wQ4vgdAvgdIAlC95ZchWPj8Q2AAaJFAeJLRBIABAYoBA1VTRJIFBvBQmAEBoAEBqAEBsAEAuAECwAEEyAEC0AEJ2AEA4AEB8AEAigI7dWYoJ2EnLCAxMzc2ODYwLCAxNTE5MzA5NDAxKTt1ZigncicsIDY5NTk1ODM3Nh4A8IqSAvUBIXRETkdfUWlHbW9vSEVMM2xseUVZQUNENF9FTXdBRGdBUUFSSXZnZFFxb2piQkZnQVlMTURhQUJ3QUhnQWdBRUFpQUVBa0FFQm1BRUJvQUVCcUFFRHNBRUF1UUVwaTRpREFBRHdQOEVCS1l1SWd3QUE4RF9KQVhfelYzek1zXzBfMlFFQUFBAQMkRHdQLUFCQVBVQgEOLEFKZ0NBS0FDQUxVQwUQBEwwCQjwTE1BQ0FNZ0NBT0FDQU9nQ0FQZ0NBSUFEQVpBREFKZ0RBYWdEaHBxS0I3b0RFV1JsWm1GMWJIUWpUbGxOTWpvME1ESXqaAjkhT3d3R0FRNvgA8E4tUHhESUFRb0FEb1JaR1ZtWVhWc2RDTk9XVTB5T2pRd01qTS7YAugH4ALH0wHqAgpwcmViaWQub3Jn8gIRCgZBRFZfSUQSBzEzNzY4NjDyARQMQ1BHXwEUNDM1MDMwOTjyAhEKBUNQARPwmQgxNDg0NzIzOIADAYgDAZADAJgDFKADAaoDAMADkBzIAwDYAwDgAwDoAwD4AwOABACSBAkvb3BlbnJ0YjKYBACiBAwxNTIuMTkzLjYuNzSoBJrMI7IEDAgAEAAYACAAMAA4ALgEAMAEAMgEANIEEWRlZmF1bHQjTllNMjo0MDIz2gQCCADgBADwBL3llyGIBQGYBQCgBf____8FA1ABqgULc29tZS1yZXEtaWTABQDJBQAFARTwP9IFCQkFC2QAAADYBQHgBQHwBd4C-gUECAAQAJAGAZgGAA..&s=08b1535744639c904684afe46e3c6c0e4786089f&test=1&referrer=prebid.org&pp=${AUCTION_PRICE}\\\"],\\\"jstracker\\\":\\\"\\\"}\",\"adid\":\"69595837\",\"adomain\":[\"appnexus.com\"],\"iurl\":\"http://nym1-ib.adnxs.com/cr?id=69595837\",\"cid\":\"958\",\"crid\":\"69595837\",\"cat\":[\"IAB20-3\"],\"ext\":{\"appnexus\":{\"brand_id\":1,\"brand_category_id\":1,\"auction_id\":5607483846416358664,\"bidder_id\":2,\"bid_ad_type\":3}},\"wurl\":\"http://localhost:8080/event?t=win&b=928185755156387460&a=5001&ts=1000&bidder=appnexus&f=i&int=dmbjs\"}},{\"type\":\"json\",\"value\":{\"id\":\"7706636740145184841\",\"impid\":\"impId3\",\"price\":5.5,\"adm\":\"some-test-ad\",\"adid\":\"29681110\",\"adomain\":[\"appnexus.com\"],\"iurl\":\"http://nym1-ib.adnxs.com/cr?id=29681110\",\"cid\":\"958\",\"crid\":\"29681110\",\"w\":300,\"h\":250,\"ext\":{\"appnexus\":{\"brand_id\":1,\"auction_id\":8189378542222915032,\"bidder_id\":2,\"bid_ad_type\":0,\"ranking_price\":0.0}},\"wurl\":\"http://localhost:8080/event?t=win&b=7706636740145184841&a=5001&ts=1000&bidder=appnexus&f=i&int=dmbjs\"}},{\"type\":\"xml\",\"value\":\"\",\"expiry\":120}]}", "responsebody": "{\"responses\":[{\"uuid\":\"91912e5b-dfa8-42bc-9c7e-df6ce0449c19\"},{\"uuid\":\"765e116a-5773-49d5-a648-0b97a9907a4e\"},{\"uuid\":\"117431c9-807a-41e1-82a7-dcd8f8875493\"},{\"uuid\":\"6cf69b42-96f5-4ba1-a984-a9b4d8ff21cf\"},{\"uuid\":\"c75130ed-bcdd-4821-ad91-90cf835615c5\"},{\"uuid\":\"683fe79f-6df7-4971-ac70-820e0486992d\"},{\"uuid\":\"4fe59ef5-6fb4-48c5-88b6-9870257fc49e\"},{\"uuid\":\"b2528f73-96ab-42ab-8f15-fbe6ed779a26\"}]}", "status": 200 } diff --git a/src/test/resources/org/prebid/server/it/openrtb2/rubicon_appnexus/test-cache-rubicon-appnexus-request.json b/src/test/resources/org/prebid/server/it/openrtb2/rubicon_appnexus/test-cache-rubicon-appnexus-request.json index 0dcf1e72cb3..b14a948a69a 100644 --- a/src/test/resources/org/prebid/server/it/openrtb2/rubicon_appnexus/test-cache-rubicon-appnexus-request.json +++ b/src/test/resources/org/prebid/server/it/openrtb2/rubicon_appnexus/test-cache-rubicon-appnexus-request.json @@ -77,7 +77,7 @@ "id": "880290288", "impid": "impId1", "price": 8.43, - "adm": "", + "adm": "", "crid": "crid1", "w": 300, "h": 250, diff --git a/src/test/resources/org/prebid/server/it/openrtb2/rubicon_appnexus_multi_bid/test-cache-rubicon-appnexus-request.json b/src/test/resources/org/prebid/server/it/openrtb2/rubicon_appnexus_multi_bid/test-cache-rubicon-appnexus-request.json index e84906d0f2e..964b53c686f 100644 --- a/src/test/resources/org/prebid/server/it/openrtb2/rubicon_appnexus_multi_bid/test-cache-rubicon-appnexus-request.json +++ b/src/test/resources/org/prebid/server/it/openrtb2/rubicon_appnexus_multi_bid/test-cache-rubicon-appnexus-request.json @@ -6,7 +6,7 @@ "id": "21521324", "impid": "impId1", "price": 12.43, - "adm": "", + "adm": "", "crid": "crid1", "w": 300, "h": 250, @@ -57,7 +57,7 @@ "id": "880290288", "impid": "impId1", "price": 8.43, - "adm": "", + "adm": "", "crid": "crid1", "w": 300, "h": 250, diff --git a/src/test/resources/org/prebid/server/it/openrtb2/synacormedia/test-cache-synacormedia-request.json b/src/test/resources/org/prebid/server/it/openrtb2/synacormedia/test-cache-synacormedia-request.json index d22654a542b..abf2fab21df 100644 --- a/src/test/resources/org/prebid/server/it/openrtb2/synacormedia/test-cache-synacormedia-request.json +++ b/src/test/resources/org/prebid/server/it/openrtb2/synacormedia/test-cache-synacormedia-request.json @@ -24,6 +24,7 @@ "psacentral.org" ], "nurl": "https://example.com/nurl", + "adm": "prebid.org wrapper", "cid": "cid002", "crid": "crid002", "w": 300, diff --git a/src/test/resources/org/prebid/server/it/openrtb2/zeroclickfraud/test-auction-zeroclickfraud-response.json b/src/test/resources/org/prebid/server/it/openrtb2/zeroclickfraud/test-auction-zeroclickfraud-response.json index 50684d8fff8..7b667fc46b9 100644 --- a/src/test/resources/org/prebid/server/it/openrtb2/zeroclickfraud/test-auction-zeroclickfraud-response.json +++ b/src/test/resources/org/prebid/server/it/openrtb2/zeroclickfraud/test-auction-zeroclickfraud-response.json @@ -97,7 +97,7 @@ "cache": [ { "uri": "{{ cache.endpoint }}", - "requestbody": "{\"puts\":[{\"type\":\"json\",\"value\":{\"id\":\"bid001\",\"impid\":\"impId001\",\"price\":7.77,\"adm\":\"adm001\",\"adid\":\"adid001\",\"cid\":\"cid001\",\"crid\":\"crid001\",\"w\":300,\"h\":250}},{\"type\":\"json\",\"value\":{\"id\":\"bid002\",\"impid\":\"impId002\",\"price\":9.99,\"nurl\":\"https://example.com/nurl\",\"adomain\":[\"psacentral.org\"],\"cid\":\"cid002\",\"crid\":\"crid002\",\"w\":300,\"h\":250}},{\"type\":\"xml\",\"value\":\"prebid.org wrapper\",\"expiry\":120}]}", + "requestbody": "{\"puts\":[{\"type\":\"json\",\"value\":{\"id\":\"bid001\",\"impid\":\"impId001\",\"price\":7.77,\"adm\":\"adm001\",\"adid\":\"adid001\",\"cid\":\"cid001\",\"crid\":\"crid001\",\"w\":300,\"h\":250}},{\"type\":\"json\",\"value\":{\"id\":\"bid002\",\"impid\":\"impId002\",\"price\":9.99,\"nurl\":\"https://example.com/nurl\",\"adm\":\"prebid.org wrapper\",\"adomain\":[\"psacentral.org\"],\"cid\":\"cid002\",\"crid\":\"crid002\",\"w\":300,\"h\":250}},{\"type\":\"xml\",\"value\":\"prebid.org wrapper\",\"expiry\":120}]}", "responsebody": "{\"responses\":[{\"uuid\":\"c1662cf6-f00a-4066-b71a-46d97abccc35\"},{\"uuid\":\"dbaa191c-5a56-4655-85eb-da079f94e09f\"},{\"uuid\":\"62019cff-d657-42fc-8366-16c34e1fd28c\"}]}", "status": 200 } diff --git a/src/test/resources/org/prebid/server/it/openrtb2/zeroclickfraud/test-cache-zeroclickfraud-request.json b/src/test/resources/org/prebid/server/it/openrtb2/zeroclickfraud/test-cache-zeroclickfraud-request.json index d22654a542b..abf2fab21df 100644 --- a/src/test/resources/org/prebid/server/it/openrtb2/zeroclickfraud/test-cache-zeroclickfraud-request.json +++ b/src/test/resources/org/prebid/server/it/openrtb2/zeroclickfraud/test-cache-zeroclickfraud-request.json @@ -24,6 +24,7 @@ "psacentral.org" ], "nurl": "https://example.com/nurl", + "adm": "prebid.org wrapper", "cid": "cid002", "crid": "crid002", "w": 300,