Skip to content

Commit

Permalink
Test that device ownership is restored on delete
Browse files Browse the repository at this point in the history
The tests fails, will be fix in next patches.
  • Loading branch information
nirs committed Jul 24, 2019
1 parent fda52be commit 00a649f
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions test/provision_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,19 @@ def test_provision(cleanup):
assert st.st_uid == os.geteuid()
assert st.st_gid == os.getegid()

devices = [os.path.realpath(b.path) for b in BACKENDS.values()
if isinstance(b, userstorage.LoopDevice)]

run("delete")

for b in BACKENDS.values():
assert not b.exists()

for dev in devices:
st = os.stat(dev)
assert st.st_uid == 0
assert st.st_gid == 6 # disk


@pytest.mark.sudo
def test_create_twice(cleanup):
Expand Down

0 comments on commit 00a649f

Please sign in to comment.