Skip to content
This repository has been archived by the owner on Dec 22, 2022. It is now read-only.

Commit

Permalink
[TripleLift] - Allow usersync redirect (prebid#1086)
Browse files Browse the repository at this point in the history
  • Loading branch information
tgeeting authored and SyntaxNode committed Oct 30, 2019
1 parent 9bc8d17 commit 6fdd6d2
Show file tree
Hide file tree
Showing 9 changed files with 176 additions and 149 deletions.
2 changes: 1 addition & 1 deletion adapters/triplelift/triplelift_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ import (
)

func TestJsonSamples(t *testing.T) {
adapterstest.RunJSONBidderTest(t, "triplelifttest", NewTripleliftBidder(nil, "http://tlx.3lift.net/s2s/auction?supplier_id=19"))
adapterstest.RunJSONBidderTest(t, "triplelifttest", NewTripleliftBidder(nil, "http://tlx.3lift.net/s2s/auction?supplier_id=20"))
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"ext": {
"bidder": {
"inventoryCode": "foo",
"floor" : 20
"floor": 20
}
}
}
Expand All @@ -28,7 +28,7 @@
"httpCalls": [
{
"expectedRequest": {
"uri": "http://tlx.3lift.net/s2s/auction?supplier_id=19",
"uri": "http://tlx.3lift.net/s2s/auction?supplier_id=20",
"body": {
"id": "test-request-id",
"imp": [
Expand All @@ -51,7 +51,7 @@
"ext": {
"bidder": {
"inventoryCode": "foo",
"floor" : 20
"floor": 20
}
}
}
Expand All @@ -63,4 +63,4 @@
}
}
]
}
}
12 changes: 6 additions & 6 deletions adapters/triplelift/triplelifttest/exemplary/simple-banner.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
},
"ext": {
"bidder": {
"inventoryCode": "aa"
"inventoryCode": "aa"
}
}
}
Expand All @@ -27,7 +27,7 @@
"httpCalls": [
{
"expectedRequest": {
"uri": "http://tlx.3lift.net/s2s/auction?supplier_id=19",
"uri": "http://tlx.3lift.net/s2s/auction?supplier_id=20",
"body": {
"id": "test-request-id",
"imp": [
Expand All @@ -45,7 +45,7 @@
}
]
},
"tagid" : "aa",
"tagid": "aa",
"ext": {
"bidder": {
"inventoryCode": "aa"
Expand Down Expand Up @@ -79,7 +79,7 @@
"w": 300,
"ext": {
"triplelift_pb": {
"format" : 2
"format": 2
}
}
}
Expand Down Expand Up @@ -113,7 +113,7 @@
"h": 250,
"ext": {
"triplelift_pb": {
"format" : 2
"format": 2
}
}
},
Expand All @@ -122,4 +122,4 @@
]
}
]
}
}
256 changes: 143 additions & 113 deletions adapters/triplelift/triplelifttest/exemplary/simple-video.json
Original file line number Diff line number Diff line change
@@ -1,114 +1,144 @@
{
"mockBidRequest": {
"id": "test-request-id",
"imp": [
{
"id": "test-imp-id",
"video": {
"mimes": ["video/mp4"],
"minduration": 15,
"maxduration": 30,
"protocols": [2, 3, 5, 6, 7, 8],
"w": 940,
"h": 560
},
"ext": {
"bidder": {
"inventoryCode" : "aaw",
"floor" : 0.10
}
}
}
]
},

"httpCalls": [
{
"expectedRequest": {
"uri": "http://tlx.3lift.net/s2s/auction?supplier_id=19",
"body": {
"id": "test-request-id",
"imp": [
{
"tagid" : "aaw",
"bidfloor" : 0.10,
"id": "test-imp-id",
"video": {
"mimes": ["video/mp4"],
"minduration": 15,
"maxduration": 30,
"protocols": [2, 3, 5, 6, 7, 8],
"w": 940,
"h": 560
},
"ext": {
"bidder": {
"inventoryCode": "aaw",
"floor" : 0.10
}
}
}
]
}
},
"mockResponse": {
"status": 200,
"body": {
"id": "test-request-id",
"seatbid": [
{
"seat": "958",
"bid": [{
"id": "7706636740145184841",
"impid": "test-imp-id",
"price": 0.500000,
"adid": "29681110",
"adm": "some-test-ad",
"adomain": ["foo.com"],
"iurl": "http://tlx.3lift.net/s2s/auction?supplier_id=19",
"cid": "958",
"crid": "29681110",
"h": 250,
"w": 300,
"cat": ["IAB9-1"],
"ext": {"triplelift_pb":{"format":11}}
}]
}
],
"bidid": "5778926625248726496",
"cur": "USD"
}
}
}
],

"expectedBidResponses": [
{
"currency": "USD",
"bids": [
{
"bid": {
"id": "7706636740145184841",
"impid": "test-imp-id",
"price": 0.5,
"adm": "some-test-ad",
"adid": "29681110",
"adomain": ["foo.com"],
"iurl": "http://tlx.3lift.net/s2s/auction?supplier_id=19",
"cid": "958",
"crid": "29681110",
"w": 300,
"h": 250,
"cat": ["IAB9-1"],
"ext": {
"triplelift_pb": {
"format": 11
}
}
},
"type": "video"
}
]
}
]
}
"mockBidRequest": {
"id": "test-request-id",
"imp": [
{
"id": "test-imp-id",
"video": {
"mimes": [
"video/mp4"
],
"minduration": 15,
"maxduration": 30,
"protocols": [
2,
3,
5,
6,
7,
8
],
"w": 940,
"h": 560
},
"ext": {
"bidder": {
"inventoryCode": "aaw",
"floor": 0.10
}
}
}
]
},
"httpCalls": [
{
"expectedRequest": {
"uri": "http://tlx.3lift.net/s2s/auction?supplier_id=20",
"body": {
"id": "test-request-id",
"imp": [
{
"tagid": "aaw",
"bidfloor": 0.10,
"id": "test-imp-id",
"video": {
"mimes": [
"video/mp4"
],
"minduration": 15,
"maxduration": 30,
"protocols": [
2,
3,
5,
6,
7,
8
],
"w": 940,
"h": 560
},
"ext": {
"bidder": {
"inventoryCode": "aaw",
"floor": 0.10
}
}
}
]
}
},
"mockResponse": {
"status": 200,
"body": {
"id": "test-request-id",
"seatbid": [
{
"seat": "958",
"bid": [
{
"id": "7706636740145184841",
"impid": "test-imp-id",
"price": 0.500000,
"adid": "29681110",
"adm": "some-test-ad",
"adomain": [
"foo.com"
],
"iurl": "http://tlx.3lift.net/s2s/auction?supplier_id=20",
"cid": "958",
"crid": "29681110",
"h": 250,
"w": 300,
"cat": [
"IAB9-1"
],
"ext": {
"triplelift_pb": {
"format": 11
}
}
}
]
}
],
"bidid": "5778926625248726496",
"cur": "USD"
}
}
}
],
"expectedBidResponses": [
{
"currency": "USD",
"bids": [
{
"bid": {
"id": "7706636740145184841",
"impid": "test-imp-id",
"price": 0.5,
"adm": "some-test-ad",
"adid": "29681110",
"adomain": [
"foo.com"
],
"iurl": "http://tlx.3lift.net/s2s/auction?supplier_id=20",
"cid": "958",
"crid": "29681110",
"w": 300,
"h": 250,
"cat": [
"IAB9-1"
],
"ext": {
"triplelift_pb": {
"format": 11
}
}
},
"type": "video"
}
]
}
]
}
Loading

0 comments on commit 6fdd6d2

Please sign in to comment.