Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(evpn unit test): adding evpn mock unit test #276

Merged
merged 2 commits into from
Aug 29, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,14 @@ go-test:
@echo " > Running ginkgo test suites..."
# can replace with a recursive command ginkgo suites are defined for all packages
ginkgo grpc inventory
ginkgo grpc network

mock-generate:
@echo " > Starting mock code generation..."
# Generate mocks for exported interfaces
mockery --config=mocks/.mockery.yaml --name=Connector --dir=grpc
mockery --config=mocks/.mockery.yaml --name=InvClient --dir=inventory
mockery --config=mocks/.mockery.yaml --name=EvpnClient --dir=network

# Generate mocks for imported protobuf clients too
mockery --config=mocks/.mockery.yaml --name=InventorySvcClient --srcpkg=github.com/opiproject/opi-api/common/v1/gen/go
mockery --config=mocks/.mockery.yaml --name=InventorySvcClient --srcpkg=github.com/opiproject/opi-api/common/v1/gen/go
2 changes: 1 addition & 1 deletion cmd/evpn-vrf.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ func CreateVRF() *cobra.Command {

vrf, err := evpnClient.CreateVrf(ctx, name, vni, loopback, vtep)
if err != nil {
log.Fatalf("failed to create logical bridge: %v", err)
log.Fatalf("failed to create vrf: %v", err)
}
log.Printf("Created VRF with \n name: %s\n operation status: %d\n vni : %d\n vtep ip : %s\n loopback ip: %s\n", vrf.GetName(), vrf.GetStatus().GetOperStatus(),
vrf.GetSpec().GetVni(), vrf.GetSpec().GetVtepIpPrefix(), vrf.GetSpec().GetLoopbackIpPrefix())
Expand Down
Loading
Loading