-
Notifications
You must be signed in to change notification settings - Fork 750
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
Smaato: DOOH support #3751
Smaato: DOOH support #3751
Conversation
Code coverage summaryNote:
smaatoRefer here for heat map coverage report
|
var clickEvent string | ||
if len(curls) > 0 { | ||
var clicks strings.Builder | ||
for _, clicktracker := range curls { |
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.
How many curls do you expect the adm to contain?
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.
unlikely more than 3
I believe atm we mostly supply 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 also changed it to only execute this logic when curls
field is sent
and added quotes for onlick
cc @el-chuck
adapters/smaato/banner_test.go
Outdated
assert.Equal(t, tt.expectedAdMarkup, adMarkup) | ||
}) | ||
} | ||
} |
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 is fine, but doesn't count towards the test coverage for our review purposes. Please ensure these cases are covered with the json test framework.
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.
good catch, I added one more test case curls=nil
highly unlikely that we would ever return this from the server, but better have it covered
adapters/smaato/smaato.go
Outdated
@@ -57,7 +57,8 @@ type bidRequestExt struct { | |||
|
|||
// bidExt defines Bid.Ext object for Smaato | |||
type bidExt struct { | |||
Duration int `json:"duration"` | |||
Duration int `json:"duration"` | |||
Curls []string `json:"curls"` |
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.
What is a Curl?
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.
click url
adapters/smaato/smaato.go
Outdated
} else { | ||
return "", &errortypes.BadServerResponse{ | ||
Message: fmt.Sprintf("Invalid ad markup %s.", adMarkup), | ||
Message: fmt.Sprintf("X-Smt-Adtype header is missing!"), |
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.
Nitpick: Consider changing the !
to .
. We keep to plain punctuation for errors.
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.
fixed
c82c49f
to
90a0118
Compare
Code coverage summaryNote:
smaatoRefer here for heat map coverage report
|
90a0118
to
00e84b0
Compare
Code coverage summaryNote:
smaatoRefer here for heat map coverage report
|
00e84b0
to
0fa2b80
Compare
Code coverage summaryNote:
smaatoRefer here for heat map coverage report
|
0fa2b80
to
54f78bf
Compare
Code coverage summaryNote:
smaatoRefer here for heat map coverage report
|
@przemkaczmarek @bsardo |
Adding DOOH support for Smaato adapater