Skip to content

Commit

Permalink
chore: add test [PB-1925]
Browse files Browse the repository at this point in the history
  • Loading branch information
Chris Corbo committed Nov 13, 2023
1 parent 14e5e72 commit 17256e4
Show file tree
Hide file tree
Showing 3 changed files with 165 additions and 1 deletion.
4 changes: 4 additions & 0 deletions adapters/ix/ix.go
Original file line number Diff line number Diff line change
Expand Up @@ -296,6 +296,10 @@ func (a *IxAdapter) MakeBids(internalRequest *openrtb2.BidRequest, externalReque
bidderResponse.FledgeAuctionConfigs = append(bidderResponse.FledgeAuctionConfigs, fledgeAuctionConfig)
}
}
} else {
if err != nil {
errs = append(errs, err)
}
}
}

Expand Down
1 change: 0 additions & 1 deletion adapters/ix/ixtest/exemplary/fledge.json
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,6 @@
],
"fledgeauctionconfigs": [{
"impid": "test-imp-id",
"bidder": "ix",
"config": {
"seller": "https://seller.com",
"decisionLogicUrl": "https://ssp.com/decision-logic.js",
Expand Down
161 changes: 161 additions & 0 deletions adapters/ix/ixtest/supplemental/bad-fledge.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,161 @@
{
"mockBidRequest": {
"id": "test-request-id",
"imp": [
{
"id": "test-imp-id",
"banner": {
"format": [
{
"w": 300,
"h": 250
},
{
"w": 300,
"h": 600
},
{
"w": 600,
"h": 800
}
]
},
"ext": {
"bidder": {
"siteId": "569749"
},
"ae": 1
}
}
],
"site": {
"page": "https://www.example.com/"
}
},
"httpCalls": [
{
"expectedRequest": {
"uri": "http://host/endpoint",
"body": {
"id": "test-request-id",
"imp": [
{
"id": "test-imp-id",
"banner": {
"format": [
{
"w": 300,
"h": 250
},
{
"w": 300,
"h": 600
},
{
"w": 600,
"h": 800
}
]
},
"ext": {
"bidder": {
"siteId": "569749"
},
"ae": 1
}
}
],
"site": {
"page": "https://www.example.com/",
"publisher": {
"id": "569749"
}
}
}
},
"mockResponse": {
"status": 200,
"body": {
"id": "test-request-id",
"seatbid": [
{
"seat": "958",
"bid": [
{
"id": "7706636740145184841",
"impid": "test-imp-id",
"price": 0.5,
"adid": "29681110",
"adm": "some-test-ad",
"adomain": [
"https://advertiser.example.com"
],
"cid": "958",
"crid": "29681110",
"h": 250,
"w": 300,
"ext": {
"ix": {}
}
}
]
}
],
"bidid": "5778926625248726496",
"cur": "USD",
"ext": {
"protectedAudienceAuctionConfigs": [{
"bidId": 123,
"config": {
"seller": "https://seller.com",
"decisionLogicUrl": "https://ssp.com/decision-logic.js",
"interestGroupBuyers": [
"https://buyer.com"
],
"sellerSignals": {
"callbackURL": "https://callbackurl.com"
},
"perBuyerSignals": {
"https://buyer.com": []
}
}
}]
}
}
}
}
],
"expectedMakeBidsErrors": [
{
"value": "json: cannot unmarshal number into Go struct field auctionConfig.protectedAudienceAuctionConfigs.bidId of type string",
"comparison": "literal"
}
],
"expectedBidResponses": [
{
"currency": "USD",
"bids": [
{
"bid": {
"id": "7706636740145184841",
"impid": "test-imp-id",
"price": 0.5,
"adm": "some-test-ad",
"adid": "29681110",
"adomain": [
"https://advertiser.example.com"
],
"cid": "958",
"crid": "29681110",
"w": 300,
"h": 250,
"ext": {
"ix": {}
}
},
"type": "banner"
}
]
}
]
}

0 comments on commit 17256e4

Please sign in to comment.