diff options
author | Matt Johnston <matt@codeconstruct.com.au> | 2021-10-18 14:22:37 +0800 |
---|---|---|
committer | Matt Johnston <matt@codeconstruct.com.au> | 2021-10-18 14:22:37 +0800 |
commit | 32d498cec3bd943bf01b83fe8ac90efe08663b96 (patch) | |
tree | 3793506765b640f887d96d61307b0eefe8389b36 /test/conftest.py | |
parent | 4ee9231b778744baf4855cf5e1b03f8ca441a179 (diff) | |
download | dropbear-32d498cec3bd943bf01b83fe8ac90efe08663b96.tar.gz |
Add first channel tests
These initial tests are checking various edge cases of channel handling
that have cropped up over the years.
Diffstat (limited to 'test/conftest.py')
-rw-r--r-- | test/conftest.py | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/test/conftest.py b/test/conftest.py new file mode 100644 index 0000000..a8728f1 --- /dev/null +++ b/test/conftest.py @@ -0,0 +1,18 @@ +def pytest_addoption(parser): + parser.addoption("--port", type=str, help="default is 2244 local, 22 remote") + parser.addoption("--dbclient", type=str, default="../dbclient") + parser.addoption("--dropbear", type=str, default="../dropbear") + parser.addoption("--hostkey", type=str, help="required unless --remote") + parser.addoption("--remote", type=str, help="remote host") + parser.addoption("--user", type=str, help="optional username") + +def pytest_configure(config): + opt = config.option + if not opt.hostkey and not opt.remote: + raise Exception("--hostkey must be given") + if not opt.port: + if opt.remote: + opt.port = "22" + else: + opt.port = "2244" + |