Files
Jian Qiu c367622060 🌱 Move addon api to beta in registration (#1438)
* Move addon api to beta in registration

Signed-off-by: Jian Qiu <jqiu@redhat.com>

* Update conversion e2e tests

Signed-off-by: Jian Qiu <jqiu@redhat.com>

* Add addon v1beta1 to supported type in grpc

Signed-off-by: Jian Qiu <jqiu@redhat.com>

* Fix flaky e2e in addon conversion

Signed-off-by: Jian Qiu <jqiu@redhat.com>

* Set subject for registration configuration when it is not set

Signed-off-by: Jian Qiu <jqiu@redhat.com>

---------

Signed-off-by: Jian Qiu <jqiu@redhat.com>
2026-03-23 13:31:55 +00:00

37 lines
861 B
Go

package helpers
import (
"context"
"testing"
fakekube "k8s.io/client-go/kubernetes/fake"
)
// TODO: enhance the u-t in the future @xuezhaojun
func TestCreateBootStrapSelfSubjectAccessReviews(t *testing.T) {
kubeClient := fakekube.NewSimpleClientset()
ctx := context.TODO()
// Create sample selfSubjectAccessReviews
bootstrapSSARs := GetBootstrapSSARs()
// Call the function under test
_, _, err := CreateSelfSubjectAccessReviews(ctx, kubeClient, bootstrapSSARs)
if err != nil {
t.Error(err)
}
}
func TestCreateHubConfigpSelfSubjectAccessReviews(t *testing.T) {
kubeClient := fakekube.NewSimpleClientset()
ctx := context.TODO()
// Create sample selfSubjectAccessReviews
hubConfigSSARs := GetHubConfigSSARs("test-cluster")
_, _, err := CreateSelfSubjectAccessReviews(ctx, kubeClient, hubConfigSSARs)
if err != nil {
t.Error(err)
}
}