mirror of
https://github.com/fosrl/badger.git
synced 2026-10-20 19:49:09 +02:00
feat: rename main.go to badger.go to allign with traefik best practices and add test coverage
Signed-off-by: Marc Schäfer <git@marcschaeferger.de>
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
package ips
|
||||
|
||||
import (
|
||||
"net"
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestCFIPs(t *testing.T) {
|
||||
cidrs := CFIPs()
|
||||
if len(cidrs) == 0 {
|
||||
t.Fatal("CFIPs() returned an empty list")
|
||||
}
|
||||
for _, cidr := range cidrs {
|
||||
if _, _, err := net.ParseCIDR(cidr); err != nil {
|
||||
t.Errorf("CFIPs() returned invalid CIDR %q: %v", cidr, err)
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user