Skip to content
Snippets Groups Projects
Commit b5ec4dd8 authored by alexey.stratulat's avatar alexey.stratulat
Browse files

[+] Ported and adapted test from libdap-python

parent a4205158
No related branches found
No related tags found
1 merge request!1Features 2466
from libCellFrame import *
import os
import sys
def create_config_file(app_name):
f = open(app_name+".cfg", "w")
f.write("[server]\nlisten_address=0.0.0.0\n")
f.close()
print("Start main test")
app_name = "testAPP"
print("Create config file")
create_config_file(app_name)
json_string = """{
"modules": "",
"DAP": {
"config_dir": \""""+os.getcwd()+"""\",
"log_level": "L_DEBUG",
"application_name": \""""+app_name+"""\",
"file_name_log": \""""+app_name+""".text\"
}
}"""
init(json_string)
logItInfo("Initialization of the DAP done")
setLogLevel(0)
logItInfo("Level logging ""DEBUG"" done")
logItInfo( "Test. Outputting a string using the log_it function in the libdap library")
logItInfo("Outputting a string using the log_it function done")
res1 = configGetItem("server", "listen_address")
logItInfo("Output [server] 'listen_address' = "+res1+"\n")
res2 = configGetItemDefault("server1", "listen_address", "8.8.8.8")
logItInfo("Output default value '8.8.8.8' [server1] 'listen_address' = "+res2+"\n")
logItInfo( "TEST. Get default config done")
deinit()
logItInfo("Deinitialization done")
os.remove(app_name+".cfg")
logItInfo( "Main test done");
sys.exit(0)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment