Files
capsule/pkg/api/scope_test.go
T
Oliver BählerandGitHub c17e4fa812 feat: add leader-election tuning (#2008)
* feat: add leader-election tuning

Signed-off-by: Oliver Baehler <oliver@sudo-i.net>

* feat: add leader-election tuning

Signed-off-by: Oliver Baehler <oliver@sudo-i.net>

* feat: add tracing for admission

Signed-off-by: Oliver Baehler <oliver@sudo-i.net>

* feat: add tracing for admission

Signed-off-by: Oliver Baehler <oliver@sudo-i.net>

* add tenant

---------

Signed-off-by: Oliver Baehler <oliver@sudo-i.net>
2026-07-08 11:44:43 +02:00

29 lines
652 B
Go

// Copyright 2020-2026 Project Capsule Authors
// SPDX-License-Identifier: Apache-2.0
package api_test
import (
"testing"
"github.com/projectcapsule/capsule/pkg/api"
)
func TestResourceScopeString(t *testing.T) {
t.Parallel()
for _, tt := range []struct {
scope api.ResourceScope
want string
}{
{scope: api.ResourceScopeNamespace, want: "Namespace"},
{scope: api.ResourceScopeTenant, want: "Tenant"},
{scope: api.ResourceScopeNone, want: "None"},
{scope: api.ResourceScope("Custom"), want: "Custom"},
} {
if got := tt.scope.String(); got != tt.want {
t.Fatalf("ResourceScope.String() = %q, want %q", got, tt.want)
}
}
}