diff options
| author | chaosinthecrd <tom@tmlabs.co.uk> | 2026-04-14 14:50:03 +0000 |
|---|---|---|
| committer | chaosinthecrd <tom@tmlabs.co.uk> | 2026-04-14 17:35:50 +0100 |
| commit | 0f361b6d73867e5d38b823dcae0ef7b04c453311 (patch) | |
| tree | 449949c129d601ed42c63e7fa325a7c51af5b27b | |
| parent | 78590cfcdbbca3f82db7de08dd66b5cd6939e204 (diff) | |
| download | tailscale-fix/operator-truncate-long-labels.tar.xz tailscale-fix/operator-truncate-long-labels.zip | |
cmd/k8s-operator: remove empty metrics_resources_test.go, use hyphens in test names to satisfy go vetfix/operator-truncate-long-labels
Signed-off-by: chaosinthecrd <tom@tmlabs.co.uk>
| -rw-r--r-- | cmd/k8s-operator/metrics_resources_test.go | 6 | ||||
| -rw-r--r-- | k8s-operator/utils_test.go | 12 |
2 files changed, 6 insertions, 12 deletions
diff --git a/cmd/k8s-operator/metrics_resources_test.go b/cmd/k8s-operator/metrics_resources_test.go deleted file mode 100644 index f3fb3d176..000000000 --- a/cmd/k8s-operator/metrics_resources_test.go +++ /dev/null @@ -1,6 +0,0 @@ -// Copyright (c) Tailscale Inc & contributors -// SPDX-License-Identifier: BSD-3-Clause - -//go:build !plan9 - -package main diff --git a/k8s-operator/utils_test.go b/k8s-operator/utils_test.go index 3c4624c95..7a30df6b4 100644 --- a/k8s-operator/utils_test.go +++ b/k8s-operator/utils_test.go @@ -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: "", }, } |
