github.com/weaviate/weaviate@v1.24.6/usecases/telemetry/fakes_for_test.go (about) 1 // _ _ 2 // __ _____ __ ___ ___ __ _| |_ ___ 3 // \ \ /\ / / _ \/ _` \ \ / / |/ _` | __/ _ \ 4 // \ V V / __/ (_| |\ V /| | (_| | || __/ 5 // \_/\_/ \___|\__,_| \_/ |_|\__,_|\__\___| 6 // 7 // Copyright © 2016 - 2024 Weaviate B.V. All rights reserved. 8 // 9 // CONTACT: hello@weaviate.io 10 // 11 12 package telemetry 13 14 import ( 15 "context" 16 17 "github.com/stretchr/testify/mock" 18 "github.com/weaviate/weaviate/entities/models" 19 ) 20 21 type fakeNodesStatusGetter struct { 22 mock.Mock 23 } 24 25 func (n *fakeNodesStatusGetter) LocalNodeStatus(ctx context.Context, 26 className, verbosity string, 27 ) *models.NodeStatus { 28 args := n.Called(ctx, className, verbosity) 29 if args.Get(0) != nil { 30 return args.Get(0).(*models.NodeStatus) 31 } 32 return nil 33 } 34 35 type fakeModulesProvider struct { 36 mock.Mock 37 } 38 39 func (m *fakeModulesProvider) GetMeta() (map[string]interface{}, error) { 40 args := m.Called() 41 if args.Get(0) != nil { 42 return args.Get(0).(map[string]interface{}), nil 43 } 44 return nil, args.Error(1) 45 }