Adjust test expectations for compilation differences with 1.21

- Requires some production code changes, to use pointers to function variables instead of pointers to functions
This commit is contained in:
Joshua Casey
2023-08-30 16:52:23 -05:00
parent 3908097c54
commit 8fd55a1d81
4 changed files with 71 additions and 54 deletions

View File

@@ -871,7 +871,8 @@ func (p *Provider) traceRefreshFailure(t *trace.Trace, err error) {
)
}
func AttributeUnchangedSinceLogin(attribute string) func(*ldap.Entry, provider.RefreshAttributes) error {
//nolint:gochecknoglobals // this needs to be a global variable so that tests can check pointer equality
var AttributeUnchangedSinceLogin = func(attribute string) func(*ldap.Entry, provider.RefreshAttributes) error {
return func(entry *ldap.Entry, storedAttributes provider.RefreshAttributes) error {
prevAttributeValue := storedAttributes.AdditionalAttributes[attribute]
newValues := entry.GetRawAttributeValues(attribute)