Mercurial > dropbear
comparison test/conftest.py @ 1836:06c7ddbb9dd6
Add first channel tests
These initial tests are checking various edge cases of channel handling
that have cropped up over the years.
author | Matt Johnston <matt@codeconstruct.com.au> |
---|---|
date | Mon, 18 Oct 2021 14:22:37 +0800 |
parents | |
children | 43ebe0028187 |
comparison
equal
deleted
inserted
replaced
1835:90ac15aeac43 | 1836:06c7ddbb9dd6 |
---|---|
1 def pytest_addoption(parser): | |
2 parser.addoption("--port", type=str, help="default is 2244 local, 22 remote") | |
3 parser.addoption("--dbclient", type=str, default="../dbclient") | |
4 parser.addoption("--dropbear", type=str, default="../dropbear") | |
5 parser.addoption("--hostkey", type=str, help="required unless --remote") | |
6 parser.addoption("--remote", type=str, help="remote host") | |
7 parser.addoption("--user", type=str, help="optional username") | |
8 | |
9 def pytest_configure(config): | |
10 opt = config.option | |
11 if not opt.hostkey and not opt.remote: | |
12 raise Exception("--hostkey must be given") | |
13 if not opt.port: | |
14 if opt.remote: | |
15 opt.port = "22" | |
16 else: | |
17 opt.port = "2244" | |
18 |