Drop the unnecessary sudo from probe tests
While innocently running probe tests that usued to work, they started dropping to [sudo] prompt and hang. Apparently, someone added an harmless-looking sudo, but this does not work if the testing user does not have sudo priviletes. The code checks very explicitly above that these operations would be allowed, and thus the sudo is unnecessary. We can just omit it, and get probe tests working again. Change-Id: I654c3d954711d4892ff43d7a8df7c3248cdf7aff
This commit is contained in:
parent
8bf93f1f40
commit
c20d611016
@ -16,7 +16,7 @@
|
|||||||
import os
|
import os
|
||||||
|
|
||||||
from errno import EEXIST
|
from errno import EEXIST
|
||||||
from shutil import copyfile
|
from shutil import copyfile, move
|
||||||
from tempfile import mkstemp
|
from tempfile import mkstemp
|
||||||
from time import time
|
from time import time
|
||||||
from unittest import main
|
from unittest import main
|
||||||
@ -68,10 +68,8 @@ class TestPartPowerIncrease(ProbeTest):
|
|||||||
copyfile(self.builder_file, backup_name)
|
copyfile(self.builder_file, backup_name)
|
||||||
|
|
||||||
# Restore original ring
|
# Restore original ring
|
||||||
os.system('sudo mv %s %s' % (
|
move(self.ring_file_backup, self.ring_file)
|
||||||
self.ring_file_backup, self.ring_file))
|
move(self.builder_file_backup, self.builder_file)
|
||||||
os.system('sudo mv %s %s' % (
|
|
||||||
self.builder_file_backup, self.builder_file))
|
|
||||||
|
|
||||||
def _find_objs_ondisk(self, container, obj):
|
def _find_objs_ondisk(self, container, obj):
|
||||||
locations = []
|
locations = []
|
||||||
|
Loading…
Reference in New Issue
Block a user