5
0
mirror of https://github.com/cwinfo/yggdrasil-go.git synced 2024-12-23 20:25:43 +00:00
yggdrasil-go/contrib/mobile/mobile_test.go

17 lines
422 B
Go
Raw Normal View History

package mobile
import "testing"
func TestStartYggdrasil(t *testing.T) {
ygg := &Yggdrasil{}
if err := ygg.StartAutoconfigure(); err != nil {
t.Fatalf("Failed to start Yggdrasil: %s", err)
}
t.Log("Address:", ygg.GetAddressString())
t.Log("Subnet:", ygg.GetSubnetString())
2023-05-14 09:16:33 +00:00
t.Log("Routing entries:", ygg.GetRoutingEntries())
if err := ygg.Stop(); err != nil {
t.Fatalf("Failed to stop Yggdrasil: %s", err)
}
}