mirror of
https://github.com/philippdieter/puppet-ldapquery.git
synced 2026-05-05 15:32:47 +00:00
Rewrite for testability
Testing the methods inside of the function is a complete pain. This moves the code out to use the PuppetX pattern and adds some basic unit tests that validate the logic.
This commit is contained in:
4
spec/fixtures/entries_multivalue.obj
vendored
Normal file
4
spec/fixtures/entries_multivalue.obj
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
[Iu:Net::LDAP::Entry<01>dn: uid=zach,ou=users,dc=puppetlabs,dc=com
|
||||
sshpublickey:: c3NoLXJzYSBBQUFBQi4uLjE9PSB1c2VyQHNvbWV3aGVyZQo=
|
||||
sshpublickey:: c3NoLXJzYSBBQUFBQi4uLjI9PSB1c2VyQHNvbWV3aGVyZWVsc2UK
|
||||
:ET
|
||||
8
spec/fixtures/entries_objectClass.obj
vendored
Normal file
8
spec/fixtures/entries_objectClass.obj
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
[Iu:Net::LDAP::Entry<01>dn: uid=zach,ou=users,dc=puppetlabs,dc=com
|
||||
objectclass: posixAccount
|
||||
objectclass: shadowAccount
|
||||
objectclass: inetOrgPerson
|
||||
objectclass: puppetPerson
|
||||
objectclass: ldapPublicKey
|
||||
objectclass: top
|
||||
:ET
|
||||
3
spec/fixtures/entries_single.obj
vendored
Normal file
3
spec/fixtures/entries_single.obj
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
[Iu:Net::LDAP::Entry:dn: uid=zach,ou=users,dc=puppetlabs,dc=com
|
||||
uid: zach
|
||||
:ET
|
||||
Reference in New Issue
Block a user