-
Notifications
You must be signed in to change notification settings - Fork 749
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
New Adapter: Mediasquare #3994
base: master
Are you sure you want to change the base?
New Adapter: Mediasquare #3994
Conversation
…' into mediasquare_adapter
Code coverage summaryNote:
mediasquareRefer here for heat map coverage report
|
Code coverage summaryNote:
mediasquareRefer here for heat map coverage report
|
static/bidder-info/mediasquare.yaml
Outdated
@@ -0,0 +1,12 @@ | |||
endpoint: "http://pbs-front.mediasquare.fr/msq_prebid" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mediasquare-alexandre Hi, I’m wondering why these tests were written in this way. In most adapters, we approach it by having a TestJsonSamples class, where we write JSON files to check our scenarios, like simple-banner.json, bad_media_type, etc. Additionally, we add a params_test class to verify validParams and invalidParams. |
Code coverage summaryNote:
mediasquareRefer here for heat map coverage report
|
Hi Guys, honestly when I started doing my tests I remembered my PR 2 years ago here where most of my reviewers asked me to increase the code-coverage as much as possible. #2215 |
Code coverage summaryNote:
mediasquareRefer here for heat map coverage report
|
Code coverage summaryNote:
mediasquareRefer here for heat map coverage report
|
Code coverage summaryNote:
mediasquareRefer here for heat map coverage report
|
Hi Guys, @przemkaczmarek @bsardo |
} | ||
|
||
msqParams := initMsqParams(request) | ||
msqParams.Test = (request.Test == int8(1)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I haven't seen this behavior before. Is this added because the msqParams.Test field is required by the MediaSquare backend to recognize the request as a test?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, it is.
@mediasquare-alexandre It's great that you decided to add the adapterstest.RunJSONBidderTest methods. |
// MakeRequests : case request is empty. | ||
resp, errs := bidder.MakeRequests(nil, nil) | ||
expectingErrors := []error{errorWritter("<MakeRequests> request", nil, true)} | ||
assert.Equal(t, []*adapters.RequestData(nil), resp, "resp, was supposed to be empty result.") | ||
assert.Equal(t, expectingErrors, errs, "errs, was supposed to be :", expectingErrors) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be tested in JSON files.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mediasquare-alexandre This still doesn't meet our standards, e.g., there's no params_test.go file where you would test validParams and invalidParams (for your required owner and code). |
Code coverage summaryNote:
mediasquareRefer here for heat map coverage report
|
@przemkaczmarek I tried to use your naming for tests-files, but I'm not sure the names I put on are ok... The documentation only show that files have to be formated as json in supplemental & examplary, so it doesn't help me neither on this subject. |
Summary
This PR introduces the Mediasquare bidder adapter for Prebid Server. It supports the following mediatypes:
Endpoint: "https://pbs-front.mediasquare.fr/msq_prebid"
Endpoint Compression: gzip
GVL Vendor ID: 791
Test Status
Unit tests: All tests passed.
Maintainer Contact
emails:
About us
https://www.mediasquare.fr/