[VOL-4445] Correct error type to proceed with deletion with half route
ALso moving deletion of logical device and meters to correct place in transitions.go
Change-Id: I91242ae9611792a1aeb7ac9ebd6116a5fe820392
diff --git a/rw_core/flowdecomposition/flow_decomposer_test.go b/rw_core/flowdecomposition/flow_decomposer_test.go
index 4cb6d7f..b3e3a9f 100644
--- a/rw_core/flowdecomposition/flow_decomposer_test.go
+++ b/rw_core/flowdecomposition/flow_decomposer_test.go
@@ -18,6 +18,7 @@
import (
"context"
"errors"
+ "fmt"
"testing"
"github.com/opencord/voltha-go/rw_core/core/device/state"
@@ -26,8 +27,6 @@
ofp "github.com/opencord/voltha-protos/v5/go/openflow_13"
"github.com/opencord/voltha-protos/v5/go/voltha"
"github.com/stretchr/testify/assert"
- "google.golang.org/grpc/codes"
- "google.golang.org/grpc/status"
)
type testDeviceManager struct {
@@ -449,7 +448,7 @@
return val, nil
}
}
- return nil, status.Errorf(codes.FailedPrecondition, "no route from:%d to:%d", ingressPortNo, egressPortNo)
+ return nil, fmt.Errorf("no route from:%d to:%d %w", ingressPortNo, egressPortNo, route.ErrNoRoute)
}
func (tfd *testFlowDecomposer) GetNNIPorts() map[uint32]struct{} {