Skip to content

Commit b639e26

Browse files
committed
Add set_ou test with radcli
1 parent 08d8164 commit b639e26

File tree

3 files changed

+12
-3
lines changed

3 files changed

+12
-3
lines changed

config/realm_ad.yml.example

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@
55
:keytab_path: /etc/foreman-proxy/realm_ad.keytab
66
:principal: realm-proxy@EXAMPLE.COM
77

8-
:domain_controller: dc.example.com
8+
:domain_controller: dc.example.com

test/api_tests.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,5 @@ curl -d 'hostname=server1.example.com' http://localhost:8000/realm/EXAMPLE.COM
1010
curl -d 'hostname=server1.example.com&rebuild=true' http://localhost:8000/realm/EXAMPLE.COM
1111

1212
# delete host
13-
curl -XDELETE http://localhost:8000/realm/EXAMPLE.COM/server1.example.com
13+
curl -XDELETE http://localhost:8000/realm/EXAMPLE.COM/server1
1414

test/test_radcli.rb

+10-1
Original file line numberDiff line numberDiff line change
@@ -45,4 +45,13 @@
4545
# Delete the computer accounts object
4646
enroll = Adcli::AdEnroll.new(adconn)
4747
enroll.set_computer_name("server1")
48-
enroll.delete()
48+
enroll.delete()
49+
50+
51+
# Create a computer account object in specific OU
52+
enroll = Adcli::AdEnroll.new(adconn)
53+
enroll.set_domain_ou('OU=Computers,OU=Foobar,DC=example,DC=com')
54+
enroll.set_computer_name("server1")
55+
enroll.set_host_fqdn("server1.example.com")
56+
enroll.set_computer_password("password")
57+
enroll.join()

0 commit comments

Comments
 (0)