Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update exchange json tests with correct hb_pb_cat_dur #3836

Merged
merged 2 commits into from
Sep 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions exchange/exchange_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5568,9 +5568,10 @@ type bidderSeatBid struct {
// bidderBid is basically a subset of entities.PbsOrtbBid from exchange/bidder.go.
// See the comment on bidderSeatBid for more info.
type bidderBid struct {
Bid *openrtb2.Bid `json:"ortbBid,omitempty"`
Type string `json:"bidType,omitempty"`
Meta *openrtb_ext.ExtBidPrebidMeta `json:"bidMeta,omitempty"`
Bid *openrtb2.Bid `json:"ortbBid,omitempty"`
Type string `json:"bidType,omitempty"`
BidVideo *openrtb_ext.ExtBidPrebidVideo `json:"bidVideo,omitempty"`
Meta *openrtb_ext.ExtBidPrebidMeta `json:"bidMeta,omitempty"`
}

type mockIdFetcher map[string]string
Expand Down Expand Up @@ -5617,6 +5618,7 @@ func (b *validatingBidder) requestBid(ctx context.Context, bidderRequest BidderR
bids[i] = &entities.PbsOrtbBid{
OriginalBidCPM: mockSeatBid.Bids[i].Bid.Price,
Bid: mockSeatBid.Bids[i].Bid,
BidVideo: mockSeatBid.Bids[i].BidVideo,
BidType: openrtb_ext.BidType(mockSeatBid.Bids[i].Type),
BidMeta: mockSeatBid.Bids[i].Meta,
}
Expand Down
8 changes: 6 additions & 2 deletions exchange/exchangetest/append-bidder-names.json
Original file line number Diff line number Diff line change
Expand Up @@ -148,10 +148,14 @@
"hb_cache_path_appnex": "/pbcache/endpoint",
"hb_pb": "0.20",
"hb_pb_appnexus": "0.20",
"hb_pb_cat_dur": "0.20_VideoGames_0s_appnexus",
"hb_pb_cat_dur_appnex": "0.20_VideoGames_0s_appnexus",
"hb_pb_cat_dur": "0.20_VideoGames_30s_appnexus",
"hb_pb_cat_dur_appnex": "0.20_VideoGames_30s_appnexus",
"hb_size": "200x250",
"hb_size_appnexus": "200x250"
},
"video": {
"duration": 30,
"primary_category": ""
}
}
}
Expand Down
8 changes: 6 additions & 2 deletions exchange/exchangetest/debuglog_disabled.json
Original file line number Diff line number Diff line change
Expand Up @@ -157,10 +157,14 @@
"hb_cache_path_appnex": "/pbcache/endpoint",
"hb_pb": "0.20",
"hb_pb_appnexus": "0.20",
"hb_pb_cat_dur": "0.20_VideoGames_0s",
"hb_pb_cat_dur_appnex": "0.20_VideoGames_0s",
"hb_pb_cat_dur": "0.20_VideoGames_30s",
"hb_pb_cat_dur_appnex": "0.20_VideoGames_30s",
"hb_size": "200x250",
"hb_size_appnexus": "200x250"
},
"video": {
"duration": 30,
"primary_category": ""
}
}
}
Expand Down
8 changes: 6 additions & 2 deletions exchange/exchangetest/debuglog_enabled.json
Original file line number Diff line number Diff line change
Expand Up @@ -159,10 +159,14 @@
"hb_cache_path_appnex": "/pbcache/endpoint",
"hb_pb": "0.20",
"hb_pb_appnexus": "0.20",
"hb_pb_cat_dur": "0.20_VideoGames_0s",
"hb_pb_cat_dur_appnex": "0.20_VideoGames_0s",
"hb_pb_cat_dur": "0.20_VideoGames_30s",
"hb_pb_cat_dur_appnex": "0.20_VideoGames_30s",
"hb_size": "200x250",
"hb_size_appnexus": "200x250"
},
"video": {
"duration": 30,
"primary_category": ""
}
}
}
Expand Down
8 changes: 6 additions & 2 deletions exchange/exchangetest/generate-bid-id-error.json
Original file line number Diff line number Diff line change
Expand Up @@ -121,10 +121,14 @@
"hb_cache_path_appnex": "/pbcache/endpoint",
"hb_pb": "0.20",
"hb_pb_appnexus": "0.20",
"hb_pb_cat_dur": "0.20_VideoGames_0s_appnexus",
"hb_pb_cat_dur_appnex": "0.20_VideoGames_0s_appnexus",
"hb_pb_cat_dur": "0.20_VideoGames_30s_appnexus",
"hb_pb_cat_dur_appnex": "0.20_VideoGames_30s_appnexus",
"hb_size": "200x250",
"hb_size_appnexus": "200x250"
},
"video": {
"duration": 30,
"primary_category": ""
}
}
}
Expand Down
15 changes: 12 additions & 3 deletions exchange/exchangetest/generate-bid-id-many.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,8 @@
},
"bidType": "video",
"bidVideo": {
"duration": 30
"duration": 30,
"PrimaryCategory": ""
}
}
],
Expand Down Expand Up @@ -100,7 +101,11 @@
"meta": {
},
"bidid": "bid-appnexus-1",
"type": "video"
"type": "video",
"video": {
"duration": 30,
"primary_category": ""
}
}
}
},
Expand All @@ -120,7 +125,11 @@
"meta": {
},
"bidid": "bid-appnexus-2",
"type": "video"
"type": "video",
"video": {
"duration": 30,
"primary_category": ""
}
}
}
}
Expand Down
9 changes: 7 additions & 2 deletions exchange/exchangetest/generate-bid-id-one.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,8 @@
},
"bidType": "video",
"bidVideo": {
"duration": 30
"duration": 30,
"primary_category": ""
}
}
],
Expand Down Expand Up @@ -83,7 +84,11 @@
"meta": {
},
"bidid": "bid-appnexus-1",
"type": "video"
"type": "video",
"video": {
"duration": 30,
"primary_category": ""
}
}
}
}
Expand Down
8 changes: 6 additions & 2 deletions exchange/exchangetest/include-brand-category.json
Original file line number Diff line number Diff line change
Expand Up @@ -146,10 +146,14 @@
"hb_cache_path_appnex": "/pbcache/endpoint",
"hb_pb": "0.20",
"hb_pb_appnexus": "0.20",
"hb_pb_cat_dur": "0.20_VideoGames_0s",
"hb_pb_cat_dur_appnex": "0.20_VideoGames_0s",
"hb_pb_cat_dur": "0.20_VideoGames_30s",
"hb_pb_cat_dur_appnex": "0.20_VideoGames_30s",
"hb_size": "200x250",
"hb_size_appnexus": "200x250"
},
"video": {
"duration": 30,
"primary_category": ""
}
}
}
Expand Down
Loading