Code Review
/
ric-plt
/
e2mgr.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
RMR update and release step 1/2
[ric-plt/e2mgr.git]
/
E2Manager
/
handlers
/
httpmsghandlers
/
get_nodeb_request_handler_test.go
diff --git
a/E2Manager/handlers/httpmsghandlers/get_nodeb_request_handler_test.go
b/E2Manager/handlers/httpmsghandlers/get_nodeb_request_handler_test.go
index
12e3226
..
5a644b9
100644
(file)
--- a/
E2Manager/handlers/httpmsghandlers/get_nodeb_request_handler_test.go
+++ b/
E2Manager/handlers/httpmsghandlers/get_nodeb_request_handler_test.go
@@
-27,7
+27,6
@@
import (
"e2mgr/services"
"gerrit.o-ran-sc.org/r/ric-plt/nodeb-rnib.git/common"
"gerrit.o-ran-sc.org/r/ric-plt/nodeb-rnib.git/entities"
"e2mgr/services"
"gerrit.o-ran-sc.org/r/ric-plt/nodeb-rnib.git/common"
"gerrit.o-ran-sc.org/r/ric-plt/nodeb-rnib.git/entities"
- "gerrit.o-ran-sc.org/r/ric-plt/nodeb-rnib.git/reader"
"github.com/pkg/errors"
"github.com/stretchr/testify/assert"
"testing"
"github.com/pkg/errors"
"github.com/stretchr/testify/assert"
"testing"
@@
-37,10
+36,7
@@
func setupGetNodebRequestHandlerTest(t *testing.T) (*GetNodebRequestHandler, *mo
log := initLog(t)
config := &configuration.Configuration{RnibRetryIntervalMs: 10, MaxRnibConnectionAttempts: 3}
readerMock := &mocks.RnibReaderMock{}
log := initLog(t)
config := &configuration.Configuration{RnibRetryIntervalMs: 10, MaxRnibConnectionAttempts: 3}
readerMock := &mocks.RnibReaderMock{}
- readerProvider := func() reader.RNibReader {
- return readerMock
- }
- rnibDataService := services.NewRnibDataService(log, config, readerProvider, nil)
+ rnibDataService := services.NewRnibDataService(log, config, readerMock, nil)
handler := NewGetNodebRequestHandler(log, rnibDataService)
return handler, readerMock
}
handler := NewGetNodebRequestHandler(log, rnibDataService)
return handler, readerMock
}
@@
-54,7
+50,7
@@
func TestHandleGetNodebSuccess(t *testing.T) {
response, err := handler.Handle(models.GetNodebRequest{RanName: ranName})
assert.Nil(t, err)
assert.NotNil(t, response)
response, err := handler.Handle(models.GetNodebRequest{RanName: ranName})
assert.Nil(t, err)
assert.NotNil(t, response)
- assert.IsType(t, &models.
Get
NodebResponse{}, response)
+ assert.IsType(t, &models.NodebResponse{}, response)
}
func TestHandleGetNodebFailure(t *testing.T) {
}
func TestHandleGetNodebFailure(t *testing.T) {