diff --git a/src/main/java/org/prebid/server/bidder/salunamedia/SaLunamediaBidder.java b/src/main/java/org/prebid/server/bidder/salunamedia/SaLunamediaBidder.java new file mode 100644 index 00000000000..162dbd4280e --- /dev/null +++ b/src/main/java/org/prebid/server/bidder/salunamedia/SaLunamediaBidder.java @@ -0,0 +1,88 @@ +package org.prebid.server.bidder.salunamedia; + +import com.fasterxml.jackson.databind.node.ObjectNode; +import com.iab.openrtb.request.BidRequest; +import com.iab.openrtb.response.Bid; +import com.iab.openrtb.response.BidResponse; +import com.iab.openrtb.response.SeatBid; +import io.vertx.core.http.HttpMethod; +import org.apache.commons.collections4.CollectionUtils; +import org.prebid.server.bidder.Bidder; +import org.prebid.server.bidder.model.BidderBid; +import org.prebid.server.bidder.model.BidderError; +import org.prebid.server.bidder.model.HttpCall; +import org.prebid.server.bidder.model.HttpRequest; +import org.prebid.server.bidder.model.Result; +import org.prebid.server.exception.PreBidException; +import org.prebid.server.json.DecodeException; +import org.prebid.server.json.JacksonMapper; +import org.prebid.server.proto.openrtb.ext.response.BidType; +import org.prebid.server.util.HttpUtil; + +import java.util.Collections; +import java.util.List; +import java.util.Objects; + +/** + * SaLunamedia {@link Bidder} implementation + */ +public class SaLunamediaBidder implements Bidder { + + private final String endpointUrl; + private final JacksonMapper mapper; + + public SaLunamediaBidder(String endpointUrl, JacksonMapper mapper) { + this.endpointUrl = HttpUtil.validateUrl(Objects.requireNonNull(endpointUrl)); + this.mapper = Objects.requireNonNull(mapper); + } + + @Override + public Result>> makeHttpRequests(BidRequest request) { + return Result.withValue(HttpRequest.builder() + .uri(endpointUrl) + .method(HttpMethod.POST) + .headers(HttpUtil.headers()) + .payload(request) + .body(mapper.encode(request)) + .build()); + } + + @Override + public Result> makeBids(HttpCall httpCall, BidRequest bidRequest) { + try { + final BidResponse bidResponse = mapper.decodeValue(httpCall.getResponse().getBody(), BidResponse.class); + return Result.of(extractBids(bidResponse), Collections.emptyList()); + } catch (DecodeException | PreBidException e) { + return Result.withError(BidderError.badServerResponse(e.getMessage())); + } + } + + private List extractBids(BidResponse bidResponse) { + final List seatBids = bidResponse != null ? bidResponse.getSeatbid() : null; + if (CollectionUtils.isEmpty(seatBids)) { + throw new PreBidException("Empty SeatBid"); + } + + final SeatBid firstSeatBid = seatBids.get(0); + final List bids = firstSeatBid != null ? firstSeatBid.getBid() : null; + if (CollectionUtils.isEmpty(bids)) { + throw new PreBidException("Empty SeatBid.Bids"); + } + + final Bid firstBid = bids.get(0); + final ObjectNode firstBidExt = firstBid != null ? firstBid.getExt() : null; + if (firstBidExt == null) { + throw new PreBidException("Missing BidExt"); + } + + return Collections.singletonList(BidderBid.of(firstBid, getBidType(firstBidExt), bidResponse.getCur())); + } + + private BidType getBidType(ObjectNode bidExt) { + try { + return mapper.mapper().convertValue(bidExt.get("mediaType"), BidType.class); + } catch (IllegalArgumentException e) { + throw new PreBidException(e.getMessage()); + } + } +} diff --git a/src/main/java/org/prebid/server/spring/config/bidder/SaLunamediaConfiguration.java b/src/main/java/org/prebid/server/spring/config/bidder/SaLunamediaConfiguration.java new file mode 100644 index 00000000000..1b58d2a8d57 --- /dev/null +++ b/src/main/java/org/prebid/server/spring/config/bidder/SaLunamediaConfiguration.java @@ -0,0 +1,51 @@ +package org.prebid.server.spring.config.bidder; + +import org.prebid.server.bidder.BidderDeps; +import org.prebid.server.bidder.salunamedia.SaLunamediaBidder; +import org.prebid.server.json.JacksonMapper; +import org.prebid.server.spring.config.bidder.model.BidderConfigurationProperties; +import org.prebid.server.spring.config.bidder.util.BidderDepsAssembler; +import org.prebid.server.spring.config.bidder.util.UsersyncerCreator; +import org.prebid.server.spring.env.YamlPropertySourceFactory; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Qualifier; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.boot.context.properties.ConfigurationProperties; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; +import org.springframework.context.annotation.PropertySource; + +import javax.validation.constraints.NotBlank; + +@Configuration +@PropertySource(value = "classpath:/bidder-config/salunamedia.yaml", factory = YamlPropertySourceFactory.class) +public class SaLunamediaConfiguration { + + private static final String BIDDER_NAME = "sa_lunamedia"; + + @Value("${external-url}") + @NotBlank + private String externalUrl; + + @Autowired + private JacksonMapper mapper; + + @Autowired + @Qualifier("salunamediaConfigurationProperties") + private BidderConfigurationProperties configProperties; + + @Bean("salunamediaConfigurationProperties") + @ConfigurationProperties("adapters.salunamedia") + BidderConfigurationProperties configurationProperties() { + return new BidderConfigurationProperties(); + } + + @Bean + BidderDeps saLunamediaBidderDeps() { + return BidderDepsAssembler.forBidder(BIDDER_NAME) + .withConfig(configProperties) + .usersyncerCreator(UsersyncerCreator.create(externalUrl)) + .bidderCreator(config -> new SaLunamediaBidder(config.getEndpoint(), mapper)) + .assemble(); + } +} diff --git a/src/main/resources/bidder-config/salunamedia.yaml b/src/main/resources/bidder-config/salunamedia.yaml new file mode 100644 index 00000000000..693ba80fb94 --- /dev/null +++ b/src/main/resources/bidder-config/salunamedia.yaml @@ -0,0 +1,27 @@ +adapters: + sa_lunamedia: + enabled: false + endpoint: https://mobile.mng-ads.com/bidrequest{{ZoneID}} + pbs-enforces-gdpr: true + pbs-enforces-ccpa: true + modifying-vast-xml-allowed: true + deprecated-names: + aliases: {} + meta-info: + maintainer-email: support@lunamedia.io + app-media-types: + - banner + - video + - native + site-media-types: + - banner + - video + - native + supported-vendors: + vendor-id: 998 + usersync: + url: https://cookie.lmgssp.com/pserver?gdpr={{gdpr}}&gdpr_consent={{gdpr_consent}}&ccpa={{us_privacy}}&redirect= + redirect-url: /setuid?bidder=sa_lunamedia&gdpr={{gdpr}}&gdpr_consent={{gdpr_consent}}&us_privacy={{us_privacy}}&uid=[UID] + cookie-family-name: sa_lunamedia + type: redirect + support-cors: false \ No newline at end of file diff --git a/src/main/resources/static/bidder-params/sa_lunamedia.json b/src/main/resources/static/bidder-params/sa_lunamedia.json new file mode 100644 index 00000000000..c1768081fa8 --- /dev/null +++ b/src/main/resources/static/bidder-params/sa_lunamedia.json @@ -0,0 +1,17 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Sa_Lunamedia Adapter Params", + "description": "A schema which validates params accepted by the Sa_Lunamedia adapter", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "network or placement key" + }, + "type": { + "type": "string", + "enum": ["network", "publisher"] + } + }, + "required": ["key"] +} \ No newline at end of file diff --git a/src/test/java/org/prebid/server/bidder/salunamedia/SaLunamediaBidderTest.java b/src/test/java/org/prebid/server/bidder/salunamedia/SaLunamediaBidderTest.java new file mode 100644 index 00000000000..4f0a6fe3259 --- /dev/null +++ b/src/test/java/org/prebid/server/bidder/salunamedia/SaLunamediaBidderTest.java @@ -0,0 +1,255 @@ +package org.prebid.server.bidder.salunamedia; + +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.node.ObjectNode; +import com.iab.openrtb.request.Banner; +import com.iab.openrtb.request.BidRequest; +import com.iab.openrtb.request.Imp; +import com.iab.openrtb.request.Video; +import com.iab.openrtb.response.Bid; +import com.iab.openrtb.response.BidResponse; +import com.iab.openrtb.response.SeatBid; +import org.junit.Before; +import org.junit.Test; +import org.prebid.server.VertxTest; +import org.prebid.server.bidder.model.BidderBid; +import org.prebid.server.bidder.model.BidderError; +import org.prebid.server.bidder.model.HttpCall; +import org.prebid.server.bidder.model.HttpRequest; +import org.prebid.server.bidder.model.HttpResponse; +import org.prebid.server.bidder.model.Result; + +import java.util.List; +import java.util.function.Function; +import java.util.stream.Collectors; + +import static java.util.Arrays.asList; +import static java.util.Collections.singletonList; +import static org.assertj.core.api.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThatIllegalArgumentException; +import static org.prebid.server.proto.openrtb.ext.response.BidType.banner; +import static org.prebid.server.proto.openrtb.ext.response.BidType.video; +import static org.prebid.server.proto.openrtb.ext.response.BidType.xNative; + +public class SaLunamediaBidderTest extends VertxTest { + + private static final String ENDPOINT_URL = "https://randomurl.com/{{ZoneID}}"; + + private SaLunamediaBidder saLunamediaBidder; + + @Before + public void setUp() { + saLunamediaBidder = new SaLunamediaBidder(ENDPOINT_URL, jacksonMapper); + } + + @Test + public void creationShouldFailOnInvalidEndpointUrl() { + assertThatIllegalArgumentException().isThrownBy( + () -> new SaLunamediaBidder("invalid_url", jacksonMapper)); + } + + @Test + public void makeHttpRequestsShouldReturnOnlyOneRequestForAllImps() { + // given + final BidRequest bidRequest = BidRequest.builder() + .imp(asList( + Imp.builder().id("123").banner(Banner.builder().build()).build(), + Imp.builder().id("456").video(Video.builder().build()).build())) + .build(); + + //when + final Result>> requests = saLunamediaBidder.makeHttpRequests(bidRequest); + + //then + assertThat(requests.getErrors()).isEmpty(); + assertThat(requests.getValue()).hasSize(1); + } + + @Test + public void makeBidsShouldReturnErrorIfResponseBodyCouldNotBeParsed() { + // given + final HttpCall httpCall = givenHttpCall(null, "invalid"); + + // when + final Result> result = saLunamediaBidder.makeBids(httpCall, null); + + // then + assertThat(result.getErrors()).hasSize(1) + .allSatisfy(error -> { + assertThat(error.getType()).isEqualTo(BidderError.Type.bad_server_response); + assertThat(error.getMessage()).startsWith("Failed to decode: Unrecognized token"); + }); + assertThat(result.getValue()).isEmpty(); + } + + @Test + public void makeBidsShouldReturnErrorIfBidResponseIsNull() throws JsonProcessingException { + // given + final HttpCall httpCall = givenHttpCall(null, mapper.writeValueAsString(null)); + + // when + final Result> result = saLunamediaBidder.makeBids(httpCall, null); + + // then + assertThat(result.getValue()).isEmpty(); + assertThat(result.getErrors()).containsExactly(BidderError.badServerResponse("Empty SeatBid")); + } + + @Test + public void makeBidsShouldReturnErrorIfBidResponseSeatBidIsNull() throws JsonProcessingException { + // given + final HttpCall httpCall = givenHttpCall(null, + mapper.writeValueAsString(BidResponse.builder().build())); + + // when + final Result> result = saLunamediaBidder.makeBids(httpCall, null); + + // then + assertThat(result.getValue()).isEmpty(); + assertThat(result.getErrors()).containsExactly(BidderError.badServerResponse("Empty SeatBid")); + } + + @Test + public void makeBidsShouldReturnErrorIfBidResponseFirstSeatBidHasEmptyBid() throws JsonProcessingException { + // given + final HttpCall httpCall = givenHttpCall(BidRequest.builder() + .imp(singletonList(Imp.builder().build())) + .build(), + mapper.writeValueAsString(BidResponse.builder().seatbid(singletonList(null)).build())); + + // when + final Result> result = saLunamediaBidder.makeBids(httpCall, null); + + // then + assertThat(result.getValue()).isEmpty(); + assertThat(result.getErrors()).containsExactly(BidderError.badServerResponse("Empty SeatBid.Bids")); + } + + @Test + public void makeBidsShouldReturnErrorIfBidResponseFirstBidOfFirstSeatBidHasEmptyExt() + throws JsonProcessingException { + // given + final HttpCall httpCall = givenHttpCall(BidRequest.builder() + .imp(singletonList(Imp.builder().build())) + .build(), + mapper.writeValueAsString(givenBidResponse(bidBuilder -> bidBuilder.impid("123")))); + + // when + final Result> result = saLunamediaBidder.makeBids(httpCall, null); + + // then + assertThat(result.getValue()).isEmpty(); + assertThat(result.getErrors()).containsExactly(BidderError.badServerResponse("Missing BidExt")); + } + + @Test + public void makeBidsShouldReturnErrorIfBidResponseFirstBidHasInvalidMediaType() throws JsonProcessingException { + // given + final HttpCall httpCall = givenHttpCall( + BidRequest.builder() + .imp(singletonList(Imp.builder().build())) + .build(), + mapper.writeValueAsString(givenBidResponses(singletonList(bidBuilder -> bidBuilder.impid("123").ext( + jacksonMapper.mapper().createObjectNode().put("mediaType", "invalid_type ")))))); + + // when + final Result> result = saLunamediaBidder.makeBids(httpCall, null); + + // then + assertThat(result.getValue()).isEmpty(); + assertThat(result.getErrors()).hasSize(1) + .allSatisfy(error -> { + assertThat(error.getType()).isEqualTo(BidderError.Type.bad_server_response); + assertThat(error.getMessage()).startsWith("Cannot deserialize value of type"); + }); + } + + @Test + public void makeBidsShouldReturnNativeBidIfExtMediatypeIsNative() throws JsonProcessingException { + // given + final ObjectNode mediaTypeObjectNode = jacksonMapper.mapper() + .createObjectNode().put("mediaType", "native"); + final HttpCall httpCall = givenHttpCall( + BidRequest.builder() + .imp(singletonList(Imp.builder().build())) + .build(), + mapper.writeValueAsString(givenBidResponses(asList( + bidBuilder -> bidBuilder.impid("123").ext(mediaTypeObjectNode), + bidBuilder -> bidBuilder.impid("345").ext(mediaTypeObjectNode))))); + + // when + final Result> result = saLunamediaBidder.makeBids(httpCall, null); + + // then + assertThat(result.getErrors()).isEmpty(); + assertThat(result.getValue()).containsExactly(BidderBid.of( + Bid.builder().impid("123").ext(mediaTypeObjectNode).build(), xNative, null)); + } + + @Test + public void makeBidsShouldReturnBannerBidIfExtMediatypeIsBanner() throws JsonProcessingException { + // given + final ObjectNode mediaTypeObjectNode = jacksonMapper.mapper() + .createObjectNode().put("mediaType", "banner"); + final HttpCall httpCall = givenHttpCall( + BidRequest.builder() + .imp(singletonList(Imp.builder().build())) + .build(), + mapper.writeValueAsString(givenBidResponses(asList( + bidBuilder -> bidBuilder.impid("123").ext(mediaTypeObjectNode), + bidBuilder -> bidBuilder.impid("345").ext(mediaTypeObjectNode))))); + + // when + final Result> result = saLunamediaBidder.makeBids(httpCall, null); + + // then + assertThat(result.getErrors()).isEmpty(); + assertThat(result.getValue()).containsExactly(BidderBid.of( + Bid.builder().impid("123").ext(mediaTypeObjectNode).build(), banner, null)); + } + + @Test + public void makeBidsShouldReturnVideoBidIfExtMediatypeIsVideo() throws JsonProcessingException { + // given + final ObjectNode mediaTypeObjectNode = jacksonMapper.mapper() + .createObjectNode().put("mediaType", "video"); + final HttpCall httpCall = givenHttpCall( + BidRequest.builder() + .imp(singletonList(Imp.builder().build())) + .build(), + mapper.writeValueAsString(givenBidResponses(asList( + bidBuilder -> bidBuilder.impid("123").ext(mediaTypeObjectNode), + bidBuilder -> bidBuilder.impid("345").ext(mediaTypeObjectNode))))); + + // when + final Result> result = saLunamediaBidder.makeBids(httpCall, null); + + // then + assertThat(result.getErrors()).isEmpty(); + assertThat(result.getValue()).containsExactly(BidderBid.of( + Bid.builder().impid("123").ext(mediaTypeObjectNode).build(), video, null)); + } + + private static BidResponse givenBidResponse(Function bidCustomizer) { + return BidResponse.builder() + .seatbid(singletonList(SeatBid.builder().bid(singletonList(bidCustomizer.apply(Bid.builder()).build())) + .build())) + .build(); + } + + private static BidResponse givenBidResponses(List> bidCustomizers) { + return BidResponse.builder() + .seatbid(bidCustomizers.stream().map(customizer -> SeatBid.builder() + .bid(singletonList(customizer.apply(Bid.builder()).build())) + .build()) + .collect(Collectors.toList())) + .build(); + } + + private static HttpCall givenHttpCall(BidRequest bidRequest, String body) { + return HttpCall.success( + HttpRequest.builder().payload(bidRequest).build(), + HttpResponse.of(200, null, body), + null); + } +} diff --git a/src/test/java/org/prebid/server/it/SaLunamediaTest.java b/src/test/java/org/prebid/server/it/SaLunamediaTest.java new file mode 100644 index 00000000000..ff51d1a8291 --- /dev/null +++ b/src/test/java/org/prebid/server/it/SaLunamediaTest.java @@ -0,0 +1,50 @@ +package org.prebid.server.it; + +import io.restassured.response.Response; +import org.json.JSONException; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.skyscreamer.jsonassert.JSONAssert; +import org.skyscreamer.jsonassert.JSONCompareMode; +import org.springframework.test.context.junit4.SpringRunner; + +import java.io.IOException; + +import static com.github.tomakehurst.wiremock.client.WireMock.aResponse; +import static com.github.tomakehurst.wiremock.client.WireMock.equalTo; +import static com.github.tomakehurst.wiremock.client.WireMock.equalToJson; +import static com.github.tomakehurst.wiremock.client.WireMock.post; +import static com.github.tomakehurst.wiremock.client.WireMock.urlPathEqualTo; +import static io.restassured.RestAssured.given; +import static java.util.Collections.singletonList; + +@RunWith(SpringRunner.class) +public class SaLunamediaTest extends IntegrationTest { + + @Test + public void openrtb2AuctionShouldRespondWithBidsFromSaLunamedia() throws IOException, JSONException { + // given + WIRE_MOCK_RULE.stubFor(post(urlPathEqualTo("/salunamedia-exchange")) + .withHeader("Accept", equalTo("application/json")) + .withHeader("Content-Type", equalTo("application/json;charset=UTF-8")) + .withRequestBody(equalToJson(jsonFrom("openrtb2/salunamedia/test-salunamedia-bid-request.json"))) + .willReturn(aResponse().withBody(jsonFrom("openrtb2/salunamedia/test-salunamedia-bid-response.json")))); + + // when + final Response response = given(SPEC) + .header("Referer", "http://www.example.com") + .header("X-Forwarded-For", "193.168.244.1") + .header("User-Agent", "userAgent") + .header("Origin", "http://www.example.com") + .body(jsonFrom("openrtb2/salunamedia/test-auction-salunamedia-request.json")) + .post("/openrtb2/auction"); + + // then + final String expectedAuctionResponse = openrtbAuctionResponseFrom( + "openrtb2/salunamedia/test-auction-salunamedia-response.json", + response, singletonList("sa_lunamedia")); + + JSONAssert.assertEquals(expectedAuctionResponse, response.asString(), JSONCompareMode.NON_EXTENSIBLE); + } +} + diff --git a/src/test/resources/org/prebid/server/it/openrtb2/salunamedia/test-auction-salunamedia-request.json b/src/test/resources/org/prebid/server/it/openrtb2/salunamedia/test-auction-salunamedia-request.json new file mode 100644 index 00000000000..26f747b7cad --- /dev/null +++ b/src/test/resources/org/prebid/server/it/openrtb2/salunamedia/test-auction-salunamedia-request.json @@ -0,0 +1,38 @@ +{ + "id": "tid", + "imp": [ + { + "id": "impId001", + "banner": { + "w": 300, + "h": 250 + }, + "ext": { + "sa_lunamedia": { + "key": "someKey" + } + } + } + ], + "ext": { + "prebid": { + "targeting": { + "pricegranularity": { + "precision": 2, + "ranges": [ + { + "max": 20, + "increment": 0.1 + } + ] + } + }, + "auctiontimestamp": 1000 + } + }, + "regs": { + "ext": { + "gdpr": 0 + } + } +} diff --git a/src/test/resources/org/prebid/server/it/openrtb2/salunamedia/test-auction-salunamedia-response.json b/src/test/resources/org/prebid/server/it/openrtb2/salunamedia/test-auction-salunamedia-response.json new file mode 100644 index 00000000000..6db0455ca3d --- /dev/null +++ b/src/test/resources/org/prebid/server/it/openrtb2/salunamedia/test-auction-salunamedia-response.json @@ -0,0 +1,47 @@ +{ + "id": "tid", + "seatbid": [ + { + "bid": [ + { + "id": "bid001", + "impid": "impId001", + "price": 3.33, + "adm": "adm001", + "adid": "adid001", + "cid": "cid001", + "crid": "crid001", + "w": 300, + "h": 250, + "ext": { + "prebid": { + "type": "banner", + "targeting": { + "hb_pb": "3.30", + "hb_size_sa_lunamedia": "300x250", + "hb_bidder_sa_lunamedia": "sa_lunamedia", + "hb_size": "300x250", + "hb_bidder": "sa_lunamedia", + "hb_pb_sa_lunamedia": "3.30" + } + }, + "mediaType": "banner", + "origbidcpm": 3.33 + } + } + ], + "seat": "sa_lunamedia", + "group": 0 + } + ], + "cur": "USD", + "ext": { + "responsetimemillis": { + "sa_lunamedia": "{{ sa_lunamedia.response_time_ms }}" + }, + "prebid": { + "auctiontimestamp": 1000 + }, + "tmaxrequest": 2000 + } +} diff --git a/src/test/resources/org/prebid/server/it/openrtb2/salunamedia/test-salunamedia-bid-request.json b/src/test/resources/org/prebid/server/it/openrtb2/salunamedia/test-salunamedia-bid-request.json new file mode 100644 index 00000000000..4a5c4d59b49 --- /dev/null +++ b/src/test/resources/org/prebid/server/it/openrtb2/salunamedia/test-salunamedia-bid-request.json @@ -0,0 +1,59 @@ +{ + "id": "tid", + "imp": [ + { + "id": "impId001", + "banner": { + "w": 300, + "h": 250 + }, + "ext": { + "bidder": { + "key": "someKey" + } + } + } + ], + "site": { + "domain": "www.example.com", + "page": "http://www.example.com", + "publisher": { + "domain": "example.com" + }, + "ext": { + "amp": 0 + } + }, + "device": { + "ua": "userAgent", + "ip": "193.168.244.1" + }, + "at": 1, + "tmax": 2000, + "cur": [ + "USD" + ], + "regs": { + "ext": { + "gdpr": 0 + } + }, + "ext": { + "prebid": { + "targeting": { + "pricegranularity": { + "precision": 2, + "ranges": [ + { + "max": 20, + "increment": 0.1 + } + ] + }, + "includewinners": true, + "includebidderkeys": true + }, + "auctiontimestamp": 1000 + } + } +} diff --git a/src/test/resources/org/prebid/server/it/openrtb2/salunamedia/test-salunamedia-bid-response.json b/src/test/resources/org/prebid/server/it/openrtb2/salunamedia/test-salunamedia-bid-response.json new file mode 100644 index 00000000000..ea286d47f48 --- /dev/null +++ b/src/test/resources/org/prebid/server/it/openrtb2/salunamedia/test-salunamedia-bid-response.json @@ -0,0 +1,23 @@ +{ + "id": "tid", + "seatbid": [ + { + "bid": [ + { + "id": "bid001", + "impid": "impId001", + "price": 3.33, + "adid": "adid001", + "crid": "crid001", + "cid": "cid001", + "adm": "adm001", + "h": 250, + "w": 300, + "ext": { + "mediaType": "banner" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/src/test/resources/org/prebid/server/it/test-application.properties b/src/test/resources/org/prebid/server/it/test-application.properties index 52053edd212..3293257fd00 100644 --- a/src/test/resources/org/prebid/server/it/test-application.properties +++ b/src/test/resources/org/prebid/server/it/test-application.properties @@ -334,6 +334,10 @@ adapters.rubicon.pbs-enforces-gdpr=true adapters.rubicon.XAPI.Username=rubicon_user adapters.rubicon.XAPI.Password=rubicon_password adapters.rubicon.usersync.url=http://localhost:8090/rubicon-usersync?gdpr={{gdpr}}&gdpr_consent={{gdpr_consent}} +adapters.salunamedia.enabled=true +adapters.salunamedia.endpoint=http://localhost:8090/salunamedia-exchange +adapters.salunamedia.pbs-enforces-gdpr=true +adapters.salunamedia.usersync.url=//salunamedia-usersync adapters.smaato.enabled=true adapters.smaato.endpoint=http://localhost:8090/smaato-exchange adapters.smaato.pbs-enforces-gdpr=true