projectatomic / adb-tests

placeholder for tests for the adb while its long term place to live is sorted out
GNU General Public License v2.0
7 stars 19 forks source link

Throwing NameError: global name 'pexpect' is not defined #46

Open amitkrout opened 8 years ago

amitkrout commented 8 years ago

vagrant_sshfs.py throws NameError: global name 'pexpect' is not defined

hferentschik commented 8 years ago

How do you reproduce this? On which OS? Can you please provide more context when creating issues?

amitkrout commented 8 years ago

Environment :

System Version: OS X 10.11.6 (15G31)
Kernel Version: Darwin 15.6.0
Avocado 36.0lts

Steps to reproduce

1. Download latest CDK + virtualbox provider on mac 
2. Clone  "https://github.com/projectatomic/adb-tests" and modify the config.yaml 
    vagrant_VAGRANTFILE_DIR : ".../cdk/components/rhel/rhel-ose"
     vagrant_PROVIDER : "virtualbox"
     vagrant_RHN_USERNAME : "usename"
     vagrant_RHN_PASSWORD : "password"
     openshift_lib_MODULE : ".../adb-tests/cdk-testsuite/libraries/openshift/openshift.py"
     openshift_util_MODULE : ".../adb-tests/cdk-testsuite/utils/openshiftUtils.py"
3. Go to the directory "/adb-tests/cdk-testsuite/tests" and execute the command 
    "avocado run vagrant_sshfs.py -m ../config/config.yaml"

ERROR :

2016-10-27 07:53:31,424 stacktrace       L0036 ERROR| 
2016-10-27 07:53:31,424 stacktrace       L0039 ERROR| Reproduced traceback from: /Library/Python/2.7/site-packages/avocado-36.0lts-py2.7.egg/avocado/core/test.py:435
2016-10-27 07:53:31,425 stacktrace       L0042 ERROR| Traceback (most recent call last):
2016-10-27 07:53:31,425 stacktrace       L0042 ERROR|   File "/Users/cdkqe/NightlyBuild/adb-tests/cdk-testsuite/tests/vagrant_sshfs.py", line 59, in test_check_mount
2016-10-27 07:53:31,425 stacktrace       L0042 ERROR|     self.vagrant_up_with_subscription()
2016-10-27 07:53:31,425 stacktrace       L0042 ERROR|   File "/Users/cdkqe/NightlyBuild/adb-tests/cdk-testsuite/tests/vagrant_sshfs.py", line 40, in vagrant_up_with_subscription
2016-10-27 07:53:31,425 stacktrace       L0042 ERROR|     child = pexpect.spawn (cmd)
2016-10-27 07:53:31,425 stacktrace       L0042 ERROR| NameError: global name 'pexpect' is not defined
2016-10-27 07:53:31,425 stacktrace       L0043 ERROR| 
2016-10-27 07:53:31,426 output           L0632 DEBUG| End of test..........
2016-10-27 07:53:31,427 test             L0550 ERROR| Traceback (most recent call last):

2016-10-27 07:53:31,427 test             L0550 ERROR|   File "/Library/Python/2.7/site-packages/avocado-36.0lts-py2.7.egg/avocado/core/test.py", line 490, in _run_avocado
    raise test_exception

2016-10-27 07:53:31,427 test             L0550 ERROR| NameError: global name 'pexpect' is not defined

2016-10-27 07:53:31,427 test             L0567 ERROR| ERROR 1-vagrant_sshfs.py:VagrantSshfs.test_check_mount -> NameError: global name 'pexpect' is not defined
agajdosi commented 7 years ago

Pexpect is not imported in vagrant_sshfs.py file.