mirror of
https://github.com/fleetdm/fleet
synced 2026-05-21 16:08:47 +00:00
For #26622 This PR includes: - Making DigiCert client a real service that can be overridden in tests - GitOps support for DigiCert and Custom SCEP configs # Checklist for submitter - [x] Added/updated automated tests - [x] A detailed QA plan exists on the associated ticket (if it isn't there, work with the product group's QA engineer to add it) - [x] Manual QA for all new/changed functionality
39 lines
1.8 KiB
Go
39 lines
1.8 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 nanodep/storage.go "s *Storage" "github.com/fleetdm/fleet/v4/server/mdm/nanodep/storage.AllDEPStorage"
|
|
//go:generate go run ./mockimpl/impl.go -o mdm/datastore_mdm_mock.go "fs *MDMAppleStore" "fleet.MDMAppleStore"
|
|
//go:generate go run ./mockimpl/impl.go -o scep/depot.go "d *Depot" "depot.Depot"
|
|
//go:generate go run ./mockimpl/impl.go -o scep/config.go "s *SCEPConfigService" "fleet.SCEPConfigService"
|
|
//go:generate go run ./mockimpl/impl.go -o digicert/digicert.go "s *Service" "fleet.DigiCertService"
|
|
//go:generate go run ./mockimpl/impl.go -o mdm/bootstrap_package_store.go "s *MDMBootstrapPackageStore" "fleet.MDMBootstrapPackageStore"
|
|
//go:generate go run ./mockimpl/impl.go -o software/software_installer_store.go "s *SoftwareInstallerStore" "fleet.SoftwareInstallerStore"
|
|
|
|
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" }
|