mirror of
https://github.com/langgenius/dify-plugin-daemon.git
synced 2026-07-23 10:15:22 -04:00
20 lines
286 B
Go
20 lines
286 B
Go
package network
|
|
|
|
import (
|
|
"net"
|
|
"testing"
|
|
)
|
|
|
|
func TestIsAllIpsAvailableIPv4(t *testing.T) {
|
|
ips, err := FetchCurrentIps()
|
|
if err != nil {
|
|
t.Error(err)
|
|
}
|
|
|
|
for _, ip := range ips {
|
|
if net.ParseIP(ip.String()).To4() == nil {
|
|
t.Errorf("invalid ipv4: %s", ip.String())
|
|
}
|
|
}
|
|
}
|