feat: add remote config and host metadata
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
package hostmeta
|
||||
|
||||
import "testing"
|
||||
|
||||
func TestHostnameNonEmpty(t *testing.T) {
|
||||
h, err := Hostname()
|
||||
if err != nil || h == "" {
|
||||
t.Fatalf("hostname: %q err=%v", h, err)
|
||||
}
|
||||
}
|
||||
|
||||
func TestIPsSkipsLoopback(t *testing.T) {
|
||||
ips := IPs()
|
||||
for _, ip := range ips {
|
||||
if ip == "127.0.0.1" || ip == "::1" {
|
||||
t.Fatalf("loopback in ips: %v", ips)
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user