]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/ceph-volume/ceph_volume/tests/util/test_arg_validators.py
Import ceph 15.2.8
[ceph.git] / ceph / src / ceph-volume / ceph_volume / tests / util / test_arg_validators.py
index 844518a44363948ebe01d5460e8b6b5dd1876f00..d4565ef4dcb5c3f6e2edfaff331c5ada65348ceb 100644 (file)
@@ -1,5 +1,6 @@
 import argparse
 import pytest
+import os
 from ceph_volume import exceptions
 from ceph_volume.util import arg_validators
 
@@ -9,7 +10,8 @@ class TestOSDPath(object):
     def setup(self):
         self.validator = arg_validators.OSDPath()
 
-    def test_is_not_root(self):
+    def test_is_not_root(self, monkeypatch):
+        monkeypatch.setattr(os, 'getuid', lambda: 100)
         with pytest.raises(exceptions.SuperUserError):
             self.validator('')