*** Settings ***
Documentation Keywords file
-Library ${CURDIR}/scripts.py
+Library ../Scripts/cleanup_db.py
Resource ../Resource/resource.robot
Library OperatingSystem
GET /v1/nodeb/test2
+Remove log files
+ Remove File ${EXECDIR}/${gnb_log_filename}
+ Remove File ${EXECDIR}/${e2mgr_log_filename}
+ Remove File ${EXECDIR}/${e2t_log_filename}
+ Remove File ${EXECDIR}/${rsm_log_filename}
+ Remove File ${EXECDIR}/${e2adapter_log_filename}
+
+Save logs
+ Sleep 1s
+ Run ${Save_sim_log}
+ Run ${Save_e2mgr_log}
+ Run ${Save_e2t_log}
+ Run ${Save_rsm_log}
+ Run ${Save_e2adapter_log}
+
Post Request setup node b endc-setup
Set Headers ${header}
Prepare Simulator For Load Information
Run And Return Rc And Output ${stop_simu}
Run And Return Rc And Output ${docker_Remove}
- ${flush} scripts.flush
+ ${flush} cleanup_db.flush
Should Be Equal As Strings ${flush} True
Run And Return Rc And Output ${run_simu_load}
${result}= Run And Return Rc And Output ${docker_command}
- Should Be Equal As Integers ${result[1]} 5
+ Should Be Equal As Integers ${result[1]} ${docker_number}
Prepare Enviorment
- ${flush} scripts.flush
+ ${starting_timestamp} Evaluate datetime.datetime.now(datetime.timezone.utc).isoformat("T") modules=datetime
+ ${e2t_log_filename} Evaluate "e2t.${SUITE NAME}.log".replace(" ","-")
+ ${e2mgr_log_filename} Evaluate "e2mgr.${SUITE NAME}.log".replace(" ","-")
+ ${gnb_log_filename} Evaluate "gnb.${SUITE NAME}.log".replace(" ","-")
+ ${rsm_log_filename} Evaluate "rsm.${SUITE NAME}.log".replace(" ","-")
+ ${e2adapter_log_filename} Evaluate "e2adapter.${SUITE NAME}.log".replace(" ","-")
+ ${Save_sim_log} Evaluate 'docker logs --since ${starting_timestamp} gnbe2_simu > ${gnb_log_filename}'
+ ${Save_e2mgr_log} Evaluate 'docker logs --since ${starting_timestamp} e2mgr > ${e2mgr_log_filename}'
+ ${Save_e2t_log} Evaluate 'docker logs --since ${starting_timestamp} e2 > ${e2t_log_filename}'
+ ${Save_rsm_log} Evaluate 'docker logs --since ${starting_timestamp} rsm > ${rsm_log_filename}'
+ ${Save_e2adapter_log} Evaluate 'docker logs --since ${starting_timestamp} e2adapter > ${e2adapter_log_filename}'
+ Set Suite Variable ${e2t_log_filename}
+ Set Suite Variable ${e2mgr_log_filename}
+ Set Suite Variable ${gnb_log_filename}
+ Set Suite Variable ${rsm_log_filename}
+ Set Suite Variable ${e2adapter_log_filename}
+ Set Suite Variable ${Save_sim_log}
+ Set Suite Variable ${Save_e2mgr_log}
+ Set Suite Variable ${Save_e2t_log}
+ Set Suite Variable ${Save_rsm_log}
+ Set Suite Variable ${Save_e2adapter_log}
+
+ ${flush} cleanup_db.flush
Should Be Equal As Strings ${flush} True
Run And Return Rc And Output ${stop_simu}
Run And Return Rc And Output ${docker_Remove}
Run And Return Rc And Output ${restart_e2adapter}
Sleep 2s
${result}= Run And Return Rc And Output ${docker_command}
- log to console ${result}
- Should Be Equal As Integers ${result[1]} 5
+ Should Be Equal As Integers ${result[1]} ${docker_number}
Start E2
Run And Return Rc And Output ${start_e2}
${result}= Run And Return Rc And Output ${docker_command}
- Should Be Equal As Integers ${result[1]} 5
+ Should Be Equal As Integers ${result[1]} ${docker_number}
Sleep 2s
-Start Redis
- Run And Return Rc And Output ${redis_remove}
- Run And Return Rc And Output ${start_redis}
+Start Dbass
+ Run And Return Rc And Output ${dbass_remove}
+ Run And Return Rc And Output ${dbass_start}
+ ${result}= Run And Return Rc And Output ${docker_command}
+ Should Be Equal As Integers ${result[1]} ${docker_number}
+
+Stop Dbass
+ Run And Return Rc And Output ${dbass_stop}
${result}= Run And Return Rc And Output ${docker_command}
- Should Be Equal As Integers ${result[1]} 5
+ Should Be Equal As Integers ${result[1]} ${docker_number-1}