2018-11-09 21:33:35 +00:00
|
|
|
package connectivity
|
|
|
|
|
2018-11-22 06:15:35 +00:00
|
|
|
import (
|
|
|
|
"fmt"
|
|
|
|
"testing"
|
|
|
|
"time"
|
|
|
|
)
|
2018-11-09 21:33:35 +00:00
|
|
|
|
|
|
|
func TestTorProvider(t *testing.T) {
|
2018-11-22 06:15:35 +00:00
|
|
|
acn, err := StartTor(".", "")
|
2018-11-09 21:33:35 +00:00
|
|
|
if err != nil {
|
|
|
|
t.Error(err)
|
|
|
|
}
|
|
|
|
|
2018-11-22 06:15:35 +00:00
|
|
|
progress := 0
|
|
|
|
status := ""
|
|
|
|
for progress < 100 {
|
|
|
|
progress, status = acn.GetBootstrapStatus()
|
|
|
|
fmt.Printf("%v %v\n", progress, status)
|
|
|
|
time.Sleep(100)
|
|
|
|
}
|
|
|
|
|
|
|
|
acn.Close()
|
2018-11-09 21:33:35 +00:00
|
|
|
}
|