forked from prebid/prebid-server
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow Bidder to Override Callback Type in /setuid (prebid#3301)
- Loading branch information
1 parent
03314e1
commit 3789cf9
Showing
8 changed files
with
155 additions
and
25 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 |
---|---|---|
|
@@ -593,6 +593,7 @@ func TestBidderInfoValidationPositive(t *testing.T) { | |
URL: "http://bidderB.com/usersync", | ||
UserMacro: "UID", | ||
}, | ||
FormatOverride: SyncResponseFormatRedirect, | ||
}, | ||
}, | ||
"bidderC": BidderInfo{ | ||
|
@@ -627,6 +628,9 @@ func TestBidderInfoValidationPositive(t *testing.T) { | |
}, | ||
}, | ||
}, | ||
Syncer: &Syncer{ | ||
FormatOverride: SyncResponseFormatIFrame, | ||
}, | ||
}, | ||
} | ||
errs := bidderInfos.validate(make([]error, 0)) | ||
|
@@ -1318,6 +1322,37 @@ func TestBidderInfoValidationNegative(t *testing.T) { | |
errors.New("parent bidder: bidderC not found for an alias: bidderB"), | ||
}, | ||
}, | ||
{ | ||
"Invalid format override value", | ||
BidderInfos{ | ||
"bidderB": BidderInfo{ | ||
Endpoint: "http://bidderA.com/openrtb2", | ||
Maintainer: &MaintainerInfo{ | ||
Email: "[email protected]", | ||
}, | ||
Capabilities: &CapabilitiesInfo{ | ||
App: &PlatformInfo{ | ||
MediaTypes: []openrtb_ext.BidType{ | ||
openrtb_ext.BidTypeBanner, | ||
openrtb_ext.BidTypeNative, | ||
}, | ||
}, | ||
Site: &PlatformInfo{ | ||
MediaTypes: []openrtb_ext.BidType{ | ||
openrtb_ext.BidTypeBanner, | ||
openrtb_ext.BidTypeNative, | ||
}, | ||
}, | ||
}, | ||
Syncer: &Syncer{ | ||
FormatOverride: "x", | ||
}, | ||
}, | ||
}, | ||
[]error{ | ||
errors.New("syncer could not be created, invalid format override value: x"), | ||
}, | ||
}, | ||
} | ||
|
||
for _, test := range testCases { | ||
|
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
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
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