Files
hanzoai_agent/control-plane/internal/services/execution_metrics_test.go
zeekay 2899aeaa9f feat: merge agents control plane + SDKs into unified agent repo
Consolidate all Hanzo agent infrastructure into one repo:
- control-plane/: Go control plane server (was agents-new)
- sdk/: Go, Python, TypeScript SDKs
- deployments/: Docker, Kubernetes, Helm configs
- Dockerfile.sdk: Python SDK image (ghcr.io/hanzoai/agent:latest)
- CI builds both SDK + control-plane images

No more agentfield — everything is hanzoai/agent.
2026-02-13 12:24:31 -08:00

29 lines
801 B
Go

package services
import (
"testing"
"github.com/prometheus/client_golang/prometheus/testutil"
"github.com/stretchr/testify/require"
)
func TestRecordQueueDepthClampsNegative(t *testing.T) {
recordQueueDepth(-10)
require.Equal(t, float64(0), testutil.ToFloat64(queueDepthGauge))
}
func TestRecordWaiterCountClampsNegative(t *testing.T) {
recordWaiterCount(-5)
require.Equal(t, float64(0), testutil.ToFloat64(waiterInflightGauge))
}
func TestNormalizeAgentLabel(t *testing.T) {
require.Equal(t, "worker", normalizeAgentLabel(" worker "))
require.Equal(t, "unknown", normalizeAgentLabel(""))
}
func TestRecordGatewayBackpressure(t *testing.T) {
RecordGatewayBackpressure("Queue_Full")
require.Equal(t, float64(1), testutil.ToFloat64(backpressureCounter.WithLabelValues("queue_full")))
}