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
RIC-398 - Fix all critical issues from static code analysis scan
[ric-plt/e2mgr.git]
/
Automation
/
Tests
/
Scripts
/
loadscripts.py
diff --git
a/Automation/Tests/Scripts/loadscripts.py
b/Automation/Tests/Scripts/loadscripts.py
index
8615384
..
aec4b59
100644
(file)
--- a/
Automation/Tests/Scripts/loadscripts.py
+++ b/
Automation/Tests/Scripts/loadscripts.py
@@
-15,19
+15,27
@@
# limitations under the License.
#
##############################################################################
# limitations under the License.
#
##############################################################################
+#
+# This source code is part of the near-RT RIC (RAN Intelligent Controller)
+# platform project (RICP).
+#
import redis
import config
import redis
import config
-
-def verify_value():
+def getRedisClient():
c = config.redis_ip_address
p = config.redis_ip_port
c = config.redis_ip_address
p = config.redis_ip_port
- r = redis.Redis(host=c, port=p, db=0)
+ return redis.Redis(host=c, port=p, db=0)
+
+
+def verify_value():
+
+ r = getRedisClient()
value = "\b\x98\xf7\xdd\xa3\xc7\xb4\x83\xde\x15\x12\x11\n\x0f02f829:0007ab00"
value = "\b\x98\xf7\xdd\xa3\xc7\xb4\x83\xde\x15\x12\x11\n\x0f02f829:0007ab00"
@@
-39,11
+47,7
@@
def verify_value():
def add():
def add():
- c = config.redis_ip_address
-
- p = config.redis_ip_port
-
- r = redis.Redis(host=c, port=p, db=0)
+ r = getRedisClient()
r.set("{e2Manager},LOAD:test1", "\b\x98\xf7\xdd\xa3\xc7\xb4\x83\xde\x15\x12\x11\n\x0f02f829:0007ab00")
r.set("{e2Manager},LOAD:test1", "\b\x98\xf7\xdd\xa3\xc7\xb4\x83\xde\x15\x12\x11\n\x0f02f829:0007ab00")
@@
-55,13
+59,10
@@
def add():
def verify():
def verify():
- c = config.redis_ip_address
-
- p = config.redis_ip_port
-
- r = redis.Redis(host=c, port=p, db=0)
+ r = getRedisClient()
if r.exists("{e2Manager},LOAD:test1"):
return True
else:
return False
if r.exists("{e2Manager},LOAD:test1"):
return True
else:
return False
+