Skip to content
This repository has been archived by the owner on Dec 1, 2022. It is now read-only.

Commit

Permalink
Fix debug option
Browse files Browse the repository at this point in the history
  • Loading branch information
yixinglu committed Jul 2, 2021
1 parent abc8093 commit 5dc7c27
Showing 1 changed file with 12 additions and 11 deletions.
23 changes: 12 additions & 11 deletions tests/nebula-test-run.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,16 +45,20 @@ def init_parser():
default='',
help='Support multi graphds')
opt_parser.add_option('--address',
dest='address',
default='',
help='Address of the Nebula')
dest='address',
default='',
help='Address of the Nebula')
opt_parser.add_option('--debug',
dest='debug',
default=True,
help='Print verbose debug logs')
dest='debug',
default=True,
help='Print verbose debug logs')
return opt_parser


def opt_is(val, expect):
return type(val) == str and val.lower() == expect


def start_nebula(nb, configs):
if configs.address is not None and configs.address != "":
print('test remote nebula graph, address is {}'.format(configs.address))
Expand All @@ -65,7 +69,8 @@ def start_nebula(nb, configs):
else:
nb.install()
address = "localhost"
port = nb.start(debug_log=configs.debug, multi_graphd=configs.multi_graphd)
debug = opt_is(configs.debug, "true")
port = nb.start(debug_log=debug, multi_graphd=configs.multi_graphd)

# Load csv data
pool = get_conn_pool(address, port)
Expand Down Expand Up @@ -105,10 +110,6 @@ def stop_nebula(nb, configs=None):
print('nebula services have been stopped.')


def opt_is(val, expect):
return type(val) == str and val.lower() == expect


if __name__ == "__main__":
try:
parser = init_parser()
Expand Down

0 comments on commit 5dc7c27

Please sign in to comment.