test_local_domain.py revision 782d39e3916d16b8dbba6ae97aca1db2f3c35d76
#
# SSSD LOCAL domain tests
#
# Copyright (c) 2015 Red Hat, Inc.
# Author: Michal Zidek <mzidek@redhat.com>
#
# under the terms of the GNU General Public License as published by
# the Free Software Foundation; version 2 only
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
import os
import stat
import pwd
import time
import config
import signal
import subprocess
import pytest
def stop_sssd():
while True:
try:
except:
break
"""Generate sssd.conf and add teardown for removing it"""
def create_sssd_fixture(request):
"""Start sssd and add teardown for stopping it and removing state"""
raise Exception("sssd start failed")
def teardown():
try:
except:
pass
def local_domain_only(request):
[sssd]
domains = LOCAL
services = nss
[nss]
memcache_timeout = 0
id_provider = local
min_id = 10000
max_id = 20000
return None
def assert_nonexistent_user(name):
"""
Regression test for ticket
"""
# Change the LC_ALL variable to nonexistent locale
# sss_userdel must remove the user despite wrong LC_ALL
assert_nonexistent_user("foo")