Code Review
/
ric-plt
/
submgr.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
H release step 2 of 2
[ric-plt/submgr.git]
/
pkg
/
teststub
/
controlRmr.go
diff --git
a/pkg/teststub/controlRmr.go
b/pkg/teststub/controlRmr.go
index
bcea500
..
011819b
100644
(file)
--- a/
pkg/teststub/controlRmr.go
+++ b/
pkg/teststub/controlRmr.go
@@
-20,8
+20,6
@@
package teststub
import (
"fmt"
import (
"fmt"
- "gerrit.o-ran-sc.org/r/ric-plt/xapp-frame/pkg/xapp"
- "os"
"testing"
)
"testing"
)
@@
-30,6
+28,8
@@
import (
//-----------------------------------------------------------------------------
type RmrControl struct {
TestWrapper
//-----------------------------------------------------------------------------
type RmrControl struct {
TestWrapper
+ RmrSrcId
+ RmrRtgSvc
syncChan chan struct{}
}
syncChan chan struct{}
}
@@
-42,21
+42,24
@@
func (tc *RmrControl) WaitCB() {
<-tc.syncChan
}
<-tc.syncChan
}
-func (tc *RmrControl) Init(desc string,
rtfile string, port string
) {
+func (tc *RmrControl) Init(desc string,
srcId RmrSrcId, rtgSvc RmrRtgSvc
) {
tc.TestWrapper.Init(desc)
tc.TestWrapper.Init(desc)
- os.Setenv("RMR_SEED_RT", rtfile)
- os.Setenv("RMR_SRC_ID", "localhost:"+port)
- xapp.Logger.Info("Using rt file %s", os.Getenv("RMR_SEED_RT"))
- xapp.Logger.Info("Using src id %s", os.Getenv("RMR_SRC_ID"))
+
+ tc.RmrSrcId = srcId
+ tc.RmrSrcId.Enable()
+
+ tc.RmrRtgSvc = rtgSvc
+ tc.RmrRtgSvc.Enable()
+
tc.syncChan = make(chan struct{})
}
func (tc *RmrControl) TestError(t *testing.T, pattern string, args ...interface{}) {
tc.syncChan = make(chan struct{})
}
func (tc *RmrControl) TestError(t *testing.T, pattern string, args ...interface{}) {
- tc.
Logger.
Error(fmt.Sprintf(pattern, args...))
+ tc.Error(fmt.Sprintf(pattern, args...))
t.Errorf(fmt.Sprintf(pattern, args...))
}
func (tc *RmrControl) TestLog(t *testing.T, pattern string, args ...interface{}) {
t.Errorf(fmt.Sprintf(pattern, args...))
}
func (tc *RmrControl) TestLog(t *testing.T, pattern string, args ...interface{}) {
- tc.
Logger.Info
(fmt.Sprintf(pattern, args...))
+ tc.
Debug
(fmt.Sprintf(pattern, args...))
t.Logf(fmt.Sprintf(pattern, args...))
}
t.Logf(fmt.Sprintf(pattern, args...))
}