-
Notifications
You must be signed in to change notification settings - Fork 769
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
57a5f04
commit 9dba7b1
Showing
4 changed files
with
77 additions
and
49 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: ResponseFormatRedirect, | ||
}, | ||
}, | ||
"bidderC": BidderInfo{ | ||
|
@@ -627,6 +628,9 @@ func TestBidderInfoValidationPositive(t *testing.T) { | |
}, | ||
}, | ||
}, | ||
Syncer: &Syncer{ | ||
FormatOverride: ResponseFormatIFrame, | ||
}, | ||
}, | ||
} | ||
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 FormatOverride 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