Skip to content

Commit

Permalink
Merge pull request saltstack#55468 from s0undt3ch/features/pytest-sta…
Browse files Browse the repository at this point in the history
…ged-5

[PyTest #5] Only root can add users
  • Loading branch information
dwoz authored Dec 1, 2019
2 parents 20a4756 + 552749a commit 50335c4
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions tests/integration/shell/test_key.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
from tests.support.case import ShellCase
from tests.support.paths import TMP
from tests.support.mixins import ShellCaseCommonTestsMixin
from tests.support.helpers import skip_if_not_root, destructiveTest

# Import 3rd-party libs
from salt.ext import six
Expand Down Expand Up @@ -187,6 +188,8 @@ def test_list_acc(self):
expect = ['Accepted Keys:', 'minion', 'sub_minion']
self.assertEqual(data, expect)

@skip_if_not_root
@destructiveTest
def test_list_acc_eauth(self):
'''
test salt-key -l with eauth
Expand All @@ -197,6 +200,8 @@ def test_list_acc_eauth(self):
self.assertEqual(data, expect)
self._remove_user()

@skip_if_not_root
@destructiveTest
def test_list_acc_eauth_bad_creds(self):
'''
test salt-key -l with eauth and bad creds
Expand Down

0 comments on commit 50335c4

Please sign in to comment.