mirror of
https://github.com/stakater/Reloader.git
synced 2026-08-23 22:16:45 +00:00
wip: port csi provider to v2 sa-8436
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
package controller
|
||||
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"k8s.io/apimachinery/pkg/runtime"
|
||||
"k8s.io/apimachinery/pkg/runtime/schema"
|
||||
utilruntime "k8s.io/apimachinery/pkg/util/runtime"
|
||||
clientgoscheme "k8s.io/client-go/kubernetes/scheme"
|
||||
)
|
||||
|
||||
func TestAddOptionalSchemesRegistersCSI(t *testing.T) {
|
||||
// Reset to a clean scheme for the test.
|
||||
runtimeScheme = runtime.NewScheme()
|
||||
utilruntime.Must(clientgoscheme.AddToScheme(runtimeScheme))
|
||||
|
||||
AddOptionalSchemes(false, false, true)
|
||||
|
||||
gvk := schema.GroupVersionKind{
|
||||
Group: "secrets-store.csi.x-k8s.io",
|
||||
Version: "v1",
|
||||
Kind: "SecretProviderClassPodStatus",
|
||||
}
|
||||
if !runtimeScheme.Recognizes(gvk) {
|
||||
t.Fatal("expected CSI SecretProviderClassPodStatus to be registered in scheme")
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user