Commit Graph

20 Commits

Author SHA1 Message Date
Hector Sanjuan
eee53bfa4f Streaming Peers(): make Peers() a streaming call
This commit makes all the changes to make Peers() a streaming call.

While Peers is usually a non problematic call, for consistency, all calls
returning collections assembled through broadcast to cluster peers are now
streaming calls.
2022-03-23 01:27:57 +01:00
Kishan Sagathiya
5258a4d428 Remove map pintracker (#944)
This removes mappintracker and sets stateless tracker as the default (and only) pintracker component.

Because the stateless tracker matches the cluster state with only ongoing operations being kept on memory, and additional information provided by ipfs-pin-ls, syncing operations are not necessary. Therefore the Sync/SyncAll operations are removed cluster-wide.
2019-12-12 21:22:54 +01:00
Kishan Mohanbhai Sagathiya
3ad66bd59c Fix sharness 2019-09-08 17:11:32 +07:00
Kishan Mohanbhai Sagathiya
fc678242fb Added tests for /monitor/metrics/{metrics_type}
Move ctl-health sharness tests to apprpriate file

Since the API is using the RPC mock to request metrics and it always
returns a mocked test metric we might just do c.Metrics("somemetricstype")
and check that there is no error. Here we just want to check that the
client is hitting an API endpoint (and understands the response).

Fixes #587

License: MIT
Signed-off-by: Kishan Mohanbhai Sagathiya <kishansagathiya@gmail.com>
2018-12-21 08:24:40 +05:30
Kishan Sagathiya
6049b216bb Sharness tests for ipfs-cluster-ctl health metrics
Added sharness tests for `ipfs-cluster-ctl health metrics <metricname>`

Fixes #587

License: MIT
Signed-off-by: Kishan Mohanbhai Sagathiya <kishansagathiya@gmail.com>
2018-12-21 08:24:40 +05:30
Wyatt Daviau
d2ef32f48f Testing and polishing connection graph
Added go tests
Refactored cluster connect graph to new file
Refactored dot file printing to new repo
Fixed code climate issues
Added sharness test

License: MIT
Signed-off-by: Wyatt Daviau <wdaviau@cs.stanford.edu>
2018-01-22 10:03:37 -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
Hector Sanjuan
fcb6a98d03 More test fixing
License: MIT
Signed-off-by: Hector Sanjuan <hector@protocol.ai>
2017-08-01 14:25:20 +02:00
Hector Sanjuan
dac6fcd18d Fix tests
License: MIT
Signed-off-by: Hector Sanjuan <hector@protocol.ai>
2017-08-01 13:50:32 +02: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
6f4c139cf9 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:59:23 -07:00
Wyatt
eac6c08a22 Sharness tests and library precondition setting fns updated 2017-05-05 09:59:22 -07:00
Wyatt
4a231b746f ctl basic cleanup 2017-05-05 09:59:22 -07:00
Wyatt
568b69b721 GPL compatability, fully automatic sharness build and clean 2017-05-05 09:59:22 -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
Wyatt
916b7e8849 Sharness tests and library precondition setting fns updated 2017-05-05 09:09:48 -07:00
Wyatt
148b08ffb8 ctl basic cleanup 2017-05-05 09:09:48 -07:00
Wyatt
1a966aee53 GPL compatability, fully automatic sharness build and clean 2017-05-05 09:09:47 -07:00