Odyssey
odysseyMigrTest.prg
1 #!/usr/bin/php
2 <?php
3 /**
4  * File: odysseyMigrTest.prg
5  * Purpose: Tests the mammoth endpoint: mOdysseyMigrExp.prg.
6  */
7 
8 error_reporting(E_ALL & ~E_NOTICE & ~E_STRICT & ~E_DEPRECATED);
9 
10 // Includes necessary files
11 $sharedLibrary = "/var/www/html/shared/library";
12 require_once("$sharedLibrary/hcuCommon.i");
13 
14 // Command line only takes one argument: the test to run.
15 if (count($argv) >= 2) {
16  switch($argv[1]) {
17  case "settings":
18  TestGetSettings();
19  break;
20  case "member":
21  case "members":
22  case "memdata":
23  TestMemberMigration();
24  break;
25  case "createhistoryfile":
26  case "gethistoryfile":
27  case "history":
28  TestHistoryMigration();
29  break;
30  case "admin":
31  case "info":
32  TestAdminMigration();
33  break;
34  case "adhoc":
35  TestAdhoc($argv);
36  break;
37  case "all":
38  case "regression":
39  $sepLength = GetSeparatorLength();
40 
41  print "\n\nTest Settings\n" . str_repeat("+", $sepLength) . "\n" . str_repeat("=", $sepLength) . "\n\n\n";
42  TestGetSettings();
43  print "\n\nTest Member Migration\n" . str_repeat("+", $sepLength) . "\n" . str_repeat("=", $sepLength) . "\n";
44  TestMemberMigration();
45  print "\n\nTest Admin Migration\n" . str_repeat("+", $sepLength) . "\n" . str_repeat("=", $sepLength) . "\n";
46  TestAdminMigration();
47  print "\n\nTest History Migration\n" . str_repeat("+", $sepLength) . "\n" . str_repeat("=", $sepLength) . "\n";
48  TestHistoryMigration();
49  break;
50  default:
51  print "Test is not valid.\n";
52  }
53 } else {
54  print "Command line only takes one argument: the test to run.\n";
55 }
56 
57 /**
58  * function GetSeparatorLength()
59  * @return the number of characters to spit out for the dividers between tests.
60  */
61 function GetSeparatorLength() {
62  return 40;
63 }
64 
65 /**
66  * function GetSecret()
67  * @return The secret string to create / verify the passphrase.
68  */
69 function GetSecret() {
70  return "n3c3s1t@m0\$Mud@rT0d@\$L@\$C0\$@\$!";
71 }
72 
73 /**
74  * function CreateHash($action, $cu)
75  * @return sha1 of the action, cu, and the secret string.
76  */
77 function CreateHash($action, $cu) {
78  return sha1("${action}${cu}" . GetSecret());
79 }
80 
81 /**
82  * function RunMigrCurl($server, $cu, $action, $hash)
83  * Calls the Mammoth endpoint for the export.
84  *
85  * @param $server -- www4, www3, www5, or www6. www doesn't return anything specific to the Credit Union.
86  * @param $cu -- the Credit Union code (uppercase.)
87  * @param $action -- the action to perform.
88  * @param $hash -- the passphrase to check.
89  * @param $parameters -- any additional parameters that need to be passed to Mammoth.
90  *
91  * @return array of the response. Mammoth endpoint returns data in a JSON encoded structure.
92  */
93 function RunMigrCurl($server, $cu, $action, $hash, $parameters = array()) {
94 
95  if (!isset($parameters) || !is_array($parameters)) {
96  $parameters = array();
97  }
98  $parameters["passphrase"] = $hash;
99  $parameters["action"] = $action;
100 
101  $parameters = http_build_query($parameters);
102 
103  $url = "${server}.homecu.net/hcuadm/mOdysseyMigrExp.prg?cu=" . urlencode($cu) . "&" . $parameters;
104  $ch = curl_init($url);
105 
106  curl_setopt($ch, CURLOPT_USERPWD, "nobody:no1home");
107  curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); // get response as string
108  curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
109  curl_setopt($ch, CURLOPT_FORBID_REUSE, true); // For testing, there are a lot of the same calls but make sure that it is fresh.
110  curl_setopt($ch, CURLOPT_FRESH_CONNECT, true); // For testing, there are a lot of the same calls but make sure that it is fresh.
111 
112  $response = curl_exec($ch);
113 
114  if ($action !== "gethistoryfile") {
115  $response = isset($response) && trim($response) != "" ? HCU_JsonDecode($response)
116  : array("action" => $action, "error" => "CURL call didn't return anything. (" . __FILE__ . ":" . __LINE__ . ")", "data" => array());
117  }
118 
119  return $response;
120 }
121 
122 /**
123  * function AssertEquals($title, $testThis, $needsToEqual)
124  * Tests if two strings or numbers are equal. Prints out the results.
125  *
126  * @param $title -- the title of the test.
127  * @param $testThis -- the variable to check.
128  * @param $needsToEqual -- the literal that the variable needs to equal for success.
129  */
130 function AssertEquals($title, $testThis, $needsToEqual) {
131  $testThis = trim($testThis);
132  $needsToEqual = trim($needsToEqual);
133  if ($testThis == $needsToEqual) {
134  print "$title was successful.\n";
135  } else {
136  print "$title failed.\n";
137  print "Expected: '$needsToEqual'\n";
138  print "Received: '$testThis'\n";
139  }
140 }
141 
142 /**
143  * function AssertStartsWith($title, $testThis, $needsToEqual)
144  * Tests if one string starts with string. Prints out the results.
145  *
146  * @param $title -- the title of the test.
147  * @param $testThis -- the variable to check.
148  * @param $needsToEqual -- the literal that the variable needs to equal for success.
149  */
150 function AssertStartsWith($title, $testThis, $needsToEqual) {
151  $testThis = trim($testThis);
152  $needsToEqual = trim($needsToEqual);
153  if (substr($testThis, 0, strlen($needsToEqual)) == $needsToEqual) {
154  print "$title was successful.\n";
155  } else {
156  print "$title failed.\n";
157  print "Expected: '$needsToEqual'\n";
158  print "Received: '$testThis'\n";
159  }
160 }
161 
162 /**
163  * function AssertNotContains($title, $testThis, $needsToEqual)
164  * Tests if one string starts with string. Prints out the results.
165  *
166  * @param $title -- the title of the test.
167  * @param $testThis -- the variable to check.
168  * @param $needsToEqual -- the literal that the variable needs to equal for success.
169  */
170 function AssertNotContains($title, $testThis, $contains) {
171  $testThis = trim($testThis);
172  $needsToEqual = trim($needsToEqual);
173  if (strpos($testThis, $contains) === false) {
174  print "$title was successful.\n";
175  } else {
176  print "$title failed.\n";
177  print "Expected: '$needsToEqual'\n";
178  print "Received: '$testThis'\n";
179  }
180 }
181 
182 /**
183  * function TestGetSettings()
184  * Tests the GetSettings data call from the Mammoth endpoint.
185  */
186 function TestGetSettings() {
187  $server = "www4";
188  $cu = "STARKCU";
189  $action = "settings";
190  $correctHash = CreateHash($action, $cu);
191 
192  $results = RunMigrCurl($server, $cu, $action, "hash");
193  AssertStartsWith("Test 1: using wrong hash", $results["error"], "Invalid passphrase.");
194 
195  $unusedAction = "unusedAction";
196  $wrongActionHash = CreateHash($unusedAction, $cu);
197  $results = RunMigrCurl($server, $cu, $unusedAction, $wrongActionHash);
198  AssertStartsWith("Test 2: using wrong action", $results["error"], "Action is unrecognized.");
199 
200  $results = RunMigrCurl($server, $cu, $action, $correctHash);
201  AssertEquals("Test 3: using right hash", $results["error"], "");
202 
203  // Assert that cuadmin export works
204  AssertEquals("Test 4: cuadmin count", count($results["data"]["cuadmin"]), 1);
205  AssertEquals("Test 5: cuadmin verify cu", $results["data"]["cuadmin"][0]["cu"], "STARKCU");
206 
207  // Assert that custom-content export works
208  AssertEquals("Test 6: custom-content count", count($results["data"]["custom-content"]), 26);
209  AssertEquals("Test 7: custom-content verify docsid", $results["data"]["custom-content"][0]["docsid"], 29);
210 
211  // Assert that menu export works
212  AssertEquals("Test 8: menu count", count($results["data"]["menu"]), 8);
213  AssertEquals("Test 9: menu verify display", $results["data"]["menu"][0]["display"]["en_US"], "Accounts");
214 
215  // Assert that branding export works
216  $branding = $results["data"]["branding"];
217  $branding = strtok(base64_decode($branding), "\n");
218  AssertEquals("Test 10: branding exists", $branding, "/* STARKCU Brand file");
219 }
220 
221 /**
222  * function TestAdhoc($argv)
223  * Allows the user to just get the data on a particular test.
224  *
225  * @param $argv -- this is the arguments from the command line. It needs three more arguments: server, cu, and action. @see RunMigrCurl.
226  * For "memdata" and "memhist", also have another parameter for the member.
227  */
228 function TestAdhoc($argv) {
229  if (count($argv) < 5) {
230  print "Not enough arguments. Needs {server cu action}.\n";
231  } else {
232  $server = $argv [2];
233  $cu = $argv [3];
234  $action = $argv [4];
235  $parameters = array(); // Additional parameters. At this point, it is just member.
236  if (count($argv) > 5) {
237  switch($action) {
238  case "memdata":
239  case "switchaccounts":
240  $parameters["members"] = $argv[5];
241  break;
242  case "createhistoryfile":
243  $parameters["restart"] = $argv[5];
244  break;
245  }
246  }
247  $hash = CreateHash($action, $cu);
248 
249  $results = RunMigrCurl($server, $cu, $action, $hash, $parameters);
250  print print_r($results, true) . "\n";
251  }
252 }
253 
254 /**
255  * function TestMemberMigration()
256  * Tests the data calls "members" and "memdata"
257  */
258 function TestMemberMigration() {
259  $server = "www4";
260  $cu = "STARKCU";
261  $testNum = 1;
262  $sepLength = GetSeparatorLength();
263 
264  // GetMembers
265  $action = "members";
266  $hash = CreateHash($action, $cu);
267 
268  print "\n\nTesting GetMembers...\n" . str_repeat("*", $sepLength) . "\n";
269  $results = RunMigrCurl($server, $cu, $action, $hash);
270  AssertEquals("Test " . ($testNum++) . ": get starkcu members count", $results["data"]["count"], 25);
271  AssertEquals("Test " . ($testNum++) . ": get starkcu members", $results["data"]["list"][0]["user_name"], "1103");
272 
273  // GetMemberData
274  $action = "memdata";
275  $members = array(555);
276  $members = json_encode($members);
277  $hash = CreateHash($action, $cu);
278 
279  print "\n\nTesting GetMemberData using $members on $cu...\n" . str_repeat("*", $sepLength) . "\n";
280  $results = RunMigrCurl($server, $cu, $action, $hash, array("members" => $members));
281  AssertEquals("Test " . ($testNum++) . ": get cuusers data", $results["data"]["account"][555]["cuusers"]["email"], "samuel@homecu.net");
282  AssertEquals("Test " . ($testNum++) . ": get cuquestselect data", $results["data"]["account"][555]["cuquestselect"][0]["answer"], "A");
283  AssertEquals("Test " . ($testNum++) . ": get accountbalance data", $results["data"]["account"][555]["accountbalance"][0]["amount"], 85);
284  AssertEquals("Test " . ($testNum++) . ": get loanbalance data", $results["data"]["account"][555]["loanbalance"][0]["payoff"], 2400.90);
285  AssertEquals("Test " . ($testNum++) . ": get holds data", count($results["data"]["account"][555]["holds"]), 0); // STARKCUHolds table doesn't exist.
286  AssertEquals("Test " . ($testNum++) . ": get culogtrack data", $results["data"]["account"][555]["culogtrack"][0]["yearmo"], 201806);
287  AssertEquals("Test " . ($testNum++) . ": get userlogins data", $results["data"]["account"][555]["userlogins"][0]["remote_ip"], "199.184.207.194");
288 
289  $members = array(779999, 6680);
290  $members = json_encode($members);
291  $cu = "SCRUBCU";
292  $hash = CreateHash($action, $cu); // The only accountnumbers on all of the alert tables is 779999 and 1103 on SCRUBCU and SAMCU.
293 
294  print "\n\nTesting GetMemberData using $members on $cu...\n" . str_repeat("*", $sepLength) . "\n";
295  $results = RunMigrCurl($server, $cu, $action, $hash, array("members" => $members));
296 
297  AssertEquals("Test " . ($testNum++) . ": get holds data", count($results["data"]["account"][779999]["holds"]), 0); // No records in SAMCUholds for 779999.
298  AssertEquals("Test " . ($testNum++) . ": get cualertbal data", $results["data"]["account"][779999]["cualertbal"][0]["accounttype"], "779999=3");
299  AssertEquals("Test " . ($testNum++) . ": get cualertcheck data", $results["data"]["account"][779999]["cualertcheck"][0]["notifyto"], "test@test.com");
300  AssertStartsWith("Test " . ($testNum++) . ": get cualertloan data", $results["data"]["account"][779999]["cualertloan"][0]["notifymsg"], "Overdue asdf");
301  AssertEquals("Test " . ($testNum++) . ": get cualerttrans data", $results["data"]["account"][779999]["cualerttrans"][0]["accounttype"], "779999=50");
302  AssertStartsWith("Test " . ($testNum++) . ": get cuadmeco data", $results["data"]["account"][779999]["cuadmeco"][0]["messagetext"], "234 fdsiofbdsf");
303  AssertEquals("Test " . ($testNum++) . ": get cusurveysays data", $results["data"]["account"][779999]["cusurveysays"][0]["answerid"], 1589);
304  AssertEquals("Test " . ($testNum++) . ": get cucmsresponse data", $results["data"]["account"][779999]["cucmsresponse"][0]["responseon"], "2014-12-30");
305 
306  AssertEquals("Test " . ($testNum++) . ": get cusms data", $results["data"]["account"][6680]["cusms"][0]["provider_id"], "vtext.com");
307  AssertEquals("Test " . ($testNum++) . ": get cusmstrack data", $results["data"]["account"][6680]["cusmstrack"][0]["yearmo"], 201204);
308 
309  $members = array(25198);
310  $members = json_encode($members);
311  $cu = "CRUISECU";
312  $hash = CreateHash($action, $cu); // Very few items are in the holds tables.
313 
314  print "\n\nTesting GetMemberData using $members on $cu...\n" . str_repeat("*", $sepLength) . "\n";
315  $results = RunMigrCurl($server, $cu, $action, $hash, array("members" => $members));
316 
317  AssertEquals("Test " . ($testNum++) . ": get holds data", $results["data"]["account"][25198]["holds"][0]["amount"], -19.95);
318  AssertEquals("Test " . ($testNum++) . ": get curepeattx data", $results["data"]["account"][25198]["curepeattx"][0]["amount"], 5.12);
319 
320  $members = array(251189);
321  $members = json_encode($members);
322  $cu = "STARKCU";
323  $hash = CreateHash($action, $cu);
324 
325  print "\n\nTesting GetMemberData using $members on $cu...\n" . str_repeat("*", $sepLength) . "\n";
326  $results = RunMigrCurl($server, $cu, $action, $hash, array("members" => $members));
327 
328  AssertEquals("Test " . ($testNum++) . ": get cuauditusers data", $results["data"]["account"][251189]["cuauditusers"][0]["action"], "ADD");
329  AssertEquals("Test " . ($testNum++) . ": get cuauditusers data", $results["data"]["account"][251189]["cuauditusers"][0]["auditrecbefore"], "{\"cuusers\":[[]]}");
330  AssertEquals("Test " . ($testNum++) . ": get cuauditusers data", $results["data"]["account"][251189]["cuauditusers"][0]["auditrecafter"], "{\"cuusers\":[{\"cu\":\"STARKCU \","
331  . "\"user_name\":\"251189 \",\"passwd\":\"\$1\$xeKrZHBI\$zd2jHnzYFRdW7Zg1U79pu1\",\"pktdate\":null,\"pktstamp\":null,\"email\":\"miki@homecu.net\","
332  . "\"estmt_flag\":\"N\",\"egenl_flag\":\"N\",\"failedremain\":\"4\",\"forcechange\":\"N\",\"forceremain\":\"3\",\"lastlogin\":null,\"priorlogin\":null,"
333  . "\"failedlogin\":null,\"pwchange\":\"2016-06-21 13:41:25.677453-06\",\"msg_tx\":\"0\",\"billpayid\":null,\"employee\":\"N\",\"depositlimit\":\"0.00\","
334  . "\"userflags\":\"2\",\"user_alias\":null,\"challenge_quest_id\":\"0\"}]}");
335 }
336 
337 /**
338  * function TestAdminMigration()
339  * Tests the data calls "admin" and "info."
340  */
341 function TestAdminMigration() {
342  $server = "www4";
343  $cu = "STARKCU";
344  $testNum = 1;
345  $sepLength = GetSeparatorLength();
346 
347  // GetAdmin
348  $action = "admin";
349  $hash = CreateHash($action, $cu);
350 
351  print "\n\nTesting GetAdmin... ($cu)\n" . str_repeat("*", $sepLength) . "\n";
352  $results = RunMigrCurl($server, $cu, $action, $hash);
353 
354  AssertEquals("Test " . ($testNum++) . ": get cuadminusers data", $results["data"]["adminusers"][0]["cuadminusers"]["user_name"], "mark4stark");
355  AssertEquals("Test " . ($testNum++) . ": get cuadmquestselect data", count($results["data"]["adminusers"][0]["cuadmquestselect"]), 0);
356  AssertEquals("Test " . ($testNum++) . ": get cuadminallow data", $results["data"]["adminusers"][0]["cuadminallow"][0]["program"], "AddChange");
357  AssertStartsWith("Test " . ($testNum++) . ": get cuauditadmin data", $results["data"]["adminusers"][0]["cuauditadmin"][0]["chdate"], "2012-11-13");
358 
359  // Audit new tests
360  AssertEquals("Test " . ($testNum++) . ": get cuauditadmin data", $results["data"]["adminusers"][0]["cuauditadmin"][0]["auditrecbefore"], "{\"cuadminusers\":[[]]}");
361  AssertEquals("Test " . ($testNum++) . ": get cuauditadmin data", $results["data"]["adminusers"][0]["cuauditadmin"][0]["auditrecafter"], "{\"cuadminusers\":[{\"cu\":\"STARKCU \","
362  . "\"user_name\":\"mark4stark\",\"passwd\":\"\$1\$Csg2wOl3\$dn8OFwGOc3LmwmnEnietL\/\",\"realname\":\"Mark Devel 4 Stark\",\"failedremain\":\"4\",\"forcechange\":\"Y\","
363  . "\"forceremain\":\"3\",\"lastlogin\":null,\"priorlogin\":null,\"failedlogin\":null,\"pwchange\":\"2012-11-13 11:41:44.354901-07\",\"email\":\"mark@homecu.net\","
364  . "\"userflags\":\"0\",\"confidence\":null}]}");
365  AssertEquals("Test " . ($testNum++) . ": get cuauditadmin data", $results["data"]["adminusers"][0]["cuauditadmin"][1]["action"], "PROGS_A");
366  AssertEquals("Test " . ($testNum++) . ": get cuauditadmin data", $results["data"]["adminusers"][0]["cuauditadmin"][1]["auditrecbefore"], "{\"cuadminallow\":[]}");
367  AssertEquals("Test " . ($testNum++) . ": get cuauditadmin data", $results["data"]["adminusers"][0]["cuauditadmin"][1]["auditrecafter"], "{\"cuadminallow\":[{\"cu\":\"STARKCU \","
368  . "\"user_name\":\"mark4stark\",\"program\":\"AppAdm\"}]}");
369 
370  AssertEquals("Test " . ($testNum++) . ": get cutrusteddetail data", $results["data"]["cutrusteddetail"][0]["trustedid"], "ACCSOFT");
371  AssertEquals("Test " . ($testNum++) . ": get cuhavetrans data", $results["data"]["cuhavetrans"][0]["trancode"], "AT");
372  AssertEquals("Test " . ($testNum++) . ": get cuadmnotify data", $results["data"]["cuadmnotify"][0]["email"], "mike@homecu.com");
373  AssertEquals("Test " . ($testNum++) . ": get cucmsfrags data", $results["data"]["cucmsfrags"][0]["docsid"], 1);
374  AssertStartsWith("Test " . ($testNum++) . ": get cusurveymaster data", $results["data"]["cusurveymaster"][0]["question"], "<iframe src='https://olb.deeptarget.com/acclaimfcu/trgtframe.aspx?");
375  AssertEquals("Test " . ($testNum++) . ": get cusurveydetail data", $results["data"]["cusurveydetail"][0]["answertext"], "Yes");
376  AssertEquals("Test " . ($testNum++) . ": get cusurveyquest data", $results["data"]["cusurveyquest"][0]["question"], "Would it be nice to win the lottery?");
377  AssertEquals("Test " . ($testNum++) . ": get cucontact data", $results["data"]["cucontact"][0]["phone"], "208-866-6789");
378  AssertEquals("Test " . ($testNum++) . ": get cusurveyintro data", $results["data"]["cusurveyintro"][0]["surveyintro"], "There is now a STARKCU Survey Intro!!");
379 
380  $cu = "SCRUBCU";
381  $hash = CreateHash($action, $cu);
382 
383  print "\n\nTesting GetAdmin... ($cu)\n" . str_repeat("*", $sepLength) . "\n";
384  $results = RunMigrCurl($server, $cu, $action, $hash);
385 
386  AssertEquals("Test " . ($testNum++) . ": get cuadminexclude data", $results["data"]["adminusers"][1]["cuadminexclude"][0]["program"], "fullupload");
387  AssertEquals("Test " . ($testNum++) . ": get cualertmsgs data", $results["data"]["cualertmsgs"][0]["message"], "This is a test of email");
388  AssertEquals("Test " . ($testNum++) . ": get extkey data", $results["data"]["extkey"][0]["accountnumber"], "666665");
389 
390  $cu = "STARKCU";
391  $action = "info";
392  $hash = CreateHash($action, $cu);
393 
394  // GetInfo
395  print "\n\nTesting GetInfo... ($cu)\n" . str_repeat("*", $sepLength) . "\n";
396  $results = RunMigrCurl($server, $cu, $action, $hash);
397 
398  AssertEquals("Test " . ($testNum++) . ": get cuinfo data", $results["data"]["cuinfo"][0]["addr1"], "123 W Tree Lane");
399  AssertEquals("Test " . ($testNum++) . ": get cuinfo_notes data", $results["data"]["cuinfo_notes"][0]["messagetext"], "This is a test of the national broadcast system.");
400 }
401 
402 /**
403  * function TestHistoryMigration
404  * Tests the "createhistoryfile" and "gethistoryfile" calls.
405  */
406 function TestHistoryMigration() {
407  $server = "www4";
408  $cu = "STARKCU";
409  $testNum = 1;
410  $sepLength = GetSeparatorLength();
411 
412  // CreateHistoryFile
413  $action = "createhistoryfile";
414  $hash = CreateHash($action, $cu);
415 
416  print "\n\nTesting CreateHistoryFile... ($cu)\n" . str_repeat("*", $sepLength) . "\n";
417  $results = RunMigrCurl($server, $cu, $action, $hash, array("restart" => "Y"));
418 
419  AssertEquals("Test " . ($testNum++) . ": create history file", $results["error"], "");
420  AssertEquals("Test " . ($testNum++) . ": create history file", $results["file"], "/home/starkcu/tmp/memhist");
421 
422  $results = RunMigrCurl($server, $cu, $action, $hash);
423  AssertStartsWith("Test " . ($testNum++) . ": create history file (2nd time)", $results["error"], "Process is already started.");
424 
425  $sleepTime = 5;
426  print "\n\nSleeping for $sleepTime seconds.\n";
427  sleep($sleepTime);
428 
429  // GetHistoryFile
430  $action = "gethistoryfile";
431  $hash = CreateHash($action, $cu);
432 
433  print "\n\nTesting GetHistoryFile... ($cu)\n" . str_repeat("*", $sepLength) . "\n";
434  $results = RunMigrCurl($server, $cu, $action, $hash);
435 
436  AssertStartsWith("Test " . ($testNum++) . ": get history file size", strlen($results), 175655);
437 
438  $sleepTime = 5;
439  print "\n\nSleeping for $sleepTime seconds.\n";
440  sleep($sleepTime);
441 
442  // GetHistoryFile
443  $action = "gethistoryfile";
444  $cu = "ILFCU";
445  $hash = CreateHash($action, $cu);
446 
447  print "\n\nTesting GetHistoryFile... ($cu)\n" . str_repeat("*", $sepLength) . "\n";
448  $results = RunMigrCurl($server, $cu, $action, $hash);
449 
450  AssertStartsWith ("Test " . ($testNum++) . ": get history file size", strlen($results), 12214968);
451  AssertNotContains("Test " . ($testNum++) . ": no memory problem", $results, "tried to allocate");
452 }