Skip to content
Snippets Groups Projects
Commit 6e101727 authored by Fabian Seidl's avatar Fabian Seidl
Browse files

fix return value in networkelementServiceMock, nolint in pluginServiceMock

parent d2e0eac8
No related branches found
No related tags found
1 merge request!883[renovate] Update golangci/golangci-lint Docker tag to v1.59.0
Pipeline #200556 passed
This commit is part of merge request !883. Comments created here will be created in the context of that merge request.
package nucleus package nucleus
import ( import (
"code.fbi.h-da.de/danet/gosdn/controller/customerrs"
"code.fbi.h-da.de/danet/gosdn/controller/interfaces/networkelement" "code.fbi.h-da.de/danet/gosdn/controller/interfaces/networkelement"
"code.fbi.h-da.de/danet/gosdn/controller/store" "code.fbi.h-da.de/danet/gosdn/controller/store"
"github.com/google/uuid" "github.com/google/uuid"
...@@ -66,12 +67,12 @@ func (t *NetworkElementServiceMock) Get(query store.Query) (networkelement.Netwo ...@@ -66,12 +67,12 @@ func (t *NetworkElementServiceMock) Get(query store.Query) (networkelement.Netwo
// Second search for name // Second search for name
id, ok := t.nameLookupTable[query.Name] id, ok := t.nameLookupTable[query.Name]
if !ok { if !ok {
return nil, nil return nil, customerrs.CouldNotFindError{Name: query.Name}
} }
item, ok := t.Store[id] item, ok := t.Store[id]
if !ok { if !ok {
return nil, nil return nil, customerrs.CouldNotFindError{ID: id}
} }
return item, nil return item, nil
......
...@@ -62,5 +62,5 @@ func (t *PluginServiceMock) GetAll() ([]plugin.Plugin, error) { ...@@ -62,5 +62,5 @@ func (t *PluginServiceMock) GetAll() ([]plugin.Plugin, error) {
// RequestPlugin is a mock for requesting a plugin from the registry. // RequestPlugin is a mock for requesting a plugin from the registry.
// TODO: add plugin mock here. // TODO: add plugin mock here.
func (t *PluginServiceMock) RequestPlugin(uuid.UUID) (plugin.Plugin, error) { func (t *PluginServiceMock) RequestPlugin(uuid.UUID) (plugin.Plugin, error) {
return nil, nil return nil, nil //nolint:nilnil
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment