Docker: enable ssh tests
Test: restore tty after restconf start
This commit is contained in:
parent
8601690c91
commit
cafbe7d200
10 changed files with 41 additions and 9 deletions
|
|
@ -36,6 +36,13 @@ To download the openconfig and yang models required for the tests:
|
|||
git pull origin main
|
||||
```
|
||||
|
||||
## SSH and SSHD
|
||||
|
||||
Some tests require ssh and even sshd (eg test_netconf_ssh_callhome.sh), and requires generated host-keys:
|
||||
```
|
||||
# ssh-keygen -a
|
||||
```
|
||||
|
||||
## Continuous Integration
|
||||
|
||||
CI is done via github actions.
|
||||
|
|
|
|||
|
|
@ -637,6 +637,7 @@ function wait_restconf(){
|
|||
fi
|
||||
# echo "curl $CURLOPTS -X GET $myproto://localhost/restconf"
|
||||
hdr=$(curl $CURLOPTS -X GET $myproto://localhost/restconf 2> /dev/null)
|
||||
stty $STTYSETTINGS >/dev/null
|
||||
# echo "hdr:\"$hdr\""
|
||||
let i=0;
|
||||
while [[ "$hdr" != *"200"* ]]; do
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
#!/usr/bin/env bash
|
||||
# Netconf callhome RFC 8071
|
||||
# Requires an openssh + opensshd install + ssh-keygen -A
|
||||
|
||||
# Magic line must be first in script (see README.md)
|
||||
s="$_" ; . ./lib.sh || if [ "$s" = $0 ]; then exit 0; else return 0; fi
|
||||
|
|
@ -13,6 +14,13 @@ if ! [ -x "$ssh_bin" ]; then
|
|||
if [ "$s" = $0 ]; then exit 0; else return 0; fi # skip
|
||||
fi
|
||||
|
||||
if ! [ -x "/usr/sbin/sshd" ]; then
|
||||
echo "...sshd not installed"
|
||||
rm -rf $dir
|
||||
if [ "$s" = $0 ]; then exit 0; else return 0; fi # skip
|
||||
fi
|
||||
|
||||
|
||||
# Dont run this test with valgrind
|
||||
if [ $valgrindtest -ne 0 ]; then
|
||||
echo "...skipped "
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue