Skip to content

Commit

Permalink
httpserver: enhance test script to accept different location of test …
Browse files Browse the repository at this point in the history
…image

Signed-off-by: Waldemar Kozaczuk <[email protected]>
  • Loading branch information
wkozaczuk committed Sep 11, 2019
1 parent d49d29d commit 8dbf5fe
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
3 changes: 3 additions & 0 deletions modules/httpserver-api/tests/basetest.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,9 @@ def exec_os(cls):
if cls.config.cmd:
args += ["-e", cls.config.cmd]

if cls.config.test_image:
args += ["-i", cls.config.test_image]

return subprocess.Popen(args)

@classmethod
Expand Down
1 change: 1 addition & 0 deletions modules/httpserver-api/tests/testhttpserver-api.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
parser.add_argument('--cmd', help='the command to execute')
parser.add_argument('--use_sudo', help='Use sudo with -n option instead of port forwarding', action='store_true')
parser.add_argument('--jsondir', help='location of the json files', default=os.path.join(module_base, 'api-doc/listings/'))
parser.add_argument('--test_image', help='the path to the test image')
client.Client.add_arguments(parser)

class test_httpserver(basetest.Basetest):
Expand Down

0 comments on commit 8dbf5fe

Please sign in to comment.