-
Notifications
You must be signed in to change notification settings - Fork 5
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
AdbreakId support for smaato bidder #986
base: ci
Are you sure you want to change the base?
Conversation
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.
@Pubmatic-Supriya-Patil added review comments
if adbreakID, ok := getString(params.FieldMap["adbreakId"]); ok { | ||
fmt.Fprintf(&jsonStr, `,"adbreakId":"%s"`, adbreakID) | ||
} | ||
|
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.
@Pubmatic-Supriya-Patil : Have we checked on impact if both adbreakid
and adspaceid
are passed on to Smaato
adapter in adapter code? Whether both are passed to bidder?
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.
As discussed , only one field will be used based on type of request.
@@ -2045,7 +2045,7 @@ func TestPrepareBidParamJSONForPartnerSmaato(t *testing.T) { | |||
want: nil, | |||
}, | |||
{ | |||
name: "All params are present", | |||
name: "publisherId_adspaceId_both_are_present", |
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.
@Pubmatic-Supriya-Patil : What is the change in this test case?
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.
Previously all params means publisher Id and adspace Id. now we added adbreakId as new field so just renamed test case name accordingly.
@@ -2060,6 +2060,66 @@ func TestPrepareBidParamJSONForPartnerSmaato(t *testing.T) { | |||
}, | |||
want: json.RawMessage(`{"publisherId": "1234","adspaceId": "3456"}`), | |||
}, | |||
{ | |||
name: "All_params_are_present", |
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.
@Pubmatic-Supriya-Patil : why have we introduced new test case. The test case with this name was present before, as per last review comment
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 new test case is for publisherId, adspaceId and adbreakId. Previous one was only for publisherId and adspaceId
…smaato-adbreakId-support
if adspaceID, ok := getString(params.FieldMap["adspaceId"]); !ok { | ||
return nil, fmt.Errorf(errMandatoryParameterMissingFormat, params.AdapterName, "adspaceId") | ||
} else { | ||
fmt.Fprintf(&jsonStr, `"adspaceId":"%s"`, adspaceID) |
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.
@Pubmatic-Supriya-Patil : I think we should stick to any of
rule here. It means, ensure either adspaceid
or adbreakid
is present , instead o removing the validation
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.
API will handle this validation while uploading mapping so no need to have same logic here
Description
Please add change description or link to ticket, docs, etc.
Checklist:
header-bidding
repo with appropiate commit id.For Prebid upgrade, refer: https://inside.pubmatic.com:8443/confluence/display/Products/Prebid-server+upgrade