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

OTT-1390,UOE-9175: add missing fields in owlogger & tracker so that OW module can run independently #626

Merged
merged 97 commits into from
Nov 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
97 commits
Select commit Hold shift + click to select a range
30455c0
UOE-9175: Migrate Tracker from HB to pubmatic module
pm-saurabh-narkhede Aug 24, 2023
202d27f
adding UTS
ashishshinde-pubm Oct 15, 2023
82dc9c9
fix errors
ashishshinde-pubm Oct 17, 2023
d210fcb
Merge branch 'ci' of github.com:PubMatic-OpenWrap/prebid-server into …
ashishshinde-pubm Oct 17, 2023
219ad28
Fix errors
ashishshinde-pubm Oct 17, 2023
98460aa
fix observations
ashishshinde-pubm Oct 17, 2023
c4801b5
Merge branch 'ci' of github.com:PubMatic-OpenWrap/prebid-server into …
ashishshinde-pubm Oct 19, 2023
ab495f4
adding few changes
ashishshinde-pubm Oct 20, 2023
7bcbc62
UOE-9175: Migrate Tracker from HB to pubmatic module
pm-saurabh-narkhede Aug 24, 2023
253db10
add test
pm-saurabh-narkhede Sep 28, 2023
3183d87
changes for tracker
pm-saurabh-narkhede Oct 11, 2023
d4d0d3a
currency conversion
pm-saurabh-narkhede Oct 20, 2023
7ad1fb6
UOE-9222:Set 0x0 default size inside logger for kgpv in case of video…
pm-aadit-patil Aug 11, 2023
4cdd580
currencyConversion in deps
pm-saurabh-narkhede Oct 20, 2023
6ef9ae7
make nbr pointer
ashishshinde-pubm Oct 20, 2023
fa96324
unmarshall responseExt
pm-saurabh-narkhede Oct 20, 2023
b5bb4b8
UOE-9175: add unit test cases
ashishshinde-pubm Oct 21, 2023
cd4889f
Merge branch 'UOE-9175-ci' of github.com:PubMatic-OpenWrap/prebid-ser…
ashishshinde-pubm Oct 22, 2023
15de2f9
Fix errors
ashishshinde-pubm Oct 22, 2023
8320d0d
adding more test cases
ashishshinde-pubm Oct 22, 2023
6f178dd
Add TestNonBRCodesInHandleAuctionResponseHook UTs
ashishshinde-pubm Oct 22, 2023
e975bd9
Refactor GetAdFormat
ashishshinde-pubm Oct 23, 2023
8aa4341
Merge branch 'ci' of github.com:PubMatic-OpenWrap/prebid-server into …
ashishshinde-pubm Oct 23, 2023
4bf0211
Correct version id in logger
ashishshinde-pubm Oct 23, 2023
4007559
logger: fetch bidExt by unmarshaling bid.Ext
ashishshinde-pubm Oct 24, 2023
2af29f1
add test cases
pm-saurabh-narkhede Oct 25, 2023
9ac5af7
Request.Tmax will have highest priority
ashishshinde-pubm Oct 25, 2023
d15b8f1
OTT-1402 :: Make BidId unique for auction in auctionresponsehook
pm-nikhil-vaidya Oct 25, 2023
7a0f972
OTT-1402 :: Added test cases for corner case
pm-nikhil-vaidya Oct 25, 2023
d63ff56
OTT-1402 :: code review comments addressed
pm-nikhil-vaidya Oct 25, 2023
bcfbe2f
Merge branch 'ci' of github.com:PubMatic-OpenWrap/prebid-server into …
ashishshinde-pubm Oct 25, 2023
55087c2
fskp and floorSource
pm-saurabh-narkhede Oct 25, 2023
f47505b
Merge branch 'UOE-9175-ci' of github.com:PubMatic-OpenWrap/prebid-ser…
ashishshinde-pubm Oct 25, 2023
e6d8342
Merge branch 'UOE-9175-ci' of github.com:PubMatic-OpenWrap/prebid-ser…
ashishshinde-pubm Oct 25, 2023
1f858b5
Merge branch 'OTT-1402' of github.com:PubMatic-OpenWrap/prebid-server…
ashishshinde-pubm Oct 25, 2023
e444faa
do not unmarshal bid.ext for default/nonbids
ashishshinde-pubm Oct 25, 2023
f077942
fix NBR in bid.Ext
ashishshinde-pubm Oct 26, 2023
d1ed070
revert to bid.ext unmarshal for default+nonbid
ashishshinde-pubm Oct 26, 2023
6a37a09
introduce bidWrapper on top of bid with NBR
ashishshinde-pubm Oct 26, 2023
a4b4185
use bidIDForLookup for 'w' field
ashishshinde-pubm Oct 27, 2023
1e5a121
use bidIDForLookup only if BidIdSeparator is present
ashishshinde-pubm Oct 27, 2023
1de958c
fix frv and fr
ashishshinde-pubm Oct 27, 2023
73889e7
Remove unwanted code and add UTs
ashishshinde-pubm Oct 29, 2023
2516fb3
Merge branch 'ci' of github.com:PubMatic-OpenWrap/prebid-server into …
ashishshinde-pubm Oct 29, 2023
1ed558f
add more test and floors datails in loginfo
pm-saurabh-narkhede Oct 30, 2023
a8503df
add linter changes
pm-saurabh-narkhede Oct 30, 2023
fcd44dc
Merge remote-tracking branch 'origin/UOE-9175-ci-owlogger' into UOE-l…
pm-saurabh-narkhede Oct 30, 2023
8899647
Fix UTs
ashishshinde-pubm Oct 30, 2023
4c06a89
Merge remote-tracking branch 'origin/UOE-9175-ci-owlogger' into UOE-l…
pm-saurabh-narkhede Oct 30, 2023
251a5df
Merge branch 'ci' into UOE-logger-tracker-test
pm-saurabh-narkhede Oct 30, 2023
27bd3c7
UOE-9175: Migrate Tracker from HB to pubmatic module
pm-saurabh-narkhede Aug 24, 2023
4a70969
add test
pm-saurabh-narkhede Sep 28, 2023
ba0024e
changes for tracker
pm-saurabh-narkhede Oct 11, 2023
2d0d670
currency conversion
pm-saurabh-narkhede Oct 20, 2023
a7da946
currencyConversion in deps
pm-saurabh-narkhede Oct 20, 2023
70b6b42
unmarshall responseExt
pm-saurabh-narkhede Oct 20, 2023
4aa3d1f
add test cases
pm-saurabh-narkhede Oct 25, 2023
dec7275
fskp and floorSource
pm-saurabh-narkhede Oct 25, 2023
921a353
add more test and floors datails in loginfo
pm-saurabh-narkhede Oct 30, 2023
404a824
add linter changes
pm-saurabh-narkhede Oct 30, 2023
fd590f1
add more tests
pm-saurabh-narkhede Oct 31, 2023
3cc139f
correct versionid in tracker
pm-saurabh-narkhede Oct 31, 2023
14ce3d1
Merge branch 'UOE-9175-ci' into UOE-logger-tracker-test
pm-saurabh-narkhede Nov 1, 2023
ac9b7e4
Fix setTimeout
ashishshinde-pubm Nov 1, 2023
46c58be
Fix setTimeout UTs
ashishshinde-pubm Nov 1, 2023
5b07742
address review comments
pm-saurabh-narkhede Nov 2, 2023
f15b2ed
changes for "sn" and "au" fields in owlogger
ashishshinde-pubm Nov 3, 2023
91452df
refactor and move common code
pm-saurabh-narkhede Nov 3, 2023
7e7957d
introduce getSlotName and getAdUnitName
ashishshinde-pubm Nov 4, 2023
76cf59b
Merge branch 'UOE-logger-tracker-test' of github.com:PubMatic-OpenWra…
ashishshinde-pubm Nov 4, 2023
d81e5f0
address review comments for owlogger
ashishshinde-pubm Nov 4, 2023
bd71f15
add UTs in owlogger
ashishshinde-pubm Nov 5, 2023
6a50137
Merge branch 'ci' of github.com:PubMatic-OpenWrap/prebid-server into …
ashishshinde-pubm Nov 5, 2023
abe863b
minor corrections
ashishshinde-pubm Nov 5, 2023
1402922
add UTs, modify slotid and adunit in tracker
pm-saurabh-narkhede Nov 6, 2023
4d1edcb
adsress review comments
ashishshinde-pubm Nov 6, 2023
2a644dc
change versionId to displayId
pm-saurabh-narkhede Nov 6, 2023
c76f0f7
introduce DisplayVersionID for live profile
ashishshinde-pubm Nov 7, 2023
e147c3e
added universal pixel support in module
pm-saurabh-narkhede Nov 7, 2023
15a111b
Merge remote-tracking branch 'origin/ci' into UOE-logger-tracker-test
pm-saurabh-narkhede Nov 7, 2023
49c78f4
latest ci
pm-saurabh-narkhede Nov 7, 2023
bd6a07d
address review comments
ashishshinde-pubm Nov 8, 2023
02a0255
Merge branch 'UOE-logger-tracker-test' of github.com:PubMatic-OpenWra…
ashishshinde-pubm Nov 8, 2023
cea5538
add au,sn in case of default bids
ashishshinde-pubm Nov 9, 2023
63c9e8a
surl value is same as origin
pm-saurabh-narkhede Nov 9, 2023
332a630
Fix fv,frv in case of adunitconfig &marketplace issue
ashishshinde-pubm Nov 10, 2023
8dba4fa
fix go.mod
ashishshinde-pubm Nov 10, 2023
4a445e0
fix fr,frv for banner adunit
ashishshinde-pubm Nov 10, 2023
fbb0def
fix fr,frv for banner adding UTs
ashishshinde-pubm Nov 10, 2023
d27efc1
Make matchedimpression behaviour same as that of HB
ashishshinde-pubm Nov 10, 2023
543efe9
Merge branch 'ci' of github.com:PubMatic-OpenWrap/prebid-server into …
ashishshinde-pubm Nov 10, 2023
e055efc
UOE-9681: fix eg, en multicurrency case
pm-nilesh-chate Nov 10, 2023
b502ec5
fix eg
pm-nilesh-chate Nov 10, 2023
6d41035
merge changes of en/eg/originbidcpmusd
ashishshinde-pubm Nov 10, 2023
2131230
comment OriginalBidCPMUSD=0
ashishshinde-pubm Nov 10, 2023
df769c6
Merge branch 'ci' of github.com:PubMatic-OpenWrap/prebid-server into …
ashishshinde-pubm Nov 20, 2023
d0f58a4
Revert "UOE-9681: mapping not uploaded nbr (#643)"
pm-nilesh-chate Nov 20, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -52,3 +52,7 @@ mockgencache:
mockgenmetrics:
mkdir -p modules/pubmatic/openwrap/metrics/mock
mockgen github.com/PubMatic-OpenWrap/prebid-server/modules/pubmatic/openwrap/metrics MetricsEngine > modules/pubmatic/openwrap/metrics/mock/mock.go

