As Steve mentioned, you need to import OS_* envvars. A user with admin role is required to pass all functional tests. What I usually do is "export OS_CLOUD=devstack-admin" (if you use DevStack).
2017-07-04 22:01 GMT+09:00 Steve Martinelli <[email protected]>: > Looks like running tox will pass along any environment variables with the > prefix "OS_" from the shell to tox, see > https://github.com/openstack/python-openstackclient/blob/master/tox.ini#L55 > > So as long as you've sourced or exported a bunch of env. variables, you > should be ready to run tests. You don't and shouldn't run it with sudo > either. > > On Tue, Jul 4, 2017 at 2:25 AM, [email protected] <[email protected]> > wrote: >> >> Hello all, >> >> >> >> I am running functional tests for openstackclient. >> >> By using this command sudo tox -efunctional >> >> >> >> It gives me this error >> >> >> >> setUpClass >> (openstackclient.tests.functional.volume.v3.test_snapshot.VolumeSnapshotTests) >> >> >> ----------------------------------------------------------------------------------------- >> >> >> >> Captured traceback: >> >> ~~~~~~~~~~~~~~~~~~~ >> >> Traceback (most recent call last): >> >> File "openstackclient/tests/functional/volume/v3/test_snapshot.py", >> line 22, in setUpClass >> >> super(VolumeSnapshotTests, cls).setUpClass() >> >> File "openstackclient/tests/functional/volume/v2/test_snapshot.py", >> line 31, in setUpClass >> >> cls.VOLLY >> >> File "openstackclient/tests/functional/base.py", line 64, in >> openstack >> >> return execute('openstack ' + cmd, fail_ok=fail_ok) >> >> File "openstackclient/tests/functional/base.py", line 41, in execute >> >> result_err) >> >> tempest.lib.exceptions.CommandFailed: Command 'openstack volume create >> -f json --size 1 ee1a858057464f15b6488ec4f3c1da5d' returned non-zero exit >> status 1. >> >> stdout: >> >> >> >> stderr: >> >> Missing value auth-url required for auth plugin password >> >> >> >> >> >> Can someone tell me where do I need to configure environment variables >> >> So that functional tests run well? >> >> >> >> Any doc /url also will be helpful. >> >> >> >> Thanks >> >> Nidhi >> >> >> >> The information contained in this electronic message and any attachments >> to this message are intended for the exclusive use of the addressee(s) and >> may contain proprietary, confidential or privileged information. If you are >> not the intended recipient, you should not disseminate, distribute or copy >> this e-mail. Please notify the sender immediately and destroy all copies of >> this message and any attachments. WARNING: Computer viruses can be >> transmitted via email. The recipient should check this email and any >> attachments for the presence of viruses. The company accepts no liability >> for any damage caused by any virus transmitted by this email. www.wipro.com >> >> __________________________________________________________________________ >> OpenStack Development Mailing List (not for usage questions) >> Unsubscribe: [email protected]?subject:unsubscribe >> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev >> > > > __________________________________________________________________________ > OpenStack Development Mailing List (not for usage questions) > Unsubscribe: [email protected]?subject:unsubscribe > http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev > __________________________________________________________________________ OpenStack Development Mailing List (not for usage questions) Unsubscribe: [email protected]?subject:unsubscribe http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
