Skip to content
This repository has been archived by the owner on Jul 9, 2020. It is now read-only.

Unable to use with_system_user with integration.ShellCase #20

Open
pass-by-value opened this issue Jun 24, 2014 · 0 comments
Open

Unable to use with_system_user with integration.ShellCase #20

pass-by-value opened this issue Jun 24, 2014 · 0 comments

Comments

@pass-by-value
Copy link

The following error is thrown if I use the with_system_user decorator with instances inheriting from integration.ShellCase

ERROR: test_pam_auth_valid_user (integration.shell.auth.AuthTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/ubuntu/src/salttesting/salttesting/helpers.py", line 48, in wrap
    return caller(cls)
  File "/home/ubuntu/src/salttesting/salttesting/helpers.py", line 542, in wrap
    create_user = cls.run_function('user.add', [username])
AttributeError: 'AuthTest' object has no attribute 'run_function'

AuthTest looks like

class AuthTest(integration.ShellCase):

    _call_binary_ = 'salt'
    is_root = os.geteuid() != 0
    @destructiveTest
    @skipIf(is_root, 'You must be logged in as root to run this test')
    @with_system_user('saltdev')
    def test_pam_auth_valid_user(self, username):
        '''
        test pam auth mechanism is working with a valid user
        '''
        alphabet =\
            "abcdefghijklmnopqrstuvwxyz0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"
        self.password = ''
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant