feat: OpsxDB 桌面数据库客户端首版入库
含工作台/连库多引擎字段与 SSH·SSL、结果编辑、Redis 键浏览、 Tauri 桌面与 docs/落地页;排除本地构建产物与 sidecar 二进制。
This commit is contained in:
commit
f8740d27f7
240 files changed
+21625
No files matched your search
@@ -0,0 +1,23 @@
|
||||
package proxy
|
||||
|
||||
import "testing"
|
||||
|
||||
func TestValidateURL(t *testing.T) {
|
||||
for _, tc := range []struct {
|
||||
raw string
|
||||
ok bool
|
||||
}{
|
||||
{"https://example.com/a", true},
|
||||
{"file:///etc/passwd", false},
|
||||
{"http://169.254.169.254/latest/meta-data", false},
|
||||
{"http://metadata.google.internal/computeMetadata/v1", false},
|
||||
} {
|
||||
_, err := ValidateURL(tc.raw)
|
||||
if tc.ok && err != nil {
|
||||
t.Fatalf("%s: %v", tc.raw, err)
|
||||
}
|
||||
if !tc.ok && err == nil {
|
||||
t.Fatalf("expected rejection: %s", tc.raw)
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user