mirror of
https://github.com/fleetdm/fleet
synced 2026-05-22 00:18:27 +00:00
#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/... ```
35 lines
1.4 KiB
Go
35 lines
1.4 KiB
Go
package mock
|
|
|
|
import (
|
|
"context"
|
|
|
|
"github.com/fleetdm/fleet/v4/server/fleet"
|
|
)
|
|
|
|
//go:generate go run ./mockimpl/impl.go -o datastore_mock.go "s *DataStore" "fleet.Datastore"
|
|
//go:generate go run ./mockimpl/impl.go -o datastore_installers.go "s *InstallerStore" "fleet.InstallerStore"
|
|
//go:generate go run ./mockimpl/impl.go -o nanomdm/storage.go "s *Storage" "github.com/fleetdm/fleet/v4/server/mdm/nanomdm/storage.AllStorage"
|
|
//go:generate go run ./mockimpl/impl.go -o nanodep/storage.go "s *Storage" "github.com/micromdm/nanodep/storage.AllStorage"
|
|
//go:generate go run ./mockimpl/impl.go -o scep/depot.go "d *Depot" "depot.Depot"
|
|
|
|
var _ fleet.Datastore = (*Store)(nil)
|
|
|
|
type Store struct {
|
|
DataStore
|
|
}
|
|
|
|
func (m *Store) EnrollOrbit(ctx context.Context, isMDMEnabled bool, orbitHostInfo fleet.OrbitHostInfo, orbitNodeKey string, teamID *uint) (*fleet.Host, error) {
|
|
return nil, nil
|
|
}
|
|
|
|
func (m *Store) LoadHostByOrbitNodeKey(ctx context.Context, orbitNodeKey string) (*fleet.Host, error) {
|
|
return nil, nil
|
|
}
|
|
|
|
func (m *Store) Drop() error { return nil }
|
|
func (m *Store) MigrateTables(ctx context.Context) error { return nil }
|
|
func (m *Store) MigrateData(ctx context.Context) error { return nil }
|
|
func (m *Store) MigrationStatus(ctx context.Context) (*fleet.MigrationStatus, error) {
|
|
return &fleet.MigrationStatus{}, nil
|
|
}
|
|
func (m *Store) Name() string { return "mock" }
|