diff --git a/src/test/java/org/prebid/server/it/ApplicationTest.java b/src/test/java/org/prebid/server/it/ApplicationTest.java index 46435753e58..f815cd52702 100644 --- a/src/test/java/org/prebid/server/it/ApplicationTest.java +++ b/src/test/java/org/prebid/server/it/ApplicationTest.java @@ -278,8 +278,11 @@ public void ampShouldReturnTargeting() throws IOException, JSONException { + "&consent_string=1YNN"); // then - JSONAssert.assertEquals(jsonFrom("amp/test-amp-response.json"), response.asString(), - JSONCompareMode.NON_EXTENSIBLE); + final String expectedAuctionResponse = openrtbAuctionResponseFrom( + "amp/test-amp-response.json", + response, + asList(RUBICON, APPNEXUS)); + JSONAssert.assertEquals(expectedAuctionResponse, response.asString(), JSONCompareMode.NON_EXTENSIBLE); } @Test diff --git a/src/test/java/org/prebid/server/it/IntegrationTest.java b/src/test/java/org/prebid/server/it/IntegrationTest.java index fbc2e0c110d..67485310031 100644 --- a/src/test/java/org/prebid/server/it/IntegrationTest.java +++ b/src/test/java/org/prebid/server/it/IntegrationTest.java @@ -104,7 +104,8 @@ private static String auctionResponseFrom(String templatePath, Response response .replaceAll("\\{\\{ cache.endpoint }}", cacheEndpoint) .replaceAll("\\{\\{ cache.resource_url }}", cacheEndpoint + "?uuid=") .replaceAll("\\{\\{ cache.host }}", hostAndPort) - .replaceAll("\\{\\{ cache.path }}", cachePath); + .replaceAll("\\{\\{ cache.path }}", cachePath) + .replaceAll("\\{\\{ event.url }}", "http://localhost:8080/event?"); for (final String bidder : bidders) { result = result.replaceAll("\\{\\{ " + bidder + "\\.exchange_uri }}", diff --git a/src/test/resources/org/prebid/server/it/amp/test-amp-response.json b/src/test/resources/org/prebid/server/it/amp/test-amp-response.json index dad9a1cffc6..734e6c6e282 100644 --- a/src/test/resources/org/prebid/server/it/amp/test-amp-response.json +++ b/src/test/resources/org/prebid/server/it/amp/test-amp-response.json @@ -13,12 +13,12 @@ "hb_bidder_rubicon": "rubicon", "hb_size_appnexus": "300x250", "rpfl_1001": "2_tier0100", - "hb_cache_host": "localhost:8090", - "hb_cache_path": "/cache", - "hb_cache_host_rubicon": "localhost:8090", - "hb_cache_path_rubicon": "/cache", - "hb_cache_host_appnexus": "localhost:8090", - "hb_cache_path_appnexus": "/cache", + "hb_cache_host": "{{ cache.host }}", + "hb_cache_path": "{{ cache.path }}", + "hb_cache_host_rubicon": "{{ cache.host }}", + "hb_cache_path_rubicon": "{{ cache.path }}", + "hb_cache_host_appnexus": "{{ cache.host }}", + "hb_cache_path_appnexus": "{{ cache.path }}", "static_keyword1": "static_value1" } } \ No newline at end of file diff --git a/src/test/resources/org/prebid/server/it/openrtb2/invibes/test-auction-invibes-response.json b/src/test/resources/org/prebid/server/it/openrtb2/invibes/test-auction-invibes-response.json index f013f8816aa..e645a933457 100644 --- a/src/test/resources/org/prebid/server/it/openrtb2/invibes/test-auction-invibes-response.json +++ b/src/test/resources/org/prebid/server/it/openrtb2/invibes/test-auction-invibes-response.json @@ -32,7 +32,7 @@ }, "cache":{ "bids":{ - "url":"http://localhost:8090/cache?uuid=f0ab9105-cb21-4e59-b433-70f5ad6671cb", + "url":"{{ cache.resource_url }}f0ab9105-cb21-4e59-b433-70f5ad6671cb", "cacheId":"f0ab9105-cb21-4e59-b433-70f5ad6671cb" } } 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 f41891fa158..9add631496a 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 @@ -30,8 +30,8 @@ } }, "events": { - "win": "http://localhost:8080/event?t=win&b=a121a07f-1579-4465-bc5e-5c5b02a0c421&a=5001&ts=1000&bidder=appnexus&f=i&int=dmbjs", - "imp": "http://localhost:8080/event?t=imp&b=a121a07f-1579-4465-bc5e-5c5b02a0c421&a=5001&ts=1000&bidder=appnexus&f=i&int=dmbjs" + "win": "{{ event.url }}t=win&b=a121a07f-1579-4465-bc5e-5c5b02a0c421&a=5001&ts=1000&bidder=appnexus&f=i&int=dmbjs", + "imp": "{{ event.url }}t=imp&b=a121a07f-1579-4465-bc5e-5c5b02a0c421&a=5001&ts=1000&bidder=appnexus&f=i&int=dmbjs" } } } @@ -68,8 +68,8 @@ "hb_cache_path_appnexus": "{{ cache.path }}" }, "events": { - "win": "http://localhost:8080/event?t=win&b=7706636740145184841&a=5001&ts=1000&bidder=appnexus&f=i&int=dmbjs", - "imp": "http://localhost:8080/event?t=imp&b=7706636740145184841&a=5001&ts=1000&bidder=appnexus&f=i&int=dmbjs" + "win": "{{ event.url }}t=win&b=7706636740145184841&a=5001&ts=1000&bidder=appnexus&f=i&int=dmbjs", + "imp": "{{ event.url }}t=imp&b=7706636740145184841&a=5001&ts=1000&bidder=appnexus&f=i&int=dmbjs" }, "cache": { "bids": { @@ -120,8 +120,8 @@ "hb_cache_path_appnexus": "{{ cache.path }}" }, "events": { - "win": "http://localhost:8080/event?t=win&b=928185755156387460&a=5001&ts=1000&bidder=appnexus&f=i&int=dmbjs", - "imp": "http://localhost:8080/event?t=imp&b=928185755156387460&a=5001&ts=1000&bidder=appnexus&f=i&int=dmbjs" + "win": "{{ event.url }}t=win&b=928185755156387460&a=5001&ts=1000&bidder=appnexus&f=i&int=dmbjs", + "imp": "{{ event.url }}t=imp&b=928185755156387460&a=5001&ts=1000&bidder=appnexus&f=i&int=dmbjs" }, "cache": { "bids": { @@ -174,8 +174,8 @@ "hb_cache_path_appnexusAlias": "{{ cache.path }}" }, "events": { - "win": "http://localhost:8080/event?t=win&b=7706636740145184840&a=5001&ts=1000&bidder=appnexusAlias&f=i&int=dmbjs", - "imp": "http://localhost:8080/event?t=imp&b=7706636740145184840&a=5001&ts=1000&bidder=appnexusAlias&f=i&int=dmbjs" + "win": "{{ event.url }}t=win&b=7706636740145184840&a=5001&ts=1000&bidder=appnexusAlias&f=i&int=dmbjs", + "imp": "{{ event.url }}t=imp&b=7706636740145184840&a=5001&ts=1000&bidder=appnexusAlias&f=i&int=dmbjs" }, "cache": { "bids": { @@ -229,8 +229,8 @@ } }, "events": { - "win": "http://localhost:8080/event?t=win&b=f227a07f-1579-4465-bc5e-5c5b02a0c181&a=5001&ts=1000&bidder=rubicon&f=i&int=dmbjs", - "imp": "http://localhost:8080/event?t=imp&b=f227a07f-1579-4465-bc5e-5c5b02a0c181&a=5001&ts=1000&bidder=rubicon&f=i&int=dmbjs" + "win": "{{ event.url }}t=win&b=f227a07f-1579-4465-bc5e-5c5b02a0c181&a=5001&ts=1000&bidder=rubicon&f=i&int=dmbjs", + "imp": "{{ event.url }}t=imp&b=f227a07f-1579-4465-bc5e-5c5b02a0c181&a=5001&ts=1000&bidder=rubicon&f=i&int=dmbjs" } } } @@ -257,8 +257,8 @@ } }, "events": { - "win": "http://localhost:8080/event?t=win&b=f227a07f-1579-4465-bc5e-5c5b02a0c180&a=5001&ts=1000&bidder=rubicon&f=i&int=dmbjs", - "imp": "http://localhost:8080/event?t=imp&b=f227a07f-1579-4465-bc5e-5c5b02a0c180&a=5001&ts=1000&bidder=rubicon&f=i&int=dmbjs" + "win": "{{ event.url }}t=win&b=f227a07f-1579-4465-bc5e-5c5b02a0c180&a=5001&ts=1000&bidder=rubicon&f=i&int=dmbjs", + "imp": "{{ event.url }}t=imp&b=f227a07f-1579-4465-bc5e-5c5b02a0c180&a=5001&ts=1000&bidder=rubicon&f=i&int=dmbjs" } } } @@ -267,7 +267,7 @@ "id": "880290288", "impid": "impId1", "price": 8.43, - "adm": "", + "adm": "", "crid": "crid1", "w": 300, "h": 250, @@ -292,8 +292,8 @@ "hb_cache_path_rubicon": "{{ cache.path }}" }, "events": { - "win": "http://localhost:8080/event?t=win&b=880290288&a=5001&ts=1000&bidder=rubicon&f=i&int=dmbjs", - "imp": "http://localhost:8080/event?t=imp&b=880290288&a=5001&ts=1000&bidder=rubicon&f=i&int=dmbjs" + "win": "{{ event.url }}t=win&b=880290288&a=5001&ts=1000&bidder=rubicon&f=i&int=dmbjs", + "imp": "{{ event.url }}t=imp&b=880290288&a=5001&ts=1000&bidder=rubicon&f=i&int=dmbjs" }, "cache": { "vastXml": { @@ -346,8 +346,8 @@ "hb_cache_path_rubicon": "{{ cache.path }}" }, "events": { - "win": "http://localhost:8080/event?t=win&b=466223845&a=5001&ts=1000&bidder=rubicon&f=i&int=dmbjs", - "imp": "http://localhost:8080/event?t=imp&b=466223845&a=5001&ts=1000&bidder=rubicon&f=i&int=dmbjs" + "win": "{{ event.url }}t=win&b=466223845&a=5001&ts=1000&bidder=rubicon&f=i&int=dmbjs", + "imp": "{{ event.url }}t=imp&b=466223845&a=5001&ts=1000&bidder=rubicon&f=i&int=dmbjs" }, "cache": { "bids": { diff --git a/src/test/resources/org/prebid/server/it/openrtb2/smartrtb/test-auction-smartrtb-response.json b/src/test/resources/org/prebid/server/it/openrtb2/smartrtb/test-auction-smartrtb-response.json index e8dcb65eb06..651a7c8f18f 100644 --- a/src/test/resources/org/prebid/server/it/openrtb2/smartrtb/test-auction-smartrtb-response.json +++ b/src/test/resources/org/prebid/server/it/openrtb2/smartrtb/test-auction-smartrtb-response.json @@ -13,18 +13,18 @@ "cache": { "bids": { "cacheId": "f0ab9105-cb21-4e59-b433-70f5ad6671cb", - "url": "http://localhost:8090/cache?uuid=f0ab9105-cb21-4e59-b433-70f5ad6671cb" + "url": "{{ cache.resource_url }}f0ab9105-cb21-4e59-b433-70f5ad6671cb" } }, "targeting": { "hb_bidder": "smartrtb", "hb_bidder_smartrtb": "smartrtb", - "hb_cache_host": "localhost:8090", - "hb_cache_host_smartrtb": "localhost:8090", + "hb_cache_host": "{{ cache.host }}", + "hb_cache_host_smartrtb": "{{ cache.host }}", "hb_cache_id": "f0ab9105-cb21-4e59-b433-70f5ad6671cb", "hb_cache_id_smartrtb": "f0ab9105-cb21-4e59-b433-70f5ad6671cb", - "hb_cache_path": "/cache", - "hb_cache_path_smartrtb": "/cache", + "hb_cache_path": "{{ cache.path }}", + "hb_cache_path_smartrtb": "{{ cache.path }}", "hb_pb": "0.00", "hb_pb_smartrtb": "0.00" }, diff --git a/src/test/resources/org/prebid/server/it/openrtb2/triplelift/test-auction-triplelift-response.json b/src/test/resources/org/prebid/server/it/openrtb2/triplelift/test-auction-triplelift-response.json index c06053eea40..70132708685 100644 --- a/src/test/resources/org/prebid/server/it/openrtb2/triplelift/test-auction-triplelift-response.json +++ b/src/test/resources/org/prebid/server/it/openrtb2/triplelift/test-auction-triplelift-response.json @@ -36,7 +36,7 @@ }, "cache": { "bids": { - "url": "http://localhost:8090/cache?uuid=5b9f507f-2ae9-4111-a697-796f3174df10", + "url": "{{ cache.resource_url }}5b9f507f-2ae9-4111-a697-796f3174df10", "cacheId": "5b9f507f-2ae9-4111-a697-796f3174df10" } } diff --git a/src/test/resources/org/prebid/server/it/openrtb2/tripleliftnative/test-auction-triplelift-native-response.json b/src/test/resources/org/prebid/server/it/openrtb2/tripleliftnative/test-auction-triplelift-native-response.json index 570aefa9feb..5d4d995e0f1 100644 --- a/src/test/resources/org/prebid/server/it/openrtb2/tripleliftnative/test-auction-triplelift-native-response.json +++ b/src/test/resources/org/prebid/server/it/openrtb2/tripleliftnative/test-auction-triplelift-native-response.json @@ -36,7 +36,7 @@ }, "cache": { "bids": { - "url": "http://localhost:8090/cache?uuid=029e95ca-1a14-4e45-9669-8ad8d667de50", + "url": "{{ cache.resource_url }}029e95ca-1a14-4e45-9669-8ad8d667de50", "cacheId": "029e95ca-1a14-4e45-9669-8ad8d667de50" } }