fleet/server/service/mock/service_pusher_factory.go
Martin Angers fc3304c902
Move nanomdm dependency in monorepo (#16015)
#15557 

Following the precedent that Lucas used for other similar PRs, the best
way to review is probably by commits.

* The first one simply copies over the files from the fork to the
monorepo
* Second one adjusts all import paths
* Third one tidies up the `go.mod` files
* Last one fixes the linter issues in the nanomdm package

# Checklist for submitter

- ~~Changes file added for user-visible changes in `changes/` or
`orbit/changes/`.~~ (not a user-visible change)
- [x] Manual QA for all new/changed functionality (ran test suite,
re-generated mocks)

I also verified that our Go test suite did run the newly moved `nanomdm`
package steps:

```
ok  	github.com/fleetdm/fleet/v4/server/mdm/nanomdm/cryptoutil	0.003s	coverage: 0.0% of statements in github.com/fleetdm/fleet/v4/...
ok  	github.com/fleetdm/fleet/v4/server/mdm/nanomdm/mdm	0.005s	coverage: 46.2% of statements in github.com/fleetdm/fleet/v4/...
ok  	github.com/fleetdm/fleet/v4/server/mdm/nanomdm/service/certauth	1.320s	coverage: 20.7% of statements in github.com/fleetdm/fleet/v4/...
ok  	github.com/fleetdm/fleet/v4/server/mdm/nanomdm/storage/file	0.007s	coverage: 24.1% of statements in github.com/fleetdm/fleet/v4/...
```
2024-01-11 23:28:48 -03:00

29 lines
642 B
Go

// Automatically generated by mockimpl. DO NOT EDIT!
package mock
import (
"crypto/tls"
"sync"
"github.com/fleetdm/fleet/v4/server/mdm/nanomdm/push"
)
var _ push.PushProviderFactory = (*APNSPushProviderFactory)(nil)
type NewPushProviderFunc func(p0 *tls.Certificate) (push.PushProvider, error)
type APNSPushProviderFactory struct {
NewPushProviderFunc NewPushProviderFunc
NewPushProviderFuncInvoked bool
mu sync.Mutex
}
func (s *APNSPushProviderFactory) NewPushProvider(p0 *tls.Certificate) (push.PushProvider, error) {
s.mu.Lock()
s.NewPushProviderFuncInvoked = true
s.mu.Unlock()
return s.NewPushProviderFunc(p0)
}