feat: 18 引擎驱动全家桶 + 驱动管理/离线包 + 设置中心 + 工作台交互打磨
驱动接入(全部本机真实例验收): - Elasticsearch 原生 SQL API、InfluxDB 原生 HTTP+Flux(官方 JDBC 付费许可,实测弃用) - ZooKeeper/MongoDB JVM agent(连接时自动下载官方驱动 jar,sha256 钉版本到 ~/.opsxdb/drivers/) - 达梦 JDBC agent 桥就绪(待厂商 jar+实例);TiDB 真实例验收 - 协议族代码审查放行 PolarDB/TDSQL/OceanBase/Kingbase/GaussDB/Oracle - 驱动能力模型:按驱动开关对象树分组/右键菜单/行编辑,NoSQL 树拍平(对象直挂库节点) 驱动管理: - 驱动管理弹框(状态/预装/离线包导入/JDK 检测)+ /api/drivers/* 三接口 - opsxdb-driver 驱动商店仓库(清单/fetch.sh/pack.sh 离线包/import.sh) - 连接时懒加载:DMG 零 Java 产物,首连自动下载(实测 ZK 九件套 1.35s),离线包自动回退 UI/交互: - 设置中心(⚙):常规/执行/结果/驱动/快捷键/关于,左导航+右面板(对标 opsxshell) - 实例级展开箭头(行首 SVG chevron,替代字体回退失真的 Unicode 三角) - 树内嵌套渲染修复:对象树挂在激活连接下;工具栏窄窗口不断行(按钮 nowrap+整颗换行) - 侧栏连接行精简(图标+连接名)、SQLite SSH 守卫、Oracle 死参数清理 质量: - Go 协议层/离线回退单测、E2E 门控测试(ES/ZK/Influx/Mongo/TiDB/JDBC 桥) - 驱动注册表单一事实来源 connection-types.json,README/BACKLOG/AGENTS 同步
This commit is contained in:
1 parent
26f459d1b8
commit
a9510235bb
156 files changed
+17200
-2520
No files matched your search
@@ -1,6 +1,7 @@
|
||||
package db
|
||||
|
||||
import (
|
||||
"context"
|
||||
"net"
|
||||
"strconv"
|
||||
"testing"
|
||||
@@ -28,7 +29,7 @@ func TestListGetDeleteRedisKeys(t *testing.T) {
|
||||
port, _ := strconv.Atoi(portStr)
|
||||
base := ConnReq{Driver: "redis", Host: host, Port: port, Database: "0"}
|
||||
|
||||
list := ListRedisKeys(base)
|
||||
list := ListRedisKeys(context.Background(), base)
|
||||
if list.Error != "" {
|
||||
t.Fatal(list.Error)
|
||||
}
|
||||
@@ -50,33 +51,36 @@ func TestListGetDeleteRedisKeys(t *testing.T) {
|
||||
t.Fatalf("unexpected ttl %d", byName["str:a"].TTL)
|
||||
}
|
||||
|
||||
gv := GetRedisKey(ConnReq{Driver: "redis", Host: host, Port: port, Database: "0", Key: "str:a"})
|
||||
gv := GetRedisKey(context.Background(), ConnReq{Driver: "redis", Host: host, Port: port, Database: "0", Key: "str:a"})
|
||||
if gv.Error != "" || gv.RowCount != 1 || gv.Rows[0]["value"] != "hello" {
|
||||
t.Fatalf("get string %#v", gv)
|
||||
}
|
||||
gh := GetRedisKey(ConnReq{Driver: "redis", Host: host, Port: port, Database: "0", Key: "hash:b"})
|
||||
gh := GetRedisKey(context.Background(), ConnReq{Driver: "redis", Host: host, Port: port, Database: "0", Key: "hash:b"})
|
||||
if gh.Error != "" || gh.RowCount < 1 || gh.Columns[0] != "field" {
|
||||
t.Fatalf("get hash %#v", gh)
|
||||
}
|
||||
gl := GetRedisKey(ConnReq{Driver: "redis", Host: host, Port: port, Database: "0", Key: "list:c"})
|
||||
if gh.Rows[0]["field"] != "f1" {
|
||||
t.Fatalf("hash fields should be sorted, got %#v", gh.Rows)
|
||||
}
|
||||
gl := GetRedisKey(context.Background(), ConnReq{Driver: "redis", Host: host, Port: port, Database: "0", Key: "list:c"})
|
||||
if gl.Error != "" || gl.RowCount < 2 {
|
||||
t.Fatalf("get list %#v", gl)
|
||||
}
|
||||
gs := GetRedisKey(ConnReq{Driver: "redis", Host: host, Port: port, Database: "0", Key: "set:d"})
|
||||
gs := GetRedisKey(context.Background(), ConnReq{Driver: "redis", Host: host, Port: port, Database: "0", Key: "set:d"})
|
||||
if gs.Error != "" || gs.RowCount < 2 {
|
||||
t.Fatalf("get set %#v", gs)
|
||||
}
|
||||
gz := GetRedisKey(ConnReq{Driver: "redis", Host: host, Port: port, Database: "0", Key: "zset:e"})
|
||||
gz := GetRedisKey(context.Background(), ConnReq{Driver: "redis", Host: host, Port: port, Database: "0", Key: "zset:e"})
|
||||
if gz.Error != "" || gz.RowCount != 1 {
|
||||
t.Fatalf("get zset %#v", gz)
|
||||
}
|
||||
|
||||
pat := ListRedisKeys(ConnReq{Driver: "redis", Host: host, Port: port, Database: "0", Pattern: "str:*"})
|
||||
pat := ListRedisKeys(context.Background(), ConnReq{Driver: "redis", Host: host, Port: port, Database: "0", Pattern: "str:*"})
|
||||
if pat.Error != "" || len(pat.Keys) != 1 || pat.Keys[0].Name != "str:a" {
|
||||
t.Fatalf("pattern %#v", pat)
|
||||
}
|
||||
|
||||
del := DeleteRedisKey(ConnReq{Driver: "redis", Host: host, Port: port, Database: "0", Key: "str:a"})
|
||||
del := DeleteRedisKey(context.Background(), ConnReq{Driver: "redis", Host: host, Port: port, Database: "0", Key: "str:a"})
|
||||
if del.Error != "" {
|
||||
t.Fatal(del.Error)
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user