mirror of
https://github.com/go-i2p/go-i2pcontrol.git
synced 2025-07-01 20:19:59 -04:00
add stats tests
This commit is contained in:
57
stats_test.go
Normal file
57
stats_test.go
Normal file
@ -0,0 +1,57 @@
|
||||
package i2pcontrol
|
||||
|
||||
import (
|
||||
//"log"
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestStats(t *testing.T) {
|
||||
Initialize("localhost", "7657", "jsonrpc")
|
||||
result, err := Authenticate("itoopie")
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
t.Log("Connected to API version 1:", result)
|
||||
t.Log("Token for this testing session:", token)
|
||||
sbps, err := SendBps()
|
||||
if err != nil {
|
||||
t.Log(err)
|
||||
}
|
||||
t.Log("Sent BPS:", sbps)
|
||||
rbps, err := ReceiveBps()
|
||||
if err != nil {
|
||||
t.Log(err)
|
||||
}
|
||||
t.Log("Received BPS:", rbps)
|
||||
exp, err := ExploratoryBuildExpire()
|
||||
if err != nil {
|
||||
t.Log(err)
|
||||
}
|
||||
t.Log("Exploratory Build Expire:", exp)
|
||||
rej, err := ExploratoryBuildReject()
|
||||
if err != nil {
|
||||
t.Log(err)
|
||||
}
|
||||
t.Log("Exploratory Build Reject:", rej)
|
||||
succ, err := ExploratoryBuildSuccess()
|
||||
if err != nil {
|
||||
t.Log(err)
|
||||
}
|
||||
t.Log("Exploratory Build Success:", succ)
|
||||
expp, err := ExploratoryBuildExpirePercentage()
|
||||
if err != nil {
|
||||
t.Log(err)
|
||||
}
|
||||
t.Log("Exploratory Build Expire Percent:", expp)
|
||||
rejp, err := ExploratoryBuildRejectPercentage()
|
||||
if err != nil {
|
||||
t.Log(err)
|
||||
}
|
||||
t.Log("Exploratory Build Reject Percent:", rejp)
|
||||
succp, err := ExploratoryBuildSuccessPercentage()
|
||||
if err != nil {
|
||||
t.Log(err)
|
||||
}
|
||||
t.Log("Exploratory Build Success Percent:", succp)
|
||||
|
||||
}
|
Reference in New Issue
Block a user