Status filters for ipfs-cluster-ctl status
Added clients tests Fixes #445 License: MIT Signed-off-by: Kishan Mohanbhai Sagathiya <kishansagathiya@gmail.com>
This commit is contained in:
parent
f0321afd54
commit
02e129fbfe
|
@ -227,6 +227,32 @@ func TestStatusAll(t *testing.T) {
|
|||
if len(pins) == 0 {
|
||||
t.Error("there should be some pins")
|
||||
}
|
||||
|
||||
// With local true
|
||||
pins, err = c.StatusAll("", true)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
if len(pins) != 2 {
|
||||
t.Error("there should be two pins")
|
||||
}
|
||||
|
||||
// With filter option
|
||||
pins, err = c.StatusAll("pinning", false)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
if len(pins) != 1 {
|
||||
t.Error("there should be one pin")
|
||||
}
|
||||
|
||||
pins, err = c.StatusAll("pinned,error", false)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
if len(pins) != 2 {
|
||||
t.Error("there should be two pins")
|
||||
}
|
||||
}
|
||||
|
||||
testClients(t, api, testF)
|
||||
|
|
|
@ -623,7 +623,6 @@ tracker status type and/or it aliases ("error,pinning")
|
|||
On passing invalid filter value no status information will be shown
|
||||
List of tracker status types
|
||||
https://github.com/ipfs/ipfs-cluster/blob/319c41cbf195b0453b8d1987991280d3121bac93/api/types.go#L66
|
||||
|
||||
`,
|
||||
ArgsUsage: "[CID]",
|
||||
Flags: []cli.Flag{
|
||||
|
|
Loading…
Reference in New Issue
Block a user