canonical / snap-tempest

This repository contains the source code of the snap for the OpenStack integration test suite, Tempest.
Apache License 2.0
2 stars 9 forks source link

Tempest unable to run tests in a workspace initiated by a different revision #8

Open agileshaw opened 1 year ago

agileshaw commented 1 year ago

After tempest initiates a workspace. a .stestr.conf file storing the path to the tempest module is created in the root of the workspace directory. This path contains tempest snap revision (e.g. /snap/tempest/x1/...). Upon snap refreshes, the path to the current tempest module will be different from the path stored in the workspace initiated with a previous tempest version, so running tests will produce module import error:

ImportError: 'test_agents' module incorrectly imported from '/snap/tempest/x2/lib/python3.10/site-packages/tempest/api/compute/admin'. Expected '/snap/tempest/x1/lib/python3.10/site-packages/tempest/api/compute/admin'. Is this module globally installed?
Sponge-Bas commented 9 months ago

A workaround for this issue is to create a symlink between the installed and expected dir