Files
zeekay 087e487107 feat: rebrand signoz-otel-collector → Hanzo OTEL Collector
- Go module: github.com/SigNoz/signoz-otel-collector → github.com/hanzoai/otel-collector
- All signoz-prefixed packages → o11y-prefixed
- Docker: signoz/* → ghcr.io/hanzoai/otel-collector
- ClickHouse exporter → Hanzo Datastore
- Env vars: SIGNOZ_* → HANZO_*
- Directory renames for all processor/receiver/exporter packages
2026-03-12 00:21:24 -07:00

41 lines
771 B
Go

package schemamigrator
import (
"testing"
)
func TestTableEngine(t *testing.T) {
testCases := []struct {
name string
op TableEngine
wantSQL string
}{
{
name: "create table",
op: ReplacingMergeTree{
MergeTree{
OrderBy: "(timestamp, resource_id)",
},
},
wantSQL: "ReplacingMergeTree ORDER BY (timestamp, resource_id)",
},
{
name: "create table with distributed engine",
op: Distributed{
Database: "default",
Table: "logs",
Cluster: "cluster",
ShardingKey: "rand()",
},
wantSQL: "Distributed('cluster', default, logs, rand())",
},
}
for _, tc := range testCases {
gotSQL := tc.op.ToSQL()
if gotSQL != tc.wantSQL {
t.Errorf("got %s, want %s", gotSQL, tc.wantSQL)
}
}
}