summaryrefslogtreecommitdiffstats
path: root/src/tests/intg
diff options
context:
space:
mode:
authorLukas Slebodnik <lslebodn@redhat.com>2016-12-21 19:30:57 +0100
committerLukas Slebodnik <lslebodn@redhat.com>2017-01-16 19:11:43 +0100
commit73c9e3d710434857b5e13d5ccfc1f1245b1d2997 (patch)
tree02d17c4d2da34bed238f43658a08bed3306e4a06 /src/tests/intg
parente1711a2b2cb904f7edc26cc68566e064896d4f8a (diff)
downloadsssd-73c9e3d710434857b5e13d5ccfc1f1245b1d2997.tar.gz
sssd-73c9e3d710434857b5e13d5ccfc1f1245b1d2997.tar.xz
sssd-73c9e3d710434857b5e13d5ccfc1f1245b1d2997.zip
intg: Fix creating of slapd configuration
The python module subprocess expect bytes as an input. Traceback (most recent call last): File "src/tests/intg/test_ldap.py", line 51, in ds_inst ds_inst.setup() File "src/tests/intg/ds_openldap.py", line 201, in setup self._setup_config() File "src/tests/intg/ds_openldap.py", line 169, in _setup_config slapadd.communicate(config) File "/usr/lib64/python3.6/subprocess.py", line 821, in communicate self._stdin_write(input) File "/usr/lib64/python3.6/subprocess.py", line 776, in _stdin_write self.stdin.write(input) TypeError: a bytes-like object is required, not 'str' Reviewed-by: Martin Basti <mbasti@redhat.com>
Diffstat (limited to 'src/tests/intg')
-rw-r--r--src/tests/intg/ds_openldap.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/tests/intg/ds_openldap.py b/src/tests/intg/ds_openldap.py
index bbc101abe..0f58e5108 100644
--- a/src/tests/intg/ds_openldap.py
+++ b/src/tests/intg/ds_openldap.py
@@ -166,7 +166,7 @@ class DSOpenLDAP(DS):
["slapadd", "-F", self.conf_slapd_d_dir, "-b", "cn=config"],
stdin=subprocess.PIPE, close_fds=True
)
- slapadd.communicate(config)
+ slapadd.communicate(config.encode('utf-8'))
if slapadd.returncode != 0:
raise Exception("Failed to add configuration with slapadd")