action #178648
openSupport for running tests from user home directory with domain authentication
0%
Description
Description:¶
I have a server configured with domain authentication, and I want to use it to run OpenQA tests under different users who do not have access to the /var/lib/openqa/ directory. However, I encountered an issue when attempting to run tests from /home// .
When running tests from /home//, the following problems occur:
- In the web interface, attempting to view the contents of the test (test.pm) in a "Page not found" error.
- The "Candidate needles and tags" field does not display the needles used in the test.
- When a new needle is created, it is saved in /var/lib/openqa/tests/alt/needles/
- No symlink is created in /var/lib/openqa/pool// pointing to the test files.
Steps to Reproduce:¶
- Change permissions on the user's home directory to allow access:
chmod o+x /home/user
- Download os-autoinst with tests and needles to /home/user/.
- Create a symlink to os-autoinst:
ln -s /home/user/os-autoinst /home/user/alt
- Run the tests using the following command:
shell openqa-cli api -X POST jobs DISTRI=alt VERSION=p11 FLAVOR=workstation-iso ARCH=x86_64 BUILD=_BETA_TEST ISO=<isoname> TESTING_DIRECTION=distr MACHINE=64bit TEST=install_default_ext_profile CASEDIR=/home/user/alt NEEDLES_DIR=/home/user/alt/needles
I'm wondering if you've encountered similar issues before or have any ideas on how this could be implemented. Thanks!
Updated by mkittler about 1 month ago ยท Edited
You need to use OPENQA_BASEDIR
to change the prefix where files are located. When storing things in your home directory you also need to make sure to actually run all the services as your regular user (so you cannot use the "normal" systemd services, at least not without modification). I am using OPENQA_BASEDIR
a lot when developing openQA itself (where I start services rather manually as needed) so it is generally supposed to work (see https://github.com/Martchus/openQA-helper for my setup). The only problem I sometimes run into is that test code (e.g. from openSUSE) doesn't take OPENQA_BASEDIR
into account.
If you really only want tests and needles to be under a different directory (but just one openQA service still running as special user storing its internal files under /var/lib/openqa
) my setup is of course not what you want. Then you will of course run into the problems you mentioned. I'm afraid those are not straight forward to solve because that's not really how openQA was designed to work because:
- The web interface doesn't care about the directory where the test files were located during test execution because this is often on a completely different host.
- Central instances of the web interface like https://openqa.opensuse.org are setup to have their own copies of test files for all test distributions the users of that instance are interested in.
We are currently working on better Git support. This is what we generally expect users to use when they want to use a special version of test files not present on the web UI instance. It is actually possible to specify a Git URL as CASEDIR
and NEEDLES_DIR
for a long time and many details have been improved over the years. However, using Git would probably not be practical in your case and also not help with the issues you mentioned.
Updated by livdywan about 1 month ago
- Category set to Feature requests
- Target version set to future