Skip to content

Commit

Permalink
Fix identity params missing after ssh config merge
Browse files Browse the repository at this point in the history
  • Loading branch information
Maxbey committed Mar 20, 2017
1 parent 9399c6e commit 36a3d12
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion termius/core/models/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,5 +62,5 @@ def reducer(self, accumulator, value):
def merge_field(left, right, field):
"""Merge field of right instance to left one."""
left_field = getattr(left, field)
if left_field is None:
if not left_field:
setattr(left, field, getattr(right, field))
4 changes: 2 additions & 2 deletions tests/integration/info.bats
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ setup() {
echo ${lines[*]} >&2
cat ~/.termius/storage | jq . >&2
[ "$status" -eq 0 ]
[ "${lines[0]}" = "ssh -p 2022 -o StrictHostKeyChecking=yes -o IdentitiesOnly=no -o ServerAliveInterval=100 -o ServerAliveCountMax=20 -o ForwardAgent=yes localhost" ]
[ "${lines[0]}" = "ssh -p 2022 -o StrictHostKeyChecking=yes -o IdentitiesOnly=no -o ServerAliveInterval=100 -o ServerAliveCountMax=20 -o ForwardAgent=yes root@localhost" ]
}

@test "info host use ssh formatter with exta options disable agent forwarding" {
Expand All @@ -45,7 +45,7 @@ setup() {
echo ${lines[*]} >&2
cat ~/.termius/storage | jq . >&2
[ "$status" -eq 0 ]
[ "${lines[0]}" = "ssh -p 2022 -o StrictHostKeyChecking=yes -o IdentitiesOnly=no -o ServerAliveInterval=100 -o ServerAliveCountMax=20 -o ForwardAgent=no localhost" ]
[ "${lines[0]}" = "ssh -p 2022 -o StrictHostKeyChecking=yes -o IdentitiesOnly=no -o ServerAliveInterval=100 -o ServerAliveCountMax=20 -o ForwardAgent=no root@localhost" ]
}
@test "info group use default formatter" {
group=$(termius group -L test --port 2022)
Expand Down

0 comments on commit 36a3d12

Please sign in to comment.