-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest.sh
More file actions
56 lines (41 loc) · 1.64 KB
/
test.sh
File metadata and controls
56 lines (41 loc) · 1.64 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
cargo run -- --id 1 --addr 127.0.0.1 --port 21001
cargo run -- --id 2 --addr 127.0.0.1 --port 21002
cargo run -- --id 3 --addr 127.0.0.1 --port 21003
cargo run -- --id 4 --addr 127.0.0.1 --port 21004
curl -i -H "Content-Type: application/json" \
-d '[[1, "127.0.0.1:21001"], [2, "127.0.0.1:21002"], [3, "127.0.0.1:21003"], [4, "127.0.0.1:21004"]]' \
http://127.0.0.1:21001/mng/init
curl -i -H "Content-Type: application/json" \
-d '' \
http://127.0.0.1:21001/load-genesis
curl -i -H "Content-Type: application/json" \
-d '' \
http://127.0.0.1:21001/mng/init
curl -i -H "Content-Type: application/json" \
-d '[2, "127.0.0.1:21002"]' \
http://127.0.0.1:21001/mng/add-learner
curl -i -H "Content-Type: application/json" \
-d '[3, "127.0.0.1:21003"]' \
http://127.0.0.1:21001/mng/add-learner
curl -i -H "Content-Type: application/json" \
-d '[4, "127.0.0.1:21004"]' \
http://127.0.0.1:21001/mng/add-learner
curl -i -H "Content-Type: application/json" \
-d '[1, 2, 4]' \
http://127.0.0.1:21002/mng/change-membership
curl -i -H "Content-Type: application/json" \
-d '[[1, "127.0.0.1:21001"], [2, "127.0.0.1:21002"], [3, "127.0.0.1:21003"]]' \
http://127.0.0.1:21001/mng/init
curl -i -H "Content-Type: application/json" \
-d '' \
http://127.0.0.1:21003/mng/metrics
curl -i -H "Content-Type: application/json" \
-d '' \
http://127.0.0.1:21001/raft/snapshot
curl -i -H "Content-Type: application/json" \
-d '{
"hash": "f70a1248d-3455-4387777c-8d42-b4af200fca35",
"parents": [],
"data": {}
}' \
http://127.0.0.1:21002/add