Commit Graph

39 Commits

Author SHA1 Message Date
Andrew Bettison
9d8707a0ad Fix broken 'dnaprotocol' tests
Explicitly create identities in 'dnaprotocol' fixtures because
start_servald_instances() no longer does it.

The create_single_identity() function was not setting NAMEA, NAMEB, etc.  when
they contained a space, because of shell misquoting.
2012-09-17 15:30:05 +09:30
Andrew Bettison
87133cb2de Improve testdefs: foreach_instance() function
The 'rhizomeprotocol' tests now use create_single_identity() in fixtures (which
tests the 'keyring list' command).

Use foreach_instance() function in various places, and replace functions that
used to loop over instances with functions that work on the current instance.
2012-09-14 16:09:28 +09:30
Andrew Bettison
e994626429 Refactor test definitions
Move create_rhizome_identities() from testdefs_rhizome.sh to
create_identities() in testdefs.sh

Rename create_identity() in testdefs.sh to create_single_identity(), uses
create_identities() to do its work.
2012-09-14 15:04:05 +09:30
Andrew Bettison
e534d93a84 Fix tests broken by execpath change
Commit 5cbc2167ec changed the servald 'start'
command to use a different argv[0], which meant that the testdefs.sh
get_servald_pids() function no longer detected running servald processes.
This broke most of the 'server' test cases.

testdefs.sh setup_servald() now makes a full copy of servald once per test
case, not just a symbolic link, so that the logic in get_servald_pids() works
again.
2012-08-21 13:35:33 +09:30
Andrew Bettison
32704bf0e9 Improve 'dnaprotocol' test script
Replace hard-coded identity names and DIDs with shell variables
2012-08-02 15:46:53 +09:30
Andrew Bettison
d63318cd2f Mop up executable rename from 'dna' to 'servald' 2012-07-30 16:15:42 +09:30
Andrew Bettison
6de247e576 Improve diagnosis of SEGV failures in tests 2012-07-24 15:39:36 +09:30
Jeremy Lakeman
be857316dc Move reachability test from starting instances to dna protocol tests 2012-07-18 19:35:47 +09:30
Jeremy Lakeman
fdc70d7512 Log when a peer becomes reachable or unreachable, edit tests to wait for this message 2012-07-17 18:22:39 +09:30
Andrew Bettison
218e7883ce Improve test scripts: use new 'wait_until' primitive 2012-07-11 16:51:29 +09:30
Andrew Bettison
572fa591e2 Refactor test utilities from 'rhizomeops' into testdefs_rhizome.sh 2012-07-06 13:32:21 +09:30
Andrew Bettison
ab64b08ceb Rewrite config file code
Gets rid of rotor in confValueGet() and duplicate config file parsing code
Currently fails three tests
2012-07-04 18:57:02 +09:30
Andrew Bettison
7eb4293491 Improve test framework: receive TFW_LOGDIR env var
Always place test logs in servald build root, regardless of current
working directory
2012-07-04 14:54:37 +09:30
Andrew Bettison
0cece65417 Refactor multi-instance server start code into test defs 2012-07-04 14:12:36 +09:30
Andrew Bettison
57b7625614 Improve test defs: minor bug fix 2012-07-03 17:38:54 +09:30
Andrew Bettison
9625190c6a Improve debug code:
Debug bit mask is unsigned int everywhere.
Refactor DEBUG() macros a bit.
Add SERVALD_DEBUG_FILE env var to support test scripts.
Test defs put instance directories under $TFWVAR not $TFWTMP.
2012-06-28 15:24:43 +09:30
Andrew Bettison
0928ade78a Fix test defs to cope with parallel execution 2012-06-27 17:23:13 +09:30
Andrew Bettison
d7828f9409 Improve test defs: stop_all_servald_servers
Only attempts an orderly stop if a pidfile is present
2012-06-26 16:44:34 +09:30
Andrew Bettison
f5a99238cb Add test case for server start while already running 2012-06-26 16:09:22 +09:30
Andrew Bettison
4afdbe1b5e Add server start/stop tests 2012-06-26 15:52:37 +09:30
Andrew Bettison
c041048958 Fix servald server test assertion messages 2012-06-22 17:32:42 +09:30
Andrew Bettison
de4a9a1318 Improve server tests: server log file assertions 2012-06-22 17:18:14 +09:30
Andrew Bettison
aedb31e451 Improve test definitions
Better instance handling primitives
Fix get_servald_pids() to work on Linux and Mac (allegedly!)
2012-06-22 15:56:28 +09:30
Andrew Bettison
6af6d5ee7e Fix testing kill_all_servald_processes() function
dnaprotcol tests now always PASS
2012-06-22 14:18:05 +09:30
Andrew Bettison
274e5c007c Merge branch 'master' into andrew
Conflicts:
	log.c
2012-06-22 11:18:48 +09:30
gardners
5e338f6285 make tests faster to run. 2012-06-21 16:36:37 +09:30
Andrew Bettison
50ed301ccc Fix failing tests from addition of rhizome list '_selfsigned' column 2012-06-12 11:48:15 +09:30
Andrew Bettison
637ef02f30 Add _selfsigned column to "rhizome list" output
Add <pin,pin...> arg1 to "rhizome list" command, so it can open the keyring

Some tests in tests/rhizome fail
2012-06-08 18:25:43 +09:30
Andrew Bettison
f5998b3862 Improve comments on test utility functions 2012-06-08 13:23:17 +09:30
Andrew Bettison
86c7819f97 Remove spurious ERROR messsages
Tests assert that stderr contains no ERROR: lines after a successful exit

Rewrote sqlite_exec_int64() to separate error outcomes from legitimate
result values

Changed several WHY() calls to DEBUG()

Improved test framework
2012-06-08 13:13:26 +09:30
Andrew Bettison
a9ad1b6afc Add <bsk> optional arg to "rhizome add file"
Improve regular expressions for common data types in test scripts

Revert column count field delimiter in "rhizome list" from ":" to "\n"

Add a few more test cases
2012-06-05 13:58:59 +09:30
Andrew Bettison
72640e830a First server start/stop test
On the way to multi-instance test scripts
2012-06-04 18:28:38 +09:30
Andrew Bettison
4d6c48a68f Overhaul test scripts: use "servald" instead of "dna" 2012-05-20 13:48:02 +09:30
Andrew Bettison
54b1642bf1 Add test for servald non-JNI output delimiter 2012-04-24 17:15:50 +09:30
Andrew Bettison
a496919e8a First real servald JNI command-line test works! 2012-04-24 17:07:20 +09:30
Andrew Bettison
1494172da6 Trival test of dna JNI command line entry point 2012-04-23 18:25:26 +09:30
Andrew Bettison
d53915d354 Fix test framework for Mac OS X 10.7 (bash-3.2.48) 2012-04-17 16:54:39 +09:30
Andrew Bettison
42b117f735 Add dna config operation tests 2012-04-12 18:33:43 +09:30
Andrew Bettison
ce5dc011b8 Split dna bit error tests into separate script
- Put common utility functions into testdefs.sh
 - Add abspath() and realpath() functions to test framework
 - Test framework now executes all tests with working directory in a temporary
   directory, to avoid pollution of caller's working directory
 - Improve test log verbosity
 - Name test log files by test script name
2012-04-10 12:41:15 +09:30