Hi Yan,
Could you please attach the full log? The active controller client should have been set while pytest is collecting the test cases prior to setup step 1 even started.
It should be under ~/AUTOMATION_LOGS/<floatingip>/<session_dir>/TIS_AUTOMATION.log
Also assuming we figured out above issue, seems your goal is to run platform sanity that is not dependent on stx-openstack, at the moment, the setup automatically detects stx-openstack, and if it’s applied, it
will also expect the tenants,users,neutron routers,networks to have been created to prepare for stx-openstack test.
To work around it, you can do one of the two things for now.
1. Remove stx-openstack
2. In file /home/ec/workspace/codebase/test/automated-pytest-suite/setups.py, modify following function:
def setup_natbox_ssh(natbox, con_ssh):
return None
To fix it properly, we can add a configurable option to the test config file to skip the setup even if stx-openstack is present.
BR,
yang
From: Chen, Yan [mailto:yan.chen@intel.com]
Sent: August-01-19 4:01 AM
To: starlingx-discuss@lists.starlingx.io
Subject: [Starlingx-discuss] How to run stx-test: automated-pytest-suite?
Hi,
I’m trying to run the automated-pytest-suite cases under stx-test on a simplex deployment (on a vm created by qemu kvm).
The controller-0 is already unlocked and stx-openstack applied successfully.
I tried to make my own test.conf following the sample config file (stx-test_template.conf)
as attached.
And I tried to run cases with the following command:
$ pytest -m platform_sanity --testcase-config=./test.conf testcases/
But I got the following error log at the setup step 1:
[2019-08-01 07:44:23,466] 1477 INFO MainThread ssh.set_natbox_client:: NatBox localhost ssh client is set
[2019-08-01 07:44:23,466] 1425 INFO MainThread ssh.get_natbox_client:: Getting NatBox Client...
[2019-08-01 07:44:25,322] 845 INFO MainThread container_helper.is_stx_openstack_deployed:: ['applied']
[2019-08-01 07:44:25,322] 109 INFO MainThread setups.setup_keypair:: scp key file from controller to NATBox
***Failure at test setup: /home/ec/workspace/codebase/test/automated-pytest-suite/utils/clients/ssh.py:1549: utils.exceptions.ActiveControllerUnsetException: Active controller ssh client is not set! Please use ControllerClient.set_active_controller(ssh_client)
to set an active controller client.
ERROR
I’m wondering if this NATBox configuration is a must and if I configured it correctly?
Anyone can help on the test config file?
Or is there anything I need to do before the test?
Thanks a lot!
Yan