Skip to content

Commit

Permalink
test:cli:units: skip _permission_denied test if run as root
Browse files Browse the repository at this point in the history
  • Loading branch information
slyon committed Feb 27, 2024
1 parent c44f6e7 commit 9bff87d
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions tests/cli/test_units.py
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,7 @@ def test_raises_exception_main_function(self):
args = log.call_args.args
self.assertIn('Error in network definition: invalid boolean value', args[0])

@unittest.skipIf(os.getuid() == 0, 'Root can always read the file')
def test_raises_exception_main_function_permission_denied(self):
with open(os.path.join(self.tmproot, 'etc/netplan/test.yaml'), 'w') as f:
f.write('''network:
Expand Down

0 comments on commit 9bff87d

Please sign in to comment.