[Searchlight][Zuul] tox failed tests at zuul check only

Clark Boylan cboylan at sapwetik.org
Fri Dec 7 18:16:12 UTC 2018


On Fri, Dec 7, 2018, at 8:17 AM, Trinh Nguyen wrote:
> Hi again,
> Just wonder how the image for searchlight test was set up? Which user is
> used for running ElasticSearch? Is there any way to indicate the user that
> will run the test? Can I do it with [1]? Based on the output of [2] I can
> see there are some permission issue of JDK if I run the functional tests
> with the stack user on my dev environment.
> 
> [1]
> https://git.openstack.org/cgit/openstack/searchlight/tree/tools/test-setup.sh
> [2]
> https://review.openstack.org/#/c/622871/3/searchlight/tests/functional/__init__.py
> 

The unittest jobs run as the Zuul user. This user has sudo access when test-setup.sh runs, but then we remove sudo access when tox is run. This is important as we are trying to help ensure that you can run tox locally without it making system level changes.

When your test setup script runs `dpkg -i` this package install may start running an elasticsearch instance. It depends on how the package is set up. This daemon would run under the user the package has configured for that service. When you run an elasticsearch process from your test suite this will run as the zuul user.

Hope this helps. I also left a couple of comments on change 622871.

Clark



More information about the openstack-discuss mailing list