2 # This script starts the Karaf shell and sends the password for SSH auth.
3 # Further tests in Karaf shell can be done here
8 # Time expect will wait for output
14 set prompt "opendaylight-user@root>"
16 # Wait for Karaf SSH server to come online
17 send_user "Waiting on OpenDaylight to start listening for SSH on port 8101\n"
18 exec bash -c "while ! nmap -Pn -p8101 localhost | grep -q open; do sleep 0.1; done"
20 # SSH into Karaf shell
21 spawn ssh -p 8101 -o StrictHostKeyChecking=no karaf@127.0.0.1
24 expect "Password authentication"
28 # Show features to make debugging easier
32 # Verify that a major feature is present
34 send "feature:list | grep odl-netvirt-openstack\r"
37 send_user "\nTest feature not found\n"
40 "OpenDaylight :: NetVirt :: OpenStack" {{
41 send_user "\nTest feature available\n"
45 # Disable this test until ODLPARENT-139 is fixed
48 # send "feature:install odl-netvirt-openstack\r"
50 # "Error executing command: Can't install feature" {{
51 # send_user "\nFailed to install test feature\n"
56 # Verify installed feature is actually installed
58 # The -i flag will only show installed features
59 # send "feature:list -i | grep odl-netvirt-openstack\r"
62 # send_user "\nTest feature not installed\n"
65 # "OpenDaylight :: NetVirt :: OpenStack" {{
66 # send_user "\nTest feature installed successfully\n"