mirror of
https://github.com/projectcapsule/capsule.git
synced 2026-08-19 20:46:42 +00:00
* 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>
29 lines
652 B
Go
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)
|
|
}
|
|
}
|
|
}
|