cmd/k8s-operator: remove empty metrics_resources_test.go, use hyphens in test names to satisfy go vet

Signed-off-by: chaosinthecrd <tom@tmlabs.co.uk>
This commit is contained in:
chaosinthecrd 2026-04-14 14:50:03 +00:00
parent 78590cfcdb
commit 0f361b6d73
No known key found for this signature in database
GPG Key ID: 52ED56820AF046EE
2 changed files with 6 additions and 12 deletions

View File

@ -1,6 +0,0 @@
// Copyright (c) Tailscale Inc & contributors
// SPDX-License-Identifier: BSD-3-Clause
//go:build !plan9
package main

View File

@ -17,27 +17,27 @@ func TestTruncateLabelValue(t *testing.T) {
want string // empty means expect input unchanged
}{
{
name: "short value unchanged",
name: "short-value-unchanged",
input: "my-service",
},
{
name: "exactly 63 chars unchanged",
name: "exactly-63-chars-unchanged",
input: strings.Repeat("a", 63),
},
{
name: "64 chars gets truncated",
name: "64-chars-gets-truncated",
input: strings.Repeat("a", 64),
},
{
name: "very long value gets truncated",
name: "very-long-value-gets-truncated",
input: "tailscale-nginx-clickhouse-o11y-server-https-with-extra-long-suffix-that-exceeds-limit",
},
{
name: "253 chars (max k8s resource name)",
name: "253-chars-max-k8s-resource-name",
input: strings.Repeat("x", 253),
},
{
name: "empty string unchanged",
name: "empty-string-unchanged",
input: "",
},
}