Commit Graph

8 Commits

Author SHA1 Message Date
Wyatt Daviau
a99b403273 Sharness hardening:
Better error messages in test-lib init functions and ipfshttp
Cleanup functions are now called after every test file

License: MIT
Signed-off-by: Wyatt Daviau <wdaviau@cs.stanford.edu>
2018-01-09 14:17:21 -05:00
Wyatt
ad492d20ae fix #254, execution locking:
ipfs-cluster-service now locks before running the daemon and state
upgrade commands.  Locking mechanism heavily inspired by ipfs, see
go-ipfs fsrepo.  Unlock called on exit to free up repo.  one lockfile
per repo. A very simple sharness test checks that two service
invocations cannot occur.

A longstanding sharness/ci logging issue is addressed by exporting
verbose=t into the travis environment.  Now output of commands from
within sharness test strings are displayed during travis runs.

License: MIT
Signed-off-by: Wyatt Daviau <wdaviau@cs.stanford.edu>
2017-12-06 11:14:53 -05:00
Wyatt
47b744f1c0 ipfs-cluster-service state upgrade cli command
ipfs-cluster-service now has a migration subcommand that upgrades
    persistant state snapshots with an out-of-date format version to the
    newest version of raft state. If all cluster members shutdown with
    consistent state, upgrade ipfs-cluster, and run the state upgrade command,
    the new version of cluster will be compatible with persistent storage.
    ipfs-cluster now validates its persistent state upon loading it and exits
    with a clear error in the case the state format version is not up to date.

    Raft snapshotting is enforced on all shutdowns and the json backup is no
    longer run.  This commit makes use of recent changes to libp2p-raft
    allowing raft states to implement their own marshaling strategies. Now
    mapstate handles the logic for its (de)serialization.  In the interest of
    supporting various potential upgrade formats the state serialization
    begins with a varint (right now one byte) describing the version.

    Some go tests are modified and a go test is added to cover new ipfs-cluster
    raft snapshot reading functions.  Sharness tests are added to cover the
    state upgrade command.
2017-11-28 22:35:48 -05:00
Wyatt
534da6c923 Moving exec call to sh as bash is deprecated in go-ipfs 2017-10-11 15:51:17 -04:00
Hector Sanjuan
4ea1777050 Fix sharness tests
Use docker to run ipfs
Improve intialization of daemons
Fix a bunch of tests
Improve run script
Make sure everything is shell-compatible (remove bash syntax)
Fit to run in travis
2017-07-21 11:24:17 +02:00
Wyatt
633c97961c Fixing whitespace and minor Make issues 2017-05-05 10:02:07 -07:00
Wyatt
8286cd0ae2 Address 2nd round of comments 2017-05-05 10:00:17 -07:00
Wyatt
f547077700 Sharness Tests updated
I have attempted to address all of the comments on the original PR.
The sharness tests now make use of prereqs, see test-lib for details
and helper functions.
2017-05-05 09:09:48 -07:00