mirror of
https://github.com/markqvist/rnsh.git
synced 2025-05-11 02:25:31 -04:00
Remove service name from aspects #12; minor tweaks
- Remove service name from RNS destination aspects. Service name now selects a suffix for the identity file and should only be supplied on the listener. The initiator only needs the destination hash of the listener to connect. - Show a spinner during link establishment on tty sessions - Attempt to catch and beautify exceptions on initiator
This commit is contained in:
parent
bd12efd7cf
commit
a07ce53bf9
7 changed files with 199 additions and 110 deletions
|
@ -41,10 +41,9 @@ def test_program_initiate_no_args():
|
|||
def test_program_initiate_dash_args():
|
||||
docopt_threw = False
|
||||
try:
|
||||
args = rnsh.args.Args(shlex.split("rnsh --config ~/Projects/rnsh/testconfig -s test -vvvvvvv a5f72aefc2cb3cdba648f73f77c4e887 -- -l"))
|
||||
args = rnsh.args.Args(shlex.split("rnsh --config ~/Projects/rnsh/testconfig -vvvvvvv a5f72aefc2cb3cdba648f73f77c4e887 -- -l"))
|
||||
assert not args.listen
|
||||
assert args.config == "~/Projects/rnsh/testconfig"
|
||||
assert args.service_name == "test"
|
||||
assert args.verbose == 7
|
||||
assert args.destination == "a5f72aefc2cb3cdba648f73f77c4e887"
|
||||
assert args.command_line == ["-l"]
|
||||
|
@ -53,6 +52,21 @@ def test_program_initiate_dash_args():
|
|||
assert not docopt_threw
|
||||
|
||||
|
||||
def test_program_listen_dash_args():
|
||||
docopt_threw = False
|
||||
try:
|
||||
args = rnsh.args.Args(shlex.split("rnsh -l --config ~/Projects/rnsh/testconfig -n -C -- /bin/pwd"))
|
||||
assert args.listen
|
||||
assert args.config == "~/Projects/rnsh/testconfig"
|
||||
assert args.destination is None
|
||||
assert args.no_auth
|
||||
assert args.no_remote_cmd
|
||||
assert args.command_line == ["/bin/pwd"]
|
||||
except docopt.DocoptExit:
|
||||
docopt_threw = True
|
||||
assert not docopt_threw
|
||||
|
||||
|
||||
def test_program_listen_config_print():
|
||||
docopt_threw = False
|
||||
try:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue