Skip to content

Commit

Permalink
Remove unused code, change error msg
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexBVolcy committed Jan 9, 2024
1 parent 9dba7b1 commit 15d814d
Show file tree
Hide file tree
Showing 5 changed files with 2 additions and 14 deletions.
2 changes: 1 addition & 1 deletion config/bidderinfo.go
Original file line number Diff line number Diff line change
Expand Up @@ -571,7 +571,7 @@ func validateSyncer(bidderInfo BidderInfo) error {
}

if bidderInfo.Syncer.FormatOverride != ResponseFormatIFrame && bidderInfo.Syncer.FormatOverride != ResponseFormatRedirect && bidderInfo.Syncer.FormatOverride != "" {
return fmt.Errorf("syncer could not be created, invalid FormatOverride value: %s", bidderInfo.Syncer.FormatOverride)
return fmt.Errorf("syncer could not be created, invalid format override value: %s", bidderInfo.Syncer.FormatOverride)
}

for _, supports := range bidderInfo.Syncer.Supports {
Expand Down
2 changes: 1 addition & 1 deletion config/bidderinfo_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1350,7 +1350,7 @@ func TestBidderInfoValidationNegative(t *testing.T) {
},
},
[]error{
errors.New("syncer could not be created, invalid FormatOverride value: x"),
errors.New("syncer could not be created, invalid format override value: x"),
},
},
}
Expand Down
4 changes: 0 additions & 4 deletions endpoints/cookie_sync_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2109,10 +2109,6 @@ func (m *MockSyncer) GetSync(syncTypes []usersync.SyncType, privacyMacros macros
return args.Get(0).(usersync.Sync), args.Error(1)
}

func (m *MockSyncer) ForceResponseFormat() string {
return ""
}

type MockAnalyticsRunner struct {
mock.Mock
}
Expand Down
4 changes: 0 additions & 4 deletions endpoints/setuid_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1738,10 +1738,6 @@ func (s fakeSyncer) GetSync(syncTypes []usersync.SyncType, privacyMacros macros.
return usersync.Sync{}, nil
}

func (s fakeSyncer) ForceResponseFormat() string {
return s.formatOverride
}

func ToHTTPCookie(cookie *usersync.Cookie) (*http.Cookie, error) {
encoder := usersync.Base64Encoder{}
encodedCookie, err := encoder.Encode(cookie)
Expand Down
4 changes: 0 additions & 4 deletions usersync/chooser_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -744,10 +744,6 @@ func (fakeSyncer) GetSync([]SyncType, macros.UserSyncPrivacy) (Sync, error) {
return Sync{}, nil
}

func (s fakeSyncer) ForceResponseFormat() string {
return s.formatOverride
}

type fakePrivacy struct {
gdprAllowsHostCookie bool
gdprAllowsBidderSync bool
Expand Down

0 comments on commit 15d814d

Please sign in to comment.