3 ADMIN_USERNAME=Administrator
4 ADMIN_PASSWORD=YeahWhatever
6 TEST1_USERNAME=testuser1
7 TEST1_USERPASS=testuser1
8 TEST1_PROFILENAME=testuser1
16 SERVER1_IP=192.168.244.20
18 SERVER1_DOMAIN=OPENCHANGETEST
20 ########################################################################
23 # You shouldn't need to modify anything after this
24 ########################################################################
26 declare -i TESTCOUNT=0
27 declare -i TESTPOINTCOUNT=0
30 TESTCOUNT=$TESTCOUNT+1
31 echo "##############################################################"
32 echo "Test $TESTCOUNT: $1"
33 echo "##############################################################"
37 TESTPOINTCOUNT=$TESTPOINTCOUNT+1
38 echo "# Testpoint $TESTCOUNT.$TESTPOINTCOUNT: $1"
46 TESTPOINT "$TOOL --version"
52 TESTPOINT "$TOOL --help"
54 TESTPOINT "$TOOL --usage"
57 ########################################################################
58 TEST "Verify mapiprofile"
59 ########################################################################
61 TESTPOINT_VERSION "./bin/mapiprofile"
63 TESTPOINT_USAGE "./bin/mapiprofile"
65 ## Create a test profile database
66 PROFILEDB=`mktemp -u profiles.XXXXXXXXXXXXXXXXXXXXX`
67 TESTPOINT "./bin/mapiprofile --database=$PROFILEDB --newdb"
69 ## Check we are OK if there is no entries in the database
70 TESTPOINT "./bin/mapiprofile --database=$PROFILEDB --list"
72 ## Check that the languages list stuff works
73 TESTPOINT "./bin/mapiprofile --listlangs"
75 ## Test point - Create an admin account profile
77 ## Test point - Set the admin account as the default
80 TESTPOINT "./bin/mapiprofile --database=$PROFILEDB --list"
82 ## Get the default account
83 TESTPOINT "./bin/mapiprofile --database=$PROFILEDB --getdefault"
85 ## Create a (test) user account using NTLM
86 TESTPOINT "./bin/mapiprofile --database=$PROFILEDB --username=$TEST1_USERNAME --password=$TEST1_USERPASS --profile=$TEST1_PROFILENAME --address=$SERVER1_IP --domain=$SERVER1_DOMAIN --create"
88 ## Test point - Create another (test) user account using Kerberos
90 ## Set the user account as the default
91 TESTPOINT "./bin/mapiprofile --database=$PROFILEDB --profile=$TEST1_PROFILENAME --default"
93 ## Dump a profile's contents
94 TESTPOINT "./bin/mapiprofile --database=$PROFILEDB --profile=$TEST1_PROFILENAME --dump"
96 ## Test point - Delete a profile
98 ########################################################################
99 TEST "Verify openchangeclient basic functions"
100 ########################################################################
102 TESTPOINT_VERSION "./bin/openchangeclient --database=$PROFILEDB --profile=$TEST1_PROFILENAME"
104 TESTPOINT_USAGE "./bin/openchangeclient --database=$PROFILEDB --profile=$TEST1_PROFILENAME"
106 ########################################################################
107 TEST "Verify openchangeclient admin functions"
108 ########################################################################
110 ########################################################################
111 TEST "Verify openchangeclient user functions"
112 ########################################################################
114 ## Verify that we can get a basic mailbox list
115 TESTPOINT "./bin/openchangeclient --database=$PROFILEDB --profile=$TEST1_PROFILENAME --mailbox"
117 ## Verify that we can list the users
118 TESTPOINT "./bin/openchangeclient --database=$PROFILEDB --profile=$TEST1_PROFILENAME --userlist"
120 ## Verify that we can download mail
121 TESTPOINT "./bin/openchangeclient --database=$PROFILEDB --profile=$TEST1_PROFILENAME --fetchmail"
123 ## Test point - verify we can send plain text mail
125 ## Test point - verify we can send HTML mail
127 ## Test point - verify we can add an attachment to a mail
129 ########################################################################
130 TEST "Verify openchangeclient OCPF functions"
131 ########################################################################
133 ########################################################################
134 TEST "Run the mapitest suite"
135 ########################################################################
137 TESTPOINT_VERSION "./bin/mapitest"
139 TESTPOINT_USAGE "./bin/mapitest"
141 TESTPOINT ./bin/mapitest --database=$PROFILEDB --no-server
143 ## Test point - Run just one step from mapitest
146 ## Run mapitest as a specified user
147 TESTPOINT "./bin/mapitest --database=$PROFILEDB --profile=$TEST1_PROFILENAME"
149 ########################################################################
150 TEST "Verify exchange2mbox"
151 ########################################################################
153 TESTPOINT_VERSION "./bin/exchange2mbox"
155 TESTPOINT_USAGE "./bin/exchange2mbox"
157 ########################################################################
158 TEST "Verify exchange2ical"
159 ########################################################################
161 TESTPOINT_VERSION "./bin/exchange2ical"
163 TESTPOINT_USAGE "./bin/exchange2ical"
165 ## Verify basic dump of calendar
166 TESTPOINT "./bin/exchange2ical --database=$PROFILEDB --profile=$TEST1_PROFILENAME"
168 ########################################################################
169 TEST "Verify locale_codepage"
170 ########################################################################
172 TESTPOINT_VERSION "./bin/locale_codepage"
174 TESTPOINT_USAGE "./bin/locale_codepage"
177 TESTPOINT "./bin/locale_codepage --locale_id=0x0c09"
179 ## Verify the group listing works
180 TESTPOINT "./bin/locale_codepage --list-groups"
183 TESTPOINT "./bin/locale_codepage --codepage=0x4B0"
185 ########################################################################
186 TEST "Verify openchangepfadmin"
187 ########################################################################
189 TESTPOINT_VERSION "./bin/openchangepfadmin"
191 TESTPOINT_USAGE "./bin/openchangepfadmin"
193 ## Get the list of public folders
194 TESTPOINT "./bin/openchangepfadmin --database=$PROFILEDB --profile=$TEST1_PROFILENAME --list"