mockgenlogger:
mkdir -p analytics/pubmatic/mhttp/mock
mockgen github.com/PubMatic-OpenWrap/prebid-server/analytics/pubmatic/mhttp HttpCallInterface,MultiHttpContextInterface > analytics/pubmatic/mhttp/mock/mock.go
136 changes: 34 additions & 102 deletions analytics/pubmatic/helper.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,42 +2,21 @@ package pubmatic

import (
"encoding/json"
"errors"
"fmt"
"net/http"
"net/url"
"strconv"
"time"

"github.com/prebid/openrtb/v19/openrtb2"
"github.com/golang/glog"
"github.com/prebid/prebid-server/analytics/pubmatic/mhttp"
"github.com/prebid/prebid-server/modules/pubmatic/openwrap/models"
"github.com/prebid/prebid-server/openrtb_ext"
)

// Send method
func Send(url string, headers http.Header) error {
ashishshinde-pubm marked this conversation as resolved.
Show resolved Hide resolved
mhc := NewMultiHttpContext()
hc, err := NewHttpCall(url, "")
if err != nil {
return err
}

for k, v := range headers {
if len(v) != 0 {
hc.AddHeader(k, v[0])
}
}

mhc.AddHttpCall(hc)
_, erc := mhc.Execute()
if erc != 0 {
return errors.New("error in sending logger pixel")
}

return nil
}

