Andrew Bettison
c3fdb12991
Fix assert_stdout_add_file() Rhizome test function
...
Correct 'author' and 'secret' fieldnames to '.author' and
'.secret'
2014-11-14 13:11:43 +10:30
Andrew Bettison
1cbc2a365b
Improve Rhizome AddUpdateSameVersion test
...
If 'rhizome add file' command does not return status 1,
then cat the standard error (log) to the test log
2014-11-14 13:11:43 +10:30
Andrew Bettison
a4be1b0b0c
Fix RESTful MeshMS newsince ACK logic
...
/restful/meshms/newsince/SID1/SID2/newsince/TOKEN/messagelist.json now
always lists an ACK as soon as it is received, instead of waiting for a
message to arrive as well.
2014-11-12 23:09:00 +10:30
Andrew Bettison
3c4703feb4
Reduce DB locking issues in RESTful tests
...
Add environment variable SERVALD_RHIZOME_DB_RETRY_LIMIT to extend the
Rhizome DB retry period, set it to 60 seconds in RESTful tests to
override the default 5 seconds
2014-11-12 23:08:19 +10:30
Jeremy Lakeman
6ab2cc5bb6
Only support one keyring pin per open file
2014-10-31 15:30:07 +10:30
Jeremy Lakeman
851144ea0a
Refactor keyring identity iteration
2014-10-31 15:19:59 +10:30
Tobias Wooldridge
e79e74feb9
Exposes a list of configured identities through the REST API at /keyring/identities.json
2014-10-31 15:19:59 +10:30
Jeremy Lakeman
1848493468
New messages bump the conversation to the top
2014-10-27 11:08:02 +10:30
Jeremy Lakeman
91d3f78f8e
Revert slack ping delivery in routing tests
2014-10-01 15:53:18 +09:30
Jeremy Lakeman
c7e397cadf
Trace network paths that are supposed to exist
2014-09-23 14:54:22 +09:30
Jeremy Lakeman
2ec63b371a
Build the array of console commands by using linkage tricks
2014-08-22 10:36:52 +09:30
Jeremy Lakeman
31cf3a67b5
Allow lcal http servers to perform cross site scripting of restful APIs
2014-07-28 12:54:57 +09:30
Jeremy Lakeman
435ffecfa8
Add message timestamps to restful meshms
2014-07-18 14:11:57 +09:30
Jeremy Lakeman
69ffe6a56c
Fix meshmsjava tests with additional timestamps
2014-07-14 16:21:12 +09:30
Jeremy Lakeman
bc87f8c7c0
Add timestamps to meshms messages and acks
2014-07-14 13:43:37 +09:30
Andrew Bettison
89623015fc
MeshMS Java API: list messages new since token
2014-07-14 06:06:21 +09:30
Andrew Bettison
4c6612a61e
Rhizome Java API: list bundles new since token
2014-07-12 22:49:00 +09:30
Andrew Bettison
2757a08b87
Rhizome Java API: insert inconsistent bundle
2014-07-11 11:15:08 +09:30
Andrew Bettison
8842f32b19
Rhizome Java API: insert journal is not implemented
...
Change the HTTP response code for unimplemented operations from 403 to
501
2014-07-10 22:23:11 +09:30
Andrew Bettison
e35bf77938
Rhizome Java API: insert/update empty bundle
2014-07-10 22:06:46 +09:30
Andrew Bettison
a87133d4d3
Rhizome Java API: insert anonymous bundle
2014-07-10 21:19:15 +09:30
Andrew Bettison
04b2a20e54
Rhizome Java API: improved form-data headers
...
Change manifest Content-Type from rhizome-manifest/text to
rhizome/manifest; format="text+binarysig"
Add "Content-Transfer-Encoding" form-part headers to Java API
sent form parts, although not currently checked by Rhizome
RESTful interface
2014-07-10 21:12:40 +09:30
Andrew Bettison
a81d05b4f6
Rhizome Java API: insert bundle
2014-07-10 06:43:17 +09:30
Andrew Bettison
3715c5bf0b
Rhizome Java API: negative fetch tests
2014-07-10 06:30:50 +09:30
Andrew Bettison
2aec8f31a4
Rhizome Java API: get decrypted payload
2014-07-10 06:30:50 +09:30
Andrew Bettison
d16be8f42d
Improve MeshMS HTTP RESTful interface
...
Provide "meshms_status_message" in returned JSON status content
2014-07-10 06:30:50 +09:30
Andrew Bettison
cf43635789
Improve Rhizome HTTP RESTful interface
...
Add RHIZOME_BUNDLE_STATUS_READONLY enum value
Tighten up switch statements on bundle and payload status enums (no
default labels)
Rename some recently added enum entries
Return bundle status and payload status in HTTP responses
Add test for failing to decrypt a foreign encrypted bundle payload,
fix bug that caused an assertion failure
Add tests for fetching a non-existent manifest and fetching bundles
whose payload blob is not in the store
2014-07-10 06:29:51 +09:30
Andrew Bettison
34b6ff48bf
Rhizome Java API: get raw payload
...
Added more "Serval-Rhizome-Bundle-xxx" headers to /restful/rhizome/
responses, so that a more complete manifest can be constructed from
them
2014-07-10 06:29:09 +09:30
Andrew Bettison
93e67ede63
Rhizome Java API: get manifest
...
Fixes assertion violation in GET /restful/rhizome/<BID>.rhm when <BID>
not found
2014-07-10 06:29:09 +09:30
Andrew Bettison
db8ee79a4e
Rhizome Java API: list bundles
2014-07-10 06:29:09 +09:30
Andrew Bettison
a9ec5dcf69
Refactor Rhizome test script ready for re-use
...
Move add_bundles() function from 'rhizomerestful' test script into
testdefs_rhizome.sh, rename to rhizome_add_bundles() and add a new
SID argument
2014-06-30 11:11:01 +09:30
Andrew Bettison
067340bbba
Change HTTP Authorization realm to "Serval RESTful API"
...
Was "Serval Rhizome", which is not accurate
2014-06-30 11:11:01 +09:30
Andrew Bettison
11e9d38299
Rename config 'rhizome.api.restful' to 'api.restful'
2014-06-30 11:11:01 +09:30
Jeremy Lakeman
63f02607e6
Fix duplicate payload detection over unicast links
2014-06-26 17:20:06 +09:30
Andrew Bettison
776d4de894
Split up 'rhizomehttp' test script
...
New scripts 'rhizomerestful' and 'meshmsrestful'
New testdefs_json.sh
Improved testdefs.sh functions for discovering HTTP server port
2014-06-26 15:08:48 +09:30
Andrew Bettison
660daf0438
Merge latest MeshMS Java API additions into 'development'
2014-06-24 15:10:16 +09:30
Andrew Bettison
c79a382a27
MeshMS Java API: mark messages as read
2014-06-24 12:12:48 +09:30
Andrew Bettison
7736a4ceb1
New HTTP RESTful requests: MeshMS read message(s)
2014-06-24 12:11:58 +09:30
Jeremy Lakeman
9f6ace518a
Test that msp listen --service_name shuts down
2014-06-23 14:23:30 +09:30
Jeremy Lakeman
ca8f651b8d
Cleanup the rhizome database every 30 minutes or so
2014-06-23 13:49:58 +09:30
Andrew Bettison
eba7f6555f
MeshMS Java API: send message
2014-06-23 13:20:57 +09:30
Jeremy Lakeman
2ef73884a1
Add configurable limit to ensure a minimum amount of free space is preserved
...
- default to 100MB of free space
- currently disabled on android due to missing sys/statvfs.h
2014-06-23 13:06:21 +09:30
Andrew Bettison
819b8dc9e7
MeshMS RESTful API stricter on incoming form data
...
/restful/meshms/SID/SID/sendmessage now enforces Content-Disposition:
form-data (was ignoring), and enforces Content-Type: text/plain;
charset=utf-8 (was ignoring)
New negative test cases to ensure that these are treated strictly
2014-06-23 12:27:09 +09:30
Jeremy Lakeman
68dbaef38d
Refactor Java API
...
Add stateful class to represent the state of the serval daemon, shifting some functions from BatPhone
Add convenience functions to get pre-configured MDP and HTTP Restful client classes
2014-06-20 10:55:09 +09:30
Andrew Bettison
f948f8e12e
Include Java tests in 'tests/all' if Java compiler available
2014-06-19 11:38:39 +09:30
Andrew Bettison
b14c58bdf6
Merge NAF4 MeshMS Java API into development
...
Currently implements "list conversations" and "list messages"
2014-06-19 11:21:37 +09:30
Jeremy Lakeman
7ff89afcf4
Reinstate rhizome database storage limit
...
- old / large payloads should be evicted to fit more payloads
- if there isn't enough space, new payloads will not be added
2014-06-19 11:09:09 +09:30
Andrew Bettison
e9437e9a61
MeshMS Java API: list messages
2014-06-19 10:37:33 +09:30
Andrew Bettison
9cbd7c365c
MeshMS Java API: list conversations
2014-06-19 09:55:12 +09:30
Andrew Bettison
f2772b0ce8
Refactor tests: testdefs_java.sh, testdefs_meshms.sh
...
meshms_add_messages() now puts message texts into TEXT[$n] array
instead of "text$n" files
2014-06-19 09:54:29 +09:30
Jeremy Lakeman
f4e6841ed7
Ensure directory service tests aren't creating a global routing table
2014-06-16 17:22:46 +09:30
Jeremy Lakeman
80e139c2d9
Ensure orphan payloads or manifests are cleaned up
2014-06-16 15:56:31 +09:30
Jeremy Lakeman
ee37385ec7
Recalculate routing table after last neighbours is lost, or interface is down
2014-06-12 17:15:29 +09:30
Jeremy Lakeman
52da7778cd
Allow closing a monitor connection to force the server to quit
2014-06-11 20:39:26 +09:30
Andrew Bettison
11dcc3e972
Fix minor bugs in server start/kill tests
2014-06-11 11:15:28 +09:30
Jeremy Lakeman
afd31fe12c
Ensure a race condition while starting servald only starts one process
2014-06-11 09:01:56 +09:30
Jeremy Lakeman
0b0e4cc8b4
Delay rhizome open database using an alarm, close on config change
2014-06-11 09:01:55 +09:30
Jeremy Lakeman
f09e6c38d2
Test that server quits after deleting pid file
2014-06-05 14:55:50 +09:30
Jeremy Lakeman
6d4ad0e150
Rework scheduler to allow for lazy but important alarms
2014-06-04 17:13:08 +09:30
Jeremy Lakeman
2a572d19bf
Rework rhizome store to write content more lazily and cleanup more carefully
2014-06-04 17:13:08 +09:30
Jeremy Lakeman
77be2c7ef3
Fix mdp trace assert
2014-06-04 17:13:08 +09:30
Jeremy Lakeman
b6de3fcd34
Only send rhizome sync packets when we have neighbours
2014-05-30 15:03:22 +09:30
Jeremy Lakeman
0c294079af
Improve reliability of routing tests
2014-05-30 14:56:31 +09:30
Andrew Bettison
33c61d64b9
Fix a faulty MSP test
2014-05-26 16:15:52 +09:30
Andrew Bettison
757e6c62ab
Merge network simulator into development
2014-05-26 15:52:40 +09:30
Jeremy Lakeman
9f23b9bdcd
Fix remove obsolete debug flags from test scripts
2014-05-26 14:16:35 +09:30
Jeremy Lakeman
3373d64079
Routing tests shouldn't care about prefer_unicast default value
2014-05-26 13:57:27 +09:30
Jeremy Lakeman
06f7eed260
Add msp test over unreliable link
2014-05-23 10:47:22 +09:30
Jeremy Lakeman
4dd2d2991e
Use simulator for existing msp tests
2014-05-23 10:47:22 +09:30
Jeremy Lakeman
7420f46653
Create new AF_UNIX based network simulator
2014-05-23 10:47:22 +09:30
Jeremy Lakeman
c0c5412931
Add support for STOPping a connection before shutdown
2014-05-21 17:17:07 +09:30
Jeremy Lakeman
ca9faeef9b
Remove respawn_on_crash behaviour, we aren't using or testing it
2014-05-12 13:44:51 +09:30
Jeremy Lakeman
672104bdd8
Create extensible service discovery protocol, with initial basic implementation
2014-05-09 11:21:18 +09:30
Jeremy Lakeman
4204973052
Allow for more duplicates in 2hop test
2014-05-09 11:21:16 +09:30
Andrew Bettison
df1814309b
Improve MDP filter rules file syntax
2014-05-05 14:45:33 +09:30
Jeremy Lakeman
8ddd256b5c
Add more asserts for ping stats, with some slack
2014-05-05 14:35:31 +09:30
Jeremy Lakeman
ab915a13fc
Use routing table to check if a node is unreachable
2014-05-05 13:22:36 +09:30
Andrew Bettison
206aa936c0
Refactor 'vomp' test fifo handling
...
Use new execute --stdout-file=PATH test framework feature
Remove unnecessary shell variable indirection
2014-04-30 17:21:58 +09:30
Andrew Bettison
5035abde34
Improve test framework: assert_fork_is_running
...
Also assert_fork_is_not_running
Added 'framework' test case for fork primitives
2014-04-30 11:10:20 +09:30
Andrew Bettison
525aee88c5
Fix test framework bug: needed shopt -s extglob
2014-04-30 11:08:53 +09:30
Andrew Bettison
ea9de737a2
MDP packet filter rules configuration
...
Configurable rules file path: mdp.filter_rules_path
Add filter rules parsing code, add filtering to outgoing as well as
incoming packets
New test script: tests/mdp with two test cases
Improve test defs: new execute_servald() function
Widen MDP port number format from 8 to ten chars to accommodate leading
"0x"
2014-04-29 15:31:50 +09:30
Andrew Bettison
684735b11c
Fix config file timestamp bug
...
Ensure that timestamp always advances by at least one second every time
the config file is modified, add test case
Refactor test defs: detecting started HTTPD is not specific to Rhizome
Refactor struct file_meta and associated functions into "io.h" and io.c
Add various strbuf helper functions for formatting struct timespec
and struct file_meta to assist debug logging
2014-04-29 15:04:20 +09:30
Andrew Bettison
459c5a2303
Improve "mdp ping" command
...
Packet stats now exclude duplicate pong replies
With <count> arg, exits immediately once a pong has been received for
every ping, unless new --wait-for-duplicates option given
Routing tests for unreliable links now assert all pongs received and
very few duplicates
2014-04-17 16:09:34 +09:30
Andrew Bettison
8bc746af25
New "config sync" command
2014-04-16 19:28:16 +09:30
Andrew Bettison
2716228074
Add server watchdog and config reload test
2014-04-16 18:06:27 +09:30
Jeremy Lakeman
c6e461bcb0
Attempt to create folders for binding AF_UNIX sockets
2014-04-11 17:00:47 +09:30
Jeremy Lakeman
14be44d211
Enhance console command to allow multiple concurrent calls
2014-04-10 13:46:07 +09:30
Jeremy Lakeman
23cb4600e2
Improve VOMP testing
2014-04-10 11:14:46 +09:30
Andrew Bettison
6371203703
Finish removing SLIP code and test case
...
More simplification of "serval.h"
2014-04-07 16:22:31 +09:30
Andrew Bettison
53c1b1c04c
Filesystem Heirarchy Standard (FHS) paths
...
If no instance directory specified, then use paths like
/etc/serval/serval.conf
/var/cache/serval
/var/log/serval
/var/run/serval
etc. for files, instead of all in a single directory.
Log all directory creation as INFO messages.
Interpretation of log.file.directory_path has changed slightly.
Updated servald configuration tech doc.
2014-03-26 15:35:43 +10:30
Andrew Bettison
53d5a8734b
Fix Rhizome cleanup to remove temporary payloads
...
Fix test case to properly assert that all stale payloads are
deleted
2014-03-18 16:03:26 +10:30
Andrew Bettison
dc588e964d
Fix "name=/file" bug in Rhizome add
...
Improved Rhizome test scripts and added new assert_manifest_fields()
function to Rhizome test defs
2014-03-12 15:48:00 +10:30
Jeremy Lakeman
a6d6175576
Add config set warning if attempting to drop packets on datagram sockets
2014-03-12 14:55:46 +10:30
Jeremy Lakeman
2e4835d7d6
Ensure tests with packet filtering are using the dummy network interface
2014-03-12 14:32:59 +10:30
Jeremy Lakeman
ee68856878
Reduce log spam from debug.rhizome
2014-03-12 14:32:59 +10:30
Andrew Bettison
0bef066949
Store Rhizome external blob files in "blob" subdirectory
...
This will make issue #50 a bit easier to tackle
2014-03-07 16:55:38 +10:30
Jeremy Lakeman
6b17cd580f
Enable rhizome HTTP transfers over loopback while using local sockets
2014-03-05 09:55:23 -08:00
Andrew Bettison
fd1b36a9da
Refactor new MissingPayload test case
...
Move more code into fixture, add TODO comment
2014-03-03 15:14:34 +10:30
Andrew Bettison
19aed8ecb5
Fix test defs: pop_instance did not restore instance
...
Add push_and_set_instance() function
Remove redundant set_instance calls in test cases
Cope if error() returns (can happen during teardown)
2014-03-03 15:14:34 +10:30
Andrew Bettison
08e02b18db
Improve test framework: tfw_run() function
2014-03-03 15:14:34 +10:30