Skip to content

Commit

Permalink
Add all mocks to mockery config file and regenerate (jaegertracing#5626)
Browse files Browse the repository at this point in the history
## What problem is this solving
Resolves jaegertracing#5569

## Description of the changes
- added packages to mockery config file

## How was this change tested?
- make test

## Checklist
- [ ] I have read
https://github.com/jaegertracing/jaeger/blob/master/CONTRIBUTING_GUIDELINES.md
- [ ] I have signed all commits
- [ ] I have added unit tests for the new functionality
- [ ] I have run lint and test steps successfully
  - for `jaeger`: `make lint test`
  - for `jaeger-ui`: `yarn lint` and `yarn test`

---------

Signed-off-by: danish siddiqui <[email protected]>
Signed-off-by: Yuri Shkuro <[email protected]>
Co-authored-by: Yuri Shkuro <[email protected]>
Co-authored-by: Yuri Shkuro <[email protected]>
  • Loading branch information
3 people authored Jun 24, 2024
1 parent 1c1bc08 commit afdd311
Show file tree
Hide file tree
Showing 75 changed files with 1,335 additions and 684 deletions.
4 changes: 4 additions & 0 deletions .mockery.header.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
// Copyright (c) The Jaeger Authors.
// SPDX-License-Identifier: Apache-2.0
//
// Run 'make generate-mocks' to regenerate.
57 changes: 53 additions & 4 deletions .mockery.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,66 @@ outpkg: "mocks"
dir: "{{.InterfaceDir}}/mocks/"
mockname: "{{.InterfaceName}}"
filename: "{{.InterfaceName}}.go"
boilerplate-file: .mockery.header.txt
packages:
github.com/jaegertracing/jaeger/cmd/collector/app/sanitizer/cache:
interfaces:
ServiceAliasMappingExternalSource:
ServiceAliasMappingStorage:
github.com/jaegertracing/jaeger/cmd/ingester/app/consumer:
interfaces:
Message:
github.com/jaegertracing/jaeger/cmd/ingester/app/processor:
interfaces:
SpanProcessor:
github.com/jaegertracing/jaeger/crossdock/services:
interfaces:
AgentService:
QueryService:
github.com/jaegertracing/jaeger/pkg/cassandra:
config:
unroll-variadic: false
interfaces:
Iterator:
Query:
Session:
github.com/jaegertracing/jaeger/pkg/distributedlock:
config:
all: true
github.com/jaegertracing/jaeger/pkg/es:
config:
all: true
github.com/jaegertracing/jaeger/storage/spanstore:
github.com/jaegertracing/jaeger/pkg/es/client:
config:
all: true
github.com/jaegertracing/jaeger/proto-gen/storage_v1:
github.com/jaegertracing/jaeger/pkg/kafka/consumer:
interfaces:
Consumer:
github.com/jaegertracing/jaeger/plugin/sampling/leaderelection:
config:
all: true
github.com/jaegertracing/jaeger/pkg/es/client:
github.com/jaegertracing/jaeger/plugin/storage/grpc:
interfaces:
PluginCapabilities:
github.com/jaegertracing/jaeger/plugin/storage/kafka:
interfaces:
Marshaller:
Unmarshaller:
github.com/jaegertracing/jaeger/proto-gen/storage_v1:
config:
all: true
github.com/jaegertracing/jaeger/storage:
config:
all: true
github.com/jaegertracing/jaeger/storage/dependencystore:
interfaces:
Reader:
github.com/jaegertracing/jaeger/storage/metricsstore:
config:
all: true
github.com/jaegertracing/jaeger/storage/samplingstore:
config:
all: true
github.com/jaegertracing/jaeger/storage/spanstore:
config:
all: true

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions cmd/ingester/app/consumer/consumer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,11 @@ import (
"github.com/stretchr/testify/require"
"go.uber.org/zap"

kmocks "github.com/jaegertracing/jaeger/cmd/ingester/app/consumer/mocks"
"github.com/jaegertracing/jaeger/cmd/ingester/app/processor"
pmocks "github.com/jaegertracing/jaeger/cmd/ingester/app/processor/mocks"
"github.com/jaegertracing/jaeger/internal/metricstest"
"github.com/jaegertracing/jaeger/pkg/kafka/consumer"
kmocks "github.com/jaegertracing/jaeger/pkg/kafka/consumer/mocks"
"github.com/jaegertracing/jaeger/pkg/metrics"
)

Expand Down Expand Up @@ -146,7 +146,7 @@ func TestSaramaConsumerWrapper_start_Messages(t *testing.T) {
partitionConsumer: &partitionConsumerWrapper{
topic: topic,
partition: partition,
PartitionConsumer: &kmocks.PartitionConsumer{},
PartitionConsumer: &smocks.PartitionConsumer{},
},
},
}
Expand Down
51 changes: 39 additions & 12 deletions cmd/ingester/app/consumer/mocks/Message.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit afdd311

Please sign in to comment.