Code Review
/
ric-plt
/
o1.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
review
|
tree
raw
|
patch
|
inline
| side by side (parent:
2e033d9
)
Added unit test cases
21/5921/1
author
wahidw
<abdulwahid.w@nokia.com>
Thu, 22 Apr 2021 05:48:25 +0000
(
05:48
+0000)
committer
wahidw
<abdulwahid.w@nokia.com>
Thu, 22 Apr 2021 05:50:59 +0000
(
05:50
+0000)
Signed-off-by: wahidw <abdulwahid.w@nokia.com>
Change-Id: I8bd546f0ae9d32af881abca1df57ed5b38f2cfe1
agent/pkg/nbi/nbi_test.go
patch
|
blob
|
history
diff --git
a/agent/pkg/nbi/nbi_test.go
b/agent/pkg/nbi/nbi_test.go
index
92835ba
..
e1795ca
100755
(executable)
--- a/
agent/pkg/nbi/nbi_test.go
+++ b/
agent/pkg/nbi/nbi_test.go
@@
-55,6
+55,10
@@
var XappConfig = `{
}
}`
}
}`
+var XappConfigErr = `{
+ "ric": {
+ }`
+
var XappDescriptor = `{
"o-ran-sc-ric-xapp-desc-v1:ric": {
"xapps": {
var XappDescriptor = `{
"o-ran-sc-ric-xapp-desc-v1:ric": {
"xapps": {
@@
-215,6
+219,18
@@
func TestErrorCases(t *testing.T) {
// Invalid operation
err = n.ManageConfigmaps("o-ran-sc-ric-ueec-config-v1", "{}", 0)
assert.Equal(t, true, err != nil)
// Invalid operation
err = n.ManageConfigmaps("o-ran-sc-ric-ueec-config-v1", "{}", 0)
assert.Equal(t, true, err != nil)
+
+ //Invalid json
+ err = n.ManageConfigmaps("o-ran-sc-ric-ueec-config-v1", XappConfigErr, 1)
+ assert.Equal(t, true, err != nil)
+
+ // Invalid operation
+ err = n.ManageXapps("o-ran-sc-ric-ueec-config-v1", XappDescriptor, 5)
+ assert.Equal(t, true, err == nil)
+
+ //Invalid json
+ err = n.ManageXapps("o-ran-sc-ric-ueec-config-v1", XappConfigErr, 1)
+ assert.Equal(t, true, err != nil)
}
func TestConnStatus2Str(t *testing.T) {
}
func TestConnStatus2Str(t *testing.T) {