mirror of
https://github.com/fleetdm/fleet
synced 2026-05-22 00:18:27 +00:00
This is just to pass down the context to the datastore layer, it doesn't use it just yet - this will be in a follow-up PR.
29 lines
1 KiB
Go
29 lines
1 KiB
Go
package mock
|
|
|
|
import (
|
|
"context"
|
|
|
|
"github.com/fleetdm/fleet/v4/server/fleet"
|
|
)
|
|
|
|
//go:generate mockimpl -o datastore_mock.go "s *DataStore" "fleet.Datastore"
|
|
//go:generate mockimpl -o datastore_query_results.go "s *QueryResultStore" "fleet.QueryResultStore"
|
|
|
|
var _ fleet.Datastore = (*Store)(nil)
|
|
|
|
type Store struct {
|
|
DataStore
|
|
}
|
|
|
|
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 0, nil }
|
|
func (m *Store) Name() string { return "mock" }
|
|
|
|
type mockTransaction struct{}
|
|
|
|
func (m *mockTransaction) Commit() error { return nil }
|
|
func (m *mockTransaction) Rollback() error { return nil }
|
|
|
|
func (m *Store) Begin() (fleet.Transaction, error) { return &mockTransaction{}, nil }
|