aboutsummaryrefslogtreecommitdiff
path: root/internal/netutil/netutil_test.go
diff options
context:
space:
mode:
authorJoe Chen <jc@unknwon.io>2022-07-25 21:38:15 +0800
committerGitHub <noreply@github.com>2022-07-25 21:38:15 +0800
commitdb82024fc72c223a2e21410a0a28b55e22491f32 (patch)
tree2e3b72a9e210b6b5a4cb987a8411bbad2a4c23be /internal/netutil/netutil_test.go
parent780b33c63961b29b62986b3d4101770f3994b97b (diff)
netutil: allow using `*` to match any hostname (#7111)
Diffstat (limited to 'internal/netutil/netutil_test.go')
-rw-r--r--internal/netutil/netutil_test.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/internal/netutil/netutil_test.go b/internal/netutil/netutil_test.go
index 9bd9c982..08b4dc50 100644
--- a/internal/netutil/netutil_test.go
+++ b/internal/netutil/netutil_test.go
@@ -31,6 +31,8 @@ func TestIsLocalHostname(t *testing.T) {
{hostname: "192.168.123.45", allowlist: []string{"10.0.0.17"}, want: true}, // #11
{hostname: "gogs.local", allowlist: []string{"gogs.local"}, want: false}, // #12
+
+ {hostname: "192.168.123.45", allowlist: []string{"*"}, want: false}, // #13
}
for _, test := range tests {
t.Run("", func(t *testing.T) {