yggdrasil-go/contrib/mobile/mobile_test.go
2023-05-14 10:16:33 +01:00

17 lines
422 B
Go

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())
t.Log("Routing entries:", ygg.GetRoutingEntries())
if err := ygg.Stop(); err != nil {
t.Fatalf("Failed to stop Yggdrasil: %s", err)
}
}