forked from prebid/prebid-server
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
25866c2
commit 3ff6d2f
Showing
18 changed files
with
1,006 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
package adapterstest | ||
|
||
import ( | ||
"strings" | ||
|
||
"github.com/prebid/prebid-server/adapters" | ||
"github.com/prebid/prebid-server/openrtb_ext" | ||
) | ||
|
||
// updateRequestInfoForOW updates the reqInfo as per OW requirement | ||
func updateRequestInfoForOW(reqInfo adapters.ExtraRequestInfo, fileName string) adapters.ExtraRequestInfo { | ||
// for oRTB bidders (having prefix as 'ortb_', set the bidderName from file) | ||
if strings.HasPrefix(fileName, "ortb_") { | ||
files := strings.Split(fileName, "/") | ||
if len(files) > 0 { | ||
reqInfo.BidderCoreName = openrtb_ext.BidderName(files[0]) | ||
} | ||
} | ||
return reqInfo | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
139 changes: 139 additions & 0 deletions
139
adapters/ortbbidder/ortb_test_multi_requestmode/exemplary/multi_imps_video.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,139 @@ | ||
{ | ||
"mockBidRequest": { | ||
"id": "test-request-id", | ||
"imp": [ | ||
{ | ||
"id": "test-imp-id-1", | ||
"video": { | ||
"mimes": ["video/mp4"] | ||
}, | ||
"tagid": "tagid_1", | ||
"ext": { | ||
"prebid": { | ||
"bidder": { | ||
"magnite": { | ||
"bidder_param_1": "value_1" | ||
} | ||
} | ||
} | ||
} | ||
}, | ||
{ | ||
"id": "test-imp-id-2", | ||
"video": { | ||
"mimes": ["video/mp4"] | ||
}, | ||
"tagid": "tagid_2", | ||
"ext": { | ||
"prebid": { | ||
"bidder": { | ||
"magnite": { | ||
"bidder_param_2": "value_2" | ||
} | ||
} | ||
} | ||
} | ||
} | ||
] | ||
}, | ||
"httpCalls": [ | ||
{ | ||
"expectedRequest": { | ||
"uri": "http://test_bidder.com", | ||
"body": { | ||
"id": "test-request-id", | ||
"imp": [ | ||
{ | ||
"id": "test-imp-id-1", | ||
"video": { | ||
"mimes": ["video/mp4"] | ||
}, | ||
"tagid": "tagid_1", | ||
"ext": { | ||
"prebid": { | ||
"bidder": { | ||
"magnite": { | ||
"bidder_param_1": "value_1" | ||
} | ||
} | ||
} | ||
} | ||
}, | ||
{ | ||
"id": "test-imp-id-2", | ||
"video": { | ||
"mimes": ["video/mp4"] | ||
}, | ||
"tagid": "tagid_2", | ||
"ext": { | ||
"prebid": { | ||
"bidder": { | ||
"magnite": { | ||
"bidder_param_2": "value_2" | ||
} | ||
} | ||
} | ||
} | ||
} | ||
] | ||
} | ||
}, | ||
"mockResponse": { | ||
"status": 200, | ||
"body": { | ||
"id": "test-request-id", | ||
"seatbid": [ | ||
{ | ||
"seat": "magnite", | ||
"bid": [{ | ||
"id": "bid-1", | ||
"impid": "test-imp-id-1", | ||
"price": 0.500000, | ||
"adm": "some-test-ad", | ||
"crid": "crid_10", | ||
"mtype": 2 | ||
},{ | ||
"id": "bid-2", | ||
"impid": "test-imp-id-2", | ||
"price": 10, | ||
"adm": "some-test-ad-2", | ||
"crid": "crid_10", | ||
"mtype": 2 | ||
}] | ||
} | ||
], | ||
"cur": "USD" | ||
} | ||
} | ||
} | ||
], | ||
|
||
"expectedBidResponses": [ | ||
{ | ||
"bids": [ | ||
{ | ||
"bid": { | ||
"id": "bid-1", | ||
"impid": "test-imp-id-1", | ||
"price": 0.5, | ||
"adm": "some-test-ad", | ||
"crid": "crid_10", | ||
"mtype":2 | ||
}, | ||
"type": "video" | ||
}, | ||
{ | ||
"bid": { | ||
"id": "bid-2", | ||
"impid": "test-imp-id-2", | ||
"price": 10, | ||
"adm": "some-test-ad-2", | ||
"crid": "crid_10", | ||
"mtype":2 | ||
}, | ||
"type": "video" | ||
} | ||
] | ||
} | ||
] | ||
} |
166 changes: 166 additions & 0 deletions
166
adapters/ortbbidder/ortb_test_single_requestmode/exemplary/multi_imps_video.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,166 @@ | ||
{ | ||
"mockBidRequest": { | ||
"id": "test-request-id", | ||
"imp": [ | ||
{ | ||
"id": "test-imp-id-1", | ||
"video": { | ||
"mimes": ["video/mp4"] | ||
}, | ||
"tagid": "tagid_1", | ||
"ext": { | ||
"prebid": { | ||
"bidder": { | ||
"magnite": { | ||
"bidder_param_1": "value_1" | ||
} | ||
} | ||
} | ||
} | ||
}, | ||
{ | ||
"id": "test-imp-id-2", | ||
"video": { | ||
"mimes": ["video/mp4"] | ||
}, | ||
"tagid": "tagid_2", | ||
"ext": { | ||
"prebid": { | ||
"bidder": { | ||
"magnite": { | ||
"bidder_param_2": "value_2" | ||
} | ||
} | ||
} | ||
} | ||
} | ||
] | ||
}, | ||
"httpCalls": [ | ||
{ | ||
"expectedRequest": { | ||
"uri": "http://test_bidder.com", | ||
"body": { | ||
"id": "test-request-id", | ||
"imp": [ | ||
{ | ||
"id": "test-imp-id-1", | ||
"video": { | ||
"mimes": ["video/mp4"] | ||
}, | ||
"tagid": "tagid_1", | ||
"ext": { | ||
"prebid": { | ||
"bidder": { | ||
"magnite": { | ||
"bidder_param_1": "value_1" | ||
} | ||
} | ||
} | ||
} | ||
} | ||
] | ||
} | ||
}, | ||
"mockResponse": { | ||
"status": 200, | ||
"body": { | ||
"id": "test-request-id", | ||
"seatbid": [ | ||
{ | ||
"seat": "magnite", | ||
"bid": [{ | ||
"id": "bid-1", | ||
"impid": "test-imp-id-1", | ||
"price": 0.500000, | ||
"adm": "some-test-ad", | ||
"crid": "crid_10", | ||
"mtype": 2 | ||
}] | ||
} | ||
], | ||
"cur": "USD" | ||
} | ||
} | ||
}, | ||
{ | ||
"expectedRequest": { | ||
"uri": "http://test_bidder.com", | ||
"body": { | ||
"id": "test-request-id", | ||
"imp": [ | ||
{ | ||
"id": "test-imp-id-2", | ||
"video": { | ||
"mimes": ["video/mp4"] | ||
}, | ||
"tagid": "tagid_2", | ||
"ext": { | ||
"prebid": { | ||
"bidder": { | ||
"magnite": { | ||
"bidder_param_2": "value_2" | ||
} | ||
} | ||
} | ||
} | ||
} | ||
] | ||
} | ||
}, | ||
"mockResponse": { | ||
"status": 200, | ||
"body": { | ||
"id": "test-request-id", | ||
"seatbid": [ | ||
{ | ||
"seat": "magnite", | ||
"bid": [{ | ||
"id": "bid-2", | ||
"impid": "test-imp-id-2", | ||
"price": 10, | ||
"adm": "some-test-ad-2", | ||
"crid": "crid_10", | ||
"mtype": 2 | ||
}] | ||
} | ||
], | ||
"cur": "USD" | ||
} | ||
} | ||
} | ||
], | ||
|
||
"expectedBidResponses": [ | ||
{ | ||
"bids": [ | ||
{ | ||
"bid": { | ||
"id": "bid-1", | ||
"impid": "test-imp-id-1", | ||
"price": 0.5, | ||
"adm": "some-test-ad", | ||
"crid": "crid_10", | ||
"mtype":2 | ||
}, | ||
"type": "video" | ||
} | ||
] | ||
}, | ||
{ | ||
"bids": [ | ||
{ | ||
"bid": { | ||
"id": "bid-2", | ||
"impid": "test-imp-id-2", | ||
"price": 10, | ||
"adm": "some-test-ad-2", | ||
"crid": "crid_10", | ||
"mtype":2 | ||
}, | ||
"type": "video" | ||
} | ||
] | ||
} | ||
] | ||
} |
Oops, something went wrong.