]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
cephadm: run tests as root
authorKefu Chai <tchaikov@gmail.com>
Mon, 10 Oct 2022 13:57:57 +0000 (21:57 +0800)
committerAdam King <adking@redhat.com>
Wed, 12 Oct 2022 21:15:34 +0000 (17:15 -0400)
commite46aed0e00f8aada2249cefafb7c827e7a7bfa71
tree9f96f7566842e51aae2b52d26c0322bbc62244f1
parent6594a2e9ab5f3eb720f548760b0d778972521db0
cephadm: run tests as root

as we will be create/access directories which are only accessible by
root with pyfakefs, and pyfake respects the uid of current effective
user, so if we run the test using non-root user, these tests would fail
after the fix for https://github.com/pytest-dev/pyfakefs/issues/489
is addressed in the pyfakefs we are using.

in this change, we will run the test on behalf of root, so we can
create and access the directories as we did before.

Signed-off-by: Kefu Chai <tchaikov@gmail.com>
(cherry picked from commit ed19416067a7ef3b69310d22bf4e3b573e3011f0)

Conflicts:
src/cephadm/tests/fixtures.py
src/cephadm/tests/fixtures.py
src/cephadm/tests/test_cephadm.py