-
Notifications
You must be signed in to change notification settings - Fork 753
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
Pubmatic: Forward displaymanager and displaymanagerver from app ext #4000
Pubmatic: Forward displaymanager and displaymanagerver from app ext #4000
Conversation
Code coverage summaryNote:
pubmaticRefer here for heat map coverage report
|
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.
Coded unit tests are fine, but we look at the json test coverage since that includes additional assertions for memory safety. Please add json tests to cover this change.
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.
Updated the test cases.
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.
@SyntaxNode Can you please review the latest changes?
Code coverage summaryNote:
pubmaticRefer here for heat map coverage report
|
@SyntaxNode Can you please review and merge the latest changes? |
Hi @bsardo / @SyntaxNode Can you please review and merge this PR? Thanks |
if source, err := jsonparser.GetString(app.Ext, "source"); err == nil && source != "" { | ||
if version, err := jsonparser.GetString(app.Ext, "version"); err == nil && version != "" { | ||
return source, version | ||
} | ||
} |
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 mentioned earlier here, you're missing JSON test coverage.
Please add another display manager JSON test where the source and version are present at app.ext
but not at app.ext.prebid
to cover these lines.
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.
Done
return source, version | ||
} | ||
} | ||
return "", "" |
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 mentioned earlier here, you're missing JSON test coverage. Please either add a new JSON test or modify an existing JSON test so app.ext
is present but without source or version being set so this default case is covered.
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.
Done
adapters/pubmatic/pubmatic_test.go
Outdated
want want | ||
}{ | ||
{ | ||
name: "request app object is not nil but app.ext has no source and version", |
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.
Please update the name
strings throughout this test substituting dashes or underscores for spaces. t.Run
does this automatically so doing this in the tests makes it easy to search for failed tests in the code base.
e.g. name: "request-app-object-is-not-nil-but-app.ext-has-no-source-and-version"
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.
Done
Code coverage summaryNote:
pubmaticRefer here for heat map coverage report
|
@bsardo @SyntaxNode, Addressed review comments please review. |
Code coverage summaryNote:
pubmaticRefer here for heat map coverage report
|
No description provided.