Skip to content
Snippets Groups Projects

Enable deadcode linter

Merged Ghost User requested to merge istaester/enable-deadcode-linter into develop
6 files
+ 1
193302
Compare changes
  • Side-by-side
  • Inline
Files
6
@@ -11,7 +11,6 @@ import (
@@ -11,7 +11,6 @@ import (
ppb "code.fbi.h-da.de/danet/gosdn/api/go/gosdn/pnd"
ppb "code.fbi.h-da.de/danet/gosdn/api/go/gosdn/pnd"
spb "code.fbi.h-da.de/danet/gosdn/api/go/gosdn/southbound"
spb "code.fbi.h-da.de/danet/gosdn/api/go/gosdn/southbound"
"code.fbi.h-da.de/danet/gosdn/controller/interfaces/device"
"code.fbi.h-da.de/danet/gosdn/controller/interfaces/device"
"code.fbi.h-da.de/danet/gosdn/controller/interfaces/networkdomain"
"code.fbi.h-da.de/danet/gosdn/controller/interfaces/southbound"
"code.fbi.h-da.de/danet/gosdn/controller/interfaces/southbound"
"code.fbi.h-da.de/danet/gosdn/controller/mocks"
"code.fbi.h-da.de/danet/gosdn/controller/mocks"
"code.fbi.h-da.de/danet/gosdn/controller/nucleus"
"code.fbi.h-da.de/danet/gosdn/controller/nucleus"
@@ -24,10 +23,6 @@ import (
@@ -24,10 +23,6 @@ import (
"github.com/openconfig/gnmi/proto/gnmi"
"github.com/openconfig/gnmi/proto/gnmi"
log "github.com/sirupsen/logrus"
log "github.com/sirupsen/logrus"
"github.com/stretchr/testify/mock"
"github.com/stretchr/testify/mock"
"google.golang.org/grpc"
"google.golang.org/grpc/credentials/insecure"
cpb "code.fbi.h-da.de/danet/gosdn/api/go/gosdn/csbi"
)
)
const pndID = "2043519e-46d1-4963-9a8e-d99007e104b8"
const pndID = "2043519e-46d1-4963-9a8e-d99007e104b8"
@@ -45,32 +40,8 @@ var committedChangeUUID uuid.UUID
@@ -45,32 +40,8 @@ var committedChangeUUID uuid.UUID
var deviceUUID uuid.UUID
var deviceUUID uuid.UUID
var mockPnd *mocks.NetworkDomain
var mockPnd *mocks.NetworkDomain
var mockDevice device.Device
var mockDevice device.Device
var mockJwt *rbac.JWTManager
var sbiStore southbound.Store
var sbiStore southbound.Store
func callback(id uuid.UUID, ch chan device.Details) {
// Need for pnd creation, but not needed for this test case.
}
func getMockPND() networkdomain.NetworkDomain {
conn, err := grpc.Dial("orchestrator", grpc.WithTransportCredentials(insecure.NewCredentials()))
if err != nil {
log.Fatal(err)
}
csbiClient := cpb.NewCsbiServiceClient(conn)
newPnd, _ := nucleus.NewPND(
"test",
"test",
pndUUID,
csbiClient,
callback,
)
return newPnd
}
func TestMain(m *testing.M) {
func TestMain(m *testing.M) {
log.SetReportCaller(true)
log.SetReportCaller(true)
var err error
var err error
Loading