github.com/supabase/cli@v1.168.1/internal/bans/update/update_test.go (about) 1 package update 2 3 import ( 4 "testing" 5 6 "github.com/stretchr/testify/assert" 7 ) 8 9 func TestPrivateSubnet(t *testing.T) { 10 err := validateIps([]string{"12.3.4.5", "10.0.0.0", "1.2.3.1"}) 11 assert.Nil(t, err) 12 } 13 14 func TestIpv4(t *testing.T) { 15 err := validateIps([]string{"12.3.4.5", "2001:db8:abcd:0012::0", "1.2.3.1"}) 16 assert.ErrorContains(t, err, "only IPv4 supported at the moment: 2001:db8:abcd:12::") 17 }