forked from liferay/liferay-portal
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build-test-ldap.xml
142 lines (120 loc) · 3.36 KB
/
build-test-ldap.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
<?xml version="1.0"?>
<project name="portal-test-ldap" basedir="." default="test" xmlns:antelope="antlib:ise.antelope.tasks">
<import file="build-test.xml" />
<target name="prepare-ldap-apache">
<if>
<or>
<not>
<isset property="apache.directory.win32.dir" />
</not>
<not>
<isset property="apache.directory.win32.zip" />
</not>
</or>
<then>
<fail>
.
Please set "apache.directory.win32.dir" and "apache.directory.win32.zip" in
test.properties to point to an ApacheDS installation file.
</fail>
</then>
</if>
<delete dir="${app.server.parent.dir}/apacheds_1.5.7" />
<if>
<not>
<available file="${app.server.parent.dir}/${apache.directory.win32.zip}" />
</not>
<then>
<mkdir dir="${app.server.parent.dir}" />
<copy
file="${apache.directory.win32.dir}/${apache.directory.win32.zip}"
tofile="${app.server.parent.dir}/${apache.directory.win32.zip}"
/>
</then>
</if>
<unzip
dest="${app.server.parent.dir}"
src="${app.server.parent.dir}/${apache.directory.win32.zip}"
/>
</target>
<target name="run-ldap-tomcat">
<antcall target="prepare-ldap-apache" />
<parallel>
<daemons>
<antcall target="start-ldap" />
</daemons>
<sequential>
<waitfor>
<socket port="10389" server="localhost" />
</waitfor>
<tstamp>
<format property="tstamp.value" pattern="yyyyMMddkkmmssSSS" />
</tstamp>
<echo file="${tstamp.value}">version: 1
dn: dc=example,dc=com
objectClass: domain
objectClass: extensibleObject
objectClass: top
dc: example
dn: ou=users,dc=example,dc=com
objectClass: organizationalUnit
objectClass: top
ou: users
dn: ou=groups,dc=example,dc=com
objectClass: organizationalUnit
objectClass: top
ou: groups
dn: cn=janesmith,ou=users,dc=example,dc=com
objectClass: organizationalPerson
objectClass: person
objectClass: inetOrgPerson
objectClass: top
cn: janesmith
givenname: Jane
mail: [email protected]
sn: Smith
userpassword:: e1NIQX1xVXFQNWN5eG02WWNUQWh6MDVIcGg1Z3Z1OU09
businessCategory: cn=usergroup,ou=groups,dc=example,dc=com
dn: cn=lukeskywalker,ou=users,dc=example,dc=com
objectClass: organizationalPerson
objectClass: person
objectClass: inetOrgPerson
objectClass: top
cn: lukeskywalker
givenname: Luke
mail: [email protected]
sn: Skywalker
userpassword:: e1NIQX1xVXFQNWN5eG02WWNUQWh6MDVIcGg1Z3Z1OU09
dn: cn=martinluther,ou=users,dc=example,dc=com
objectClass: organizationalPerson
objectClass: person
objectClass: inetOrgPerson
objectClass: top
cn: martinluther
givenname: Martin
mail: [email protected]
sn: Luther
userpassword:: e1NIQX1xVXFQNWN5eG02WWNUQWh6MDVIcGg1Z3Z1OU09
dn: cn=usergroup,ou=groups,dc=example,dc=com
objectClass: groupOfUniqueNames
objectClass: top
cn: usergroup
uniqueMember: cn=janesmith,ou=users,dc=example,dc=com
businessCategory: cn=janesmith,ou=users,dc=example,dc=com</echo>
<exec dir="${app.server.parent.dir}/apacheds_1.5.7/bin" executable="java">
<arg value="-jar" />
<arg value="apacheds-tools.jar" />
<arg value="import" />
<arg value="-e" />
<arg value="-f" />
<arg value="${project.dir}\${tstamp.value}" />
</exec>
<delete file="${tstamp.value}" />
<ant antfile="build-test-tomcat.xml" target="run-selenium-tomcat">
<property name="test.class" value="${test.name}" />
</ant>
</sequential>
</parallel>
<antcall target="stop-ldap" />
</target>
</project>