Skip to content

Commit

Permalink
Merge branch 'master' into add-pgamssp-bidder
Browse files Browse the repository at this point in the history
  • Loading branch information
SerhiiNahornyi committed Oct 26, 2023
2 parents 7260bf0 + 05276e4 commit fc67245
Show file tree
Hide file tree
Showing 13 changed files with 165 additions and 10 deletions.
8 changes: 4 additions & 4 deletions extra/bundle/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>org.prebid</groupId>
<artifactId>prebid-server-aggregator</artifactId>
<version>2.1.0-SNAPSHOT</version>
<version>2.2.0-SNAPSHOT</version>
<relativePath>../../extra/pom.xml</relativePath>
</parent>

Expand Down Expand Up @@ -74,17 +74,17 @@
<dependency>
<groupId>org.prebid</groupId>
<artifactId>prebid-server</artifactId>
<version>2.1.0-SNAPSHOT</version>
<version>2.2.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.prebid.server.hooks.modules</groupId>
<artifactId>confiant-ad-quality</artifactId>
<version>2.1.0-SNAPSHOT</version>
<version>2.2.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.prebid.server.hooks.modules</groupId>
<artifactId>ortb2-blocking</artifactId>
<version>2.1.0-SNAPSHOT</version>
<version>2.2.0-SNAPSHOT</version>
</dependency>
</dependencies>

Expand Down
2 changes: 1 addition & 1 deletion extra/modules/confiant-ad-quality/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>org.prebid.server.hooks.modules</groupId>
<artifactId>all-modules</artifactId>
<version>2.1.0-SNAPSHOT</version>
<version>2.2.0-SNAPSHOT</version>
</parent>

<artifactId>confiant-ad-quality</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion extra/modules/ortb2-blocking/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>org.prebid.server.hooks.modules</groupId>
<artifactId>all-modules</artifactId>
<version>2.1.0-SNAPSHOT</version>
<version>2.2.0-SNAPSHOT</version>
</parent>

<artifactId>ortb2-blocking</artifactId>
Expand Down
4 changes: 2 additions & 2 deletions extra/modules/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>org.prebid</groupId>
<artifactId>prebid-server-aggregator</artifactId>
<version>2.1.0-SNAPSHOT</version>
<version>2.2.0-SNAPSHOT</version>
<relativePath>../../extra/pom.xml</relativePath>
</parent>

Expand All @@ -28,7 +28,7 @@
<maven.compiler.source>${java.version}</maven.compiler.source>
<maven.compiler.target>${java.version}</maven.compiler.target>

<prebid-server.version>2.1.0-SNAPSHOT</prebid-server.version>
<prebid-server.version>2.2.0-SNAPSHOT</prebid-server.version>

<lombok.version>1.18.22</lombok.version>

Expand Down
2 changes: 1 addition & 1 deletion extra/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<groupId>org.prebid</groupId>
<artifactId>prebid-server-aggregator</artifactId>
<version>2.1.0-SNAPSHOT</version>
<version>2.2.0-SNAPSHOT</version>
<packaging>pom</packaging>

<scm>
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>org.prebid</groupId>
<artifactId>prebid-server-aggregator</artifactId>
<version>2.1.0-SNAPSHOT</version>
<version>2.2.0-SNAPSHOT</version>
<relativePath>extra/pom.xml</relativePath>
</parent>

Expand Down
3 changes: 3 additions & 0 deletions src/main/resources/bidder-config/limelightDigital.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ adapters:
adsyield:
enabled: false
endpoint: http://ads-pbs.open-adsyield.com/openrtb/{{PublisherID}}?host={{Host}}
greedygame:
enabled: false
endpoint: http://ads-pbs.rtb-greedygame.com/openrtb/{{.PublisherID}}?host={{.Host}}
meta-info:
maintainer-email: engineering@project-limelight.com
app-media-types:
Expand Down
38 changes: 38 additions & 0 deletions src/test/java/org/prebid/server/it/GreedyGameTest.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
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.prebid.server.model.Endpoint;
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.equalToJson;
import static com.github.tomakehurst.wiremock.client.WireMock.post;
import static com.github.tomakehurst.wiremock.client.WireMock.urlPathEqualTo;
import static java.util.Collections.singletonList;

@RunWith(SpringRunner.class)
public class GreedyGameTest extends IntegrationTest {

@Test
public void openrtb2AuctionShouldRespondWithBidsFromTheGreedyGameBidder() throws IOException, JSONException {
// given
WIRE_MOCK_RULE.stubFor(post(urlPathEqualTo("/greedygame-exchange/test.host/123456"))
.withRequestBody(equalToJson(
jsonFrom("openrtb2/greedygame/test-greedygame-bid-request.json")))
.willReturn(aResponse().withBody(
jsonFrom("openrtb2/greedygame/test-greedygame-bid-response.json"))));

// when
final Response response = responseFor("openrtb2/greedygame/test-auction-greedygame-request.json",
Endpoint.openrtb2_auction);

// then
assertJsonEquals("openrtb2/greedygame/test-auction-greedygame-response.json", response,
singletonList("greedygame"));
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"id": "request_id",
"imp": [
{
"id": "imp_id",
"banner": {
"w": 300,
"h": 250
},
"ext": {
"greedygame": {
"host": "test.host",
"publisherId": "123456"
}
}
}
],
"tmax": 5000,
"regs": {
"ext": {
"gdpr": 0
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{
"id": "request_id",
"seatbid": [
{
"bid": [
{
"id": "bid_id",
"impid": "imp_id",
"price": 3.33,
"crid": "creativeId",
"ext": {
"origbidcpm": 3.33,
"prebid": {
"type": "banner"
}
}
}
],
"seat": "greedygame",
"group": 0
}
],
"cur": "USD",
"ext": {
"responsetimemillis": {
"greedygame": "{{ greedygame.response_time_ms }}"
},
"prebid": {
"auctiontimestamp": 0
},
"tmaxrequest": 5000
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
{
"id": "request_id-imp_id",
"imp": [
{
"id": "imp_id",
"secure": 1,
"banner": {
"w": 300,
"h": 250
}
}
],
"source": {
"tid": "${json-unit.any-string}"
},
"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": "${json-unit.any-number}",
"cur": [
"USD"
],
"regs": {
"ext": {
"gdpr": 0
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"id": "request_id",
"seatbid": [
{
"bid": [
{
"id": "bid_id",
"impid": "imp_id",
"price": 3.33,
"crid": "creativeId"
}
]
}
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,8 @@ adapters.limelightDigital.aliases.iionads.enabled=true
adapters.limelightDigital.aliases.iionads.endpoint=http://localhost:8090/iionads-exchange/{{Host}}/{{PublisherID}}
adapters.limelightDigital.aliases.adsyield.enabled=true
adapters.limelightDigital.aliases.adsyield.endpoint=http://localhost:8090/adsyield-exchange/{{Host}}/{{PublisherID}}
adapters.limelightDigital.aliases.greedygame.enabled=true
adapters.limelightDigital.aliases.greedygame.endpoint=http://localhost:8090/greedygame-exchange/{{Host}}/{{PublisherID}}
adapters.lockerdome.enabled=true
adapters.lockerdome.endpoint=http://localhost:8090/lockerdome-exchange
adapters.logan.enabled=true
Expand Down

0 comments on commit fc67245

Please sign in to comment.