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

New Adapter: MadSense #4169

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

madsenseops
Copy link

Copy link

Code coverage summary

Note:

  • Prebid team doesn't anticipate tests covering code paths that might result in marshal and unmarshal errors
  • Coverage summary encompasses all commits leading up to the latest one, c6dc0a9

madsense

Refer here for heat map coverage report

github.com/prebid/prebid-server/v3/adapters/madsense/madsense.go:21:	Builder			100.0%
github.com/prebid/prebid-server/v3/adapters/madsense/madsense.go:28:	MakeRequests		89.5%
github.com/prebid/prebid-server/v3/adapters/madsense/madsense.go:61:	makeRequest		75.0%
github.com/prebid/prebid-server/v3/adapters/madsense/madsense.go:89:	getEndpointURL		100.0%
github.com/prebid/prebid-server/v3/adapters/madsense/madsense.go:95:	MakeBids		83.3%
github.com/prebid/prebid-server/v3/adapters/madsense/utils.go:13:	parseImpExt		75.0%
github.com/prebid/prebid-server/v3/adapters/madsense/utils.go:33:	getHeaders		88.2%
github.com/prebid/prebid-server/v3/adapters/madsense/utils.go:64:	getTypedBidFromBid	90.9%
github.com/prebid/prebid-server/v3/adapters/madsense/utils.go:87:	getMediaTypeForBid	75.0%
total:									(statements)		85.1%

@bsardo bsardo added the adapter label Jan 22, 2025
@bsardo bsardo self-assigned this Jan 22, 2025
@bsardo
Copy link
Collaborator

bsardo commented Jan 22, 2025

@pm-jaydeep-mohite can you please review?

@@ -0,0 +1,12 @@
endpoint: "https://ads.madsense.io/pbs"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Endpoint is reachable
curl -i --location --request POST https://ads.madsense.io/pbs
HTTP/2 200
content-length: 0

return openrtb_ext.BidTypeBanner, nil
case openrtb2.MarkupVideo:
return openrtb_ext.BidTypeVideo, nil
default:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

UT can be added to cover default case

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added UT for default case

bidErrors = append(bidErrors, err)
continue
}

Copy link
Contributor

@pm-jaydeep-mohite pm-jaydeep-mohite Jan 30, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nitpick: Remove blank line

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removed

Comment on lines 4 to 10
"fmt"
"github.com/prebid/openrtb/v20/openrtb2"
"github.com/prebid/prebid-server/v3/adapters"
"github.com/prebid/prebid-server/v3/errortypes"
"github.com/prebid/prebid-server/v3/openrtb_ext"
"github.com/prebid/prebid-server/v3/util/jsonutil"
"net/http"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can be re-ordered as

  `
     "fmt"
"net/http"

"github.com/prebid/openrtb/v20/openrtb2"
"github.com/prebid/prebid-server/v3/adapters"
"github.com/prebid/prebid-server/v3/errortypes"
"github.com/prebid/prebid-server/v3/openrtb_ext"
"github.com/prebid/prebid-server/v3/util/jsonutil"

  `

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

re-ordered

Copy link

Code coverage summary

Note:

  • Prebid team doesn't anticipate tests covering code paths that might result in marshal and unmarshal errors
  • Coverage summary encompasses all commits leading up to the latest one, 2db4f8f

madsense

Refer here for heat map coverage report

github.com/prebid/prebid-server/v3/adapters/madsense/madsense.go:21:	Builder			100.0%
github.com/prebid/prebid-server/v3/adapters/madsense/madsense.go:28:	MakeRequests		89.5%
github.com/prebid/prebid-server/v3/adapters/madsense/madsense.go:61:	makeRequest		75.0%
github.com/prebid/prebid-server/v3/adapters/madsense/madsense.go:89:	getEndpointURL		100.0%
github.com/prebid/prebid-server/v3/adapters/madsense/madsense.go:95:	MakeBids		94.4%
github.com/prebid/prebid-server/v3/adapters/madsense/utils.go:14:	parseImpExt		75.0%
github.com/prebid/prebid-server/v3/adapters/madsense/utils.go:34:	getHeaders		88.2%
github.com/prebid/prebid-server/v3/adapters/madsense/utils.go:65:	getTypedBidFromBid	100.0%
github.com/prebid/prebid-server/v3/adapters/madsense/utils.go:88:	getMediaTypeForBid	100.0%
total:									(statements)		89.4%

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants