On Mon, Apr 23, 2018 at 5:31 PM, Miro Hrončok <mhroncok@redhat.com> wrote:
On 23.4.2018 12:55, Andrei Stepanov wrote:
Miro, Hi!

Hi Andrei, thanks for your answer.

Please check how you run tests.
 From the snippet I see that you run as ordinary user. ansible-playbook must be run as root.

I run the tests as a regular user, I want them to be executed in a container, being root inside. That should not require me to run it as root.

More logs also would be fine.

The logs are not helpful, because they indicate the problem: I'm not root. Yet I've attached it.

So let me rephrase the question:

How do I, as a regular user of my developer machine, run the tests in a docker container, being root in the container?

Note that I can run docker without sudo.

I don't want the ansible plabook to start creating files in my own /usr/local/bin. Which is what I believe would happen if I run it as root. I want it to:


From: https://fedoraproject.org/wiki/CI/Standard_Test_Interface

  • MUST execute the playbook as root

...

  • SHOULD drop privileges appropriately if the test suite should be run as non-root.


Also there should be an env variable:
https://fedoraproject.org/wiki/CI/Standard_Test_Roles#Inventory

export ANSIBLE_INVENTORY=$(test -e inventory && echo inventory || echo /usr/share/ansible/inventory)

Miro, may I ask. How do you see system starts TEST_SUBJECTS=docker:docker.io/library/fedora:26 with ordinary user credentials?

Thanks!


 * pull the fedora image if needed
 * start the container
 * go in, be root inside
 * install the package (from where?)
 * run the tests (inside the container, with the installed package)

--
Miro Hrončok
--
Phone: +420777974800
IRC: mhroncok

_______________________________________________
CI mailing list -- ci@lists.fedoraproject.org
To unsubscribe send an email to ci-leave@lists.fedoraproject.org