pulp / oci_env

9 stars 33 forks source link

Pulp user password - required by tests #68

Open pavelpicka opened 1 year ago

pavelpicka commented 1 year ago

When I run oci-env test -i -p pulp_rpm functional test required pulp password. Is it even set (Tried few without luck)?

===================================================== test session starts ======================================================
platform linux -- Python 3.8.13, pytest-7.2.0, pluggy-1.0.0
rootdir: /var/lib/pulp
plugins: pulpcore-3.22.0.dev0, xdist-3.0.2, custom-exit-code-0.3.0, pulp-smash-1!0.13.0
collected 294 items                                                                                                            

../../var/lib/pulp/api/test_acs.py ..                                                                                    [  0%]
../../var/lib/pulp/api/test_advisory_conflict.py .                                                                       [  1%]
../../var/lib/pulp/api/test_advisory_upload.py ....                                                                      [  2%]
../../var/lib/pulp/api/test_auto_publish.py ..                                                                           [  3%]
../../var/lib/pulp/api/test_character_encoding.py ..                                                                     [  3%]
../../var/lib/pulp/api/test_comps.py ......                                                                              [  5%]
../../var/lib/pulp/api/test_consume_content.py 
We trust you have received the usual lecture from the local System
Administrator. It usually boils down to these three things:

    #1) Respect the privacy of others.
    #2) Think before you type.
    #3) With great power comes great responsibility.

[sudo] password for pulp:
mdellweg commented 1 year ago

Can you try to make the test not use sudo?

dkliban commented 1 year ago

i fixed this locally by editing the /etc/sudoers file with the following addition:

pulp ALL=(ALL:ALL) NOPASSWD:ALL

pavelpicka commented 1 year ago

Exact the workaround I used, may this could be RFE (to not do local workaround every time) as rpm plugin tests needs to run dnf which requires root privileges

bmbouter commented 1 year ago

+1 to the tests not requiring sudo

lubosmj commented 1 year ago

@decko, is this the same issue you have experienced? How did you resolve it?

decko commented 1 year ago

@decko, is this the same issue you have experienced? How did you resolve it?

I didn't! But we could have two new issues here: 1- Just add the user to the sudoers file. 2- Work the tests to not use sudo and remove it from the images at all.

What do you think @lubosmj ?

lubosmj commented 1 year ago

I am in favour of option 1.