summaryrefslogtreecommitdiff
path: root/tests/cloud_tests/testcases/modules/set_password_expire.py
blob: 967aca7b10a9905ba6dc705a28277f89cafdb34a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# This file is part of cloud-init. See LICENSE file for license information.

"""cloud-init Integration Test Verify Script."""
from tests.cloud_tests.testcases import base


class TestPasswordExpire(base.CloudTestCase):
    """Test password module."""

    def test_shadow(self):
        """Test user frozen in shadow."""
        out = self.get_data_file('shadow')
        self.assertIn('harry:!:', out)
        self.assertIn('dick:!:', out)
        self.assertIn('tom:!:', out)
        self.assertIn('harry:!:', out)

    def test_sshd_config(self):
        """Test sshd config allows passwords."""
        out = self.get_data_file('sshd_config')
        self.assertIn('PasswordAuthentication yes', out)

# vi: ts=4 expandtab