// PrepareLoggerURL returns the url for OW logger call
func PrepareLoggerURL(wlog *WloggerRecord, loggerURL string, gdprEnabled int) string {
ashishshinde-pubm marked this conversation as resolved.
Show resolved Hide resolved
if wlog == nil {
return ""
}
v := url.Values{}

jsonString, err := json.Marshal(wlog.record)
Expand All @@ -56,87 +35,40 @@ func PrepareLoggerURL(wlog *WloggerRecord, loggerURL string, gdprEnabled int) st
return finalLoggerURL
}

func (wlog *WloggerRecord) logContentObject(content *openrtb2.Content) {
if nil == content {
return
}

wlog.Content = &Content{
ID: content.ID,
Episode: int(content.Episode),
Title: content.Title,
Series: content.Series,
Season: content.Season,
Cat: content.Cat,
}
}
func getSizeForPlatform(width, height int64, platform string) string {
s := models.GetSize(width, height)
if platform == models.PLATFORM_VIDEO {
s = s + models.VideoSizeSuffix
// getGdprEnabledFlag returns gdpr flag set in the partner config
func getGdprEnabledFlag(partnerConfigMap map[int]map[string]string) int {
gdpr := 0
if val := partnerConfigMap[models.VersionLevelConfigID][models.GDPR_ENABLED]; val != "" {
gdpr, _ = strconv.Atoi(val)
}
return s
return gdpr
}

// set partnerRecord MetaData
func (partnerRecord *PartnerRecord) setMetaDataObject(meta *openrtb_ext.ExtBidPrebidMeta) {
// send function will send the owlogger to analytics endpoint
func send(rCtx *models.RequestCtx, url string, headers http.Header, mhc mhttp.MultiHttpContextInterface) {
startTime := time.Now()
hc, _ := mhttp.NewHttpCall(url, "")

if meta.NetworkID != 0 || meta.AdvertiserID != 0 || len(meta.SecondaryCategoryIDs) > 0 {
partnerRecord.MetaData = &MetaData{
NetworkID: meta.NetworkID,
AdvertiserID: meta.AdvertiserID,
PrimaryCategoryID: meta.PrimaryCategoryID,
AgencyID: meta.AgencyID,
DemandSource: meta.DemandSource,
SecondaryCategoryIDs: meta.SecondaryCategoryIDs,
for k, v := range headers {
if len(v) != 0 {
hc.AddHeader(k, v[0])
}
}
//NOTE : We Don't get following Data points in Response, whenever got from translator,
//they can be populated.
//partnerRecord.MetaData.NetworkName = meta.NetworkName
//partnerRecord.MetaData.AdvertiserName = meta.AdvertiserName
//partnerRecord.MetaData.AgencyName = meta.AgencyName
//partnerRecord.MetaData.BrandName = meta.BrandName
//partnerRecord.MetaData.BrandID = meta.BrandID
//partnerRecord.MetaData.DChain = meta.DChain (type is json.RawMessage)
}

// Harcode would be the optimal. We could make it configurable like _AU_@_W_x_H_:%s@%dx%d entries in pbs.yaml
// mysql> SELECT DISTINCT key_gen_pattern FROM wrapper_mapping_template;
// +----------------------+
// | key_gen_pattern |
// +----------------------+
// | _AU_@_W_x_H_ |
// | _DIV_@_W_x_H_ |
// | _W_x_H_@_W_x_H_ |
// | _DIV_ |
// | _AU_@_DIV_@_W_x_H_ |
// | _AU_@_SRC_@_VASTTAG_ |
// +----------------------+
// 6 rows in set (0.21 sec)
func GenerateSlotName(h, w int64, kgp, tagid, div, src string) string {
// func (H, W, Div), no need to validate, will always be non-nil
switch kgp {
case "_AU_": // adunitconfig
return tagid
case "_DIV_":
return div
case "_AU_@_W_x_H_":
return fmt.Sprintf("%s@%dx%d", tagid, w, h)
case "_DIV_@_W_x_H_":
return fmt.Sprintf("%s@%dx%d", div, w, h)
case "_W_x_H_@_W_x_H_":
return fmt.Sprintf("%dx%d@%dx%d", w, h, w, h)
case "_AU_@_DIV_@_W_x_H_":
if div == "" {
return fmt.Sprintf("%s@%s@s%dx%d", tagid, div, w, h)
}
return fmt.Sprintf("%s@%s@s%dx%d", tagid, div, w, h)
case "_AU_@_SRC_@_VASTTAG_":
return fmt.Sprintf("%s@%s@s_VASTTAG_", tagid, src) //TODO check where/how _VASTTAG_ is updated
default:
// TODO: check if we need to fallback to old generic flow (below)
// Add this cases in a map and read it from yaml file
if rCtx.KADUSERCookie != nil {
hc.AddCookie(models.KADUSERCOOKIE, rCtx.KADUSERCookie.Value)
}

mhc.AddHttpCall(hc)
_, erc := mhc.Execute()
if erc != 0 {
glog.Errorf("Failed to send the owlogger for pub:[%d], profile:[%d], version:[%d].",
rCtx.PubID, rCtx.ProfileID, rCtx.VersionID)

// we will not record at version level in prometheus metric
rCtx.MetricsEngine.RecordPublisherWrapperLoggerFailure(rCtx.PubIDStr, rCtx.ProfileIDStr, "")
return
}
return ""
rCtx.MetricsEngine.RecordSendLoggerDataTime(rCtx.Endpoint, rCtx.ProfileIDStr, time.Since(startTime))
// TODO: this will increment HB specific metric (ow_pbs_sshb_*), verify labels
}
220 changes: 220 additions & 0 deletions analytics/pubmatic/helper_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,220 @@
package pubmatic

import (
"net/http"
"net/url"
"testing"

"github.com/golang/mock/gomock"
"github.com/prebid/prebid-server/analytics/pubmatic/mhttp"
mock_mhttp "github.com/prebid/prebid-server/analytics/pubmatic/mhttp/mock"
mock_metrics "github.com/prebid/prebid-server/modules/pubmatic/openwrap/metrics/mock"
"github.com/prebid/prebid-server/modules/pubmatic/openwrap/models"
"github.com/stretchr/testify/assert"
)

func TestPrepareLoggerURL(t *testing.T) {
type args struct {
wlog *WloggerRecord
loggerURL string
gdprEnabled int
}
tests := []struct {
name string
args args
owlogger string
}{
{
name: "nil_wlog",
args: args{
wlog: nil,
loggerURL: "http://t.pubmatic.com/wl",
gdprEnabled: 1,
},
owlogger: "",
},
{
name: "gdprEnabled=1",
args: args{
wlog: &WloggerRecord{
record: record{
PubID: 10,
ProfileID: "1",
VersionID: "0",
},
},
loggerURL: "http://t.pubmatic.com/wl",
gdprEnabled: 1,
},
owlogger: `http://t.pubmatic.com/wl?gdEn=1&json={"pubid":10,"pid":"1","pdvid":"0","dvc":{},"ft":0}&pubid=10`,
},
{
name: "gdprEnabled=0",
args: args{
wlog: &WloggerRecord{
record: record{
PubID: 10,
ProfileID: "1",
VersionID: "0",
},
},
loggerURL: "http://t.pubmatic.com/wl",
gdprEnabled: 0,
},
owlogger: `http://t.pubmatic.com/wl?json={"pubid":10,"pid":"1","pdvid":"0","dvc":{},"ft":0}&pubid=10`,
},
{
name: "private endpoint",
args: args{
wlog: &WloggerRecord{
record: record{
PubID: 5,
ProfileID: "5",
VersionID: "1",
},
},
loggerURL: "http://10.172.141.11/wl",
gdprEnabled: 0,
},
owlogger: `http://10.172.141.11/wl?json={"pubid":5,"pid":"5","pdvid":"1","dvc":{},"ft":0}&pubid=5`,
},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
owlogger := PrepareLoggerURL(tt.args.wlog, tt.args.loggerURL, tt.args.gdprEnabled)
decodedOwlogger, _ := url.QueryUnescape(owlogger)
assert.Equal(t, tt.owlogger, decodedOwlogger, tt.name)
})
}
}
func TestGetGdprEnabledFlag(t *testing.T) {
tests := []struct {
name string
partnerConfig map[int]map[string]string
gdprFlag int
}{
{
name: "Empty partnerConfig",
partnerConfig: make(map[int]map[string]string),
gdprFlag: 0,
},
{
name: "partnerConfig without versionlevel cfg",
partnerConfig: map[int]map[string]string{
2: {models.GDPR_ENABLED: "1"},
},
gdprFlag: 0,
},
{
name: "partnerConfig without GDPR_ENABLED",
partnerConfig: map[int]map[string]string{
models.VersionLevelConfigID: {"any": "1"},
},
gdprFlag: 0,
},
{
name: "partnerConfig with invalid GDPR_ENABLED",
partnerConfig: map[int]map[string]string{
models.VersionLevelConfigID: {models.GDPR_ENABLED: "non-int"},
},
gdprFlag: 0,
},
{
name: "partnerConfig with GDPR_ENABLED=1",
partnerConfig: map[int]map[string]string{
models.VersionLevelConfigID: {models.GDPR_ENABLED: "1"},
},
gdprFlag: 1,
},
{
name: "partnerConfig with GDPR_ENABLED=2",
partnerConfig: map[int]map[string]string{
models.VersionLevelConfigID: {models.GDPR_ENABLED: "2"},
},
gdprFlag: 2,
},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
gdprFlag := getGdprEnabledFlag(tt.partnerConfig)
assert.Equal(t, tt.gdprFlag, gdprFlag, tt.name)
})
}
}
func TestSendMethod(t *testing.T) {
// initialise global variables
mhttp.Init(1, 1, 1, 2000)
// init mock
ctrl := gomock.NewController(t)
defer ctrl.Finish()

type args struct {
rctx *models.RequestCtx
url string
headers http.Header
}
tests := []struct {
name string
args args
getMetricsEngine func() *mock_metrics.MockMetricsEngine
getMockMultiHttpContext func() *mock_mhttp.MockMultiHttpContextInterface
}{
{
name: "send success",
args: args{
rctx: &models.RequestCtx{
PubIDStr: "5890",
ProfileIDStr: "1",
Endpoint: models.EndpointV25,
},
url: "http://10.172.11.11/wl",
headers: http.Header{
"key": []string{"val"},
},
},
getMetricsEngine: func() *mock_metrics.MockMetricsEngine {
mockEngine := mock_metrics.NewMockMetricsEngine(ctrl)
mockEngine.EXPECT().RecordSendLoggerDataTime(models.EndpointV25, "1", gomock.Any())
return mockEngine
},
getMockMultiHttpContext: func() *mock_mhttp.MockMultiHttpContextInterface {
mockHttpCtx := mock_mhttp.NewMockMultiHttpContextInterface(ctrl)
mockHttpCtx.EXPECT().AddHttpCall(gomock.Any())
mockHttpCtx.EXPECT().Execute().Return(0, 0)
return mockHttpCtx
},
},
{
name: "send fail",
args: args{
rctx: &models.RequestCtx{
PubIDStr: "5890",
ProfileIDStr: "1",
Endpoint: models.EndpointV25,
KADUSERCookie: &http.Cookie{},
},
url: "http://10.172.11.11/wl",
headers: http.Header{
"key": []string{"val"},
},
},
getMetricsEngine: func() *mock_metrics.MockMetricsEngine {
mockEngine := mock_metrics.NewMockMetricsEngine(ctrl)
mockEngine.EXPECT().RecordPublisherWrapperLoggerFailure("5890", "1", "")
return mockEngine
},
getMockMultiHttpContext: func() *mock_mhttp.MockMultiHttpContextInterface {
mockHttpCtx := mock_mhttp.NewMockMultiHttpContextInterface(ctrl)
mockHttpCtx.EXPECT().AddHttpCall(gomock.Any())
mockHttpCtx.EXPECT().Execute().Return(0, 1)
return mockHttpCtx
},
},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
tt.args.rctx.MetricsEngine = tt.getMetricsEngine()
send(tt.args.rctx, tt.args.url, tt.args.headers, tt.getMockMultiHttpContext())
})
}
}
Loading
Loading