mirror of
https://github.com/open-cluster-management-io/ocm.git
synced 2026-02-14 18:09:57 +00:00
Revert apply func (#353)
this part dep on library-go so remove from sdk-go Signed-off-by: Jian Qiu <jqiu@redhat.com>
This commit is contained in:
@@ -14,7 +14,8 @@ import (
|
||||
addonapiv1alpha1 "open-cluster-management.io/api/addon/v1alpha1"
|
||||
fakeaddon "open-cluster-management.io/api/client/addon/clientset/versioned/fake"
|
||||
addoninformers "open-cluster-management.io/api/client/addon/informers/externalversions"
|
||||
testingcommon "open-cluster-management.io/sdk-go/pkg/testing"
|
||||
|
||||
testingcommon "open-cluster-management.io/ocm/pkg/common/testing"
|
||||
)
|
||||
|
||||
func newClusterManagementOwner(name string) metav1.OwnerReference {
|
||||
|
||||
@@ -21,7 +21,8 @@ import (
|
||||
fakework "open-cluster-management.io/api/client/work/clientset/versioned/fake"
|
||||
workinformers "open-cluster-management.io/api/client/work/informers/externalversions"
|
||||
workapiv1 "open-cluster-management.io/api/work/v1"
|
||||
testingcommon "open-cluster-management.io/sdk-go/pkg/testing"
|
||||
|
||||
testingcommon "open-cluster-management.io/ocm/pkg/common/testing"
|
||||
)
|
||||
|
||||
func TestReconcile(t *testing.T) {
|
||||
|
||||
@@ -23,7 +23,8 @@ import (
|
||||
clusterv1informers "open-cluster-management.io/api/client/cluster/informers/externalversions"
|
||||
fakework "open-cluster-management.io/api/client/work/clientset/versioned/fake"
|
||||
workinformers "open-cluster-management.io/api/client/work/informers/externalversions"
|
||||
testingcommon "open-cluster-management.io/sdk-go/pkg/testing"
|
||||
|
||||
testingcommon "open-cluster-management.io/ocm/pkg/common/testing"
|
||||
)
|
||||
|
||||
func TestReconcile(t *testing.T) {
|
||||
|
||||
@@ -15,7 +15,8 @@ import (
|
||||
addonapiv1alpha1 "open-cluster-management.io/api/addon/v1alpha1"
|
||||
fakeaddon "open-cluster-management.io/api/client/addon/clientset/versioned/fake"
|
||||
addoninformers "open-cluster-management.io/api/client/addon/informers/externalversions"
|
||||
testingcommon "open-cluster-management.io/sdk-go/pkg/testing"
|
||||
|
||||
testingcommon "open-cluster-management.io/ocm/pkg/common/testing"
|
||||
)
|
||||
|
||||
func TestReconcile(t *testing.T) {
|
||||
|
||||
422
pkg/common/apply/rbac_test.go
Normal file
422
pkg/common/apply/rbac_test.go
Normal file
@@ -0,0 +1,422 @@
|
||||
package apply
|
||||
|
||||
import (
|
||||
"context"
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/openshift/library-go/pkg/operator/events/eventstesting"
|
||||
"github.com/openshift/library-go/pkg/operator/resource/resourceread"
|
||||
rbacv1 "k8s.io/api/rbac/v1"
|
||||
"k8s.io/client-go/informers"
|
||||
kubefake "k8s.io/client-go/kubernetes/fake"
|
||||
clienttesting "k8s.io/client-go/testing"
|
||||
|
||||
testingcommon "open-cluster-management.io/ocm/pkg/common/testing"
|
||||
)
|
||||
|
||||
func TestPermissionApply(t *testing.T) {
|
||||
tc := []struct {
|
||||
name string
|
||||
manifest string
|
||||
existingManifest string
|
||||
// filtered indicates if the existing manifest is in the informer cache or not. For example,
|
||||
// it may not match the expected label/field selector of the informer factory.
|
||||
filtered bool
|
||||
validateAction func(t *testing.T, actions []clienttesting.Action)
|
||||
}{
|
||||
{
|
||||
name: "create clusterrole",
|
||||
manifest: `
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRole
|
||||
metadata:
|
||||
name: test
|
||||
rules:
|
||||
- apiGroups: [""]
|
||||
resources: ["configmaps", "events"]
|
||||
verbs: ["get", "list", "watch"]
|
||||
`,
|
||||
validateAction: func(t *testing.T, actions []clienttesting.Action) {
|
||||
testingcommon.AssertActions(t, actions, "create")
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "upate clusterrole",
|
||||
existingManifest: `
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRole
|
||||
metadata:
|
||||
name: test
|
||||
rules:
|
||||
- apiGroups: [""]
|
||||
resources: ["configmaps", "events"]
|
||||
verbs: ["get", "list", "watch", "create"]
|
||||
`,
|
||||
manifest: `
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRole
|
||||
metadata:
|
||||
name: test
|
||||
rules:
|
||||
- apiGroups: [""]
|
||||
resources: ["configmaps", "events"]
|
||||
verbs: ["get", "list", "watch"]
|
||||
`,
|
||||
validateAction: func(t *testing.T, actions []clienttesting.Action) {
|
||||
testingcommon.AssertActions(t, actions, "update")
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "upate clusterrole with no cache",
|
||||
existingManifest: `
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRole
|
||||
metadata:
|
||||
name: test
|
||||
rules:
|
||||
- apiGroups: [""]
|
||||
resources: ["configmaps", "events"]
|
||||
verbs: ["get", "list", "watch", "create"]
|
||||
`,
|
||||
manifest: `
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRole
|
||||
metadata:
|
||||
name: test
|
||||
rules:
|
||||
- apiGroups: [""]
|
||||
resources: ["configmaps", "events"]
|
||||
verbs: ["get", "list", "watch"]
|
||||
`,
|
||||
filtered: true,
|
||||
validateAction: func(t *testing.T, actions []clienttesting.Action) {
|
||||
testingcommon.AssertActions(t, actions, "create", "get", "update")
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "compare and no update clusterrole",
|
||||
existingManifest: `
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRole
|
||||
metadata:
|
||||
name: test
|
||||
rules:
|
||||
- apiGroups: [""]
|
||||
resources: ["configmaps", "events"]
|
||||
verbs: ["get", "list", "watch"]
|
||||
`,
|
||||
manifest: `
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRole
|
||||
metadata:
|
||||
name: test
|
||||
rules:
|
||||
- apiGroups: [""]
|
||||
resources: ["configmaps", "events"]
|
||||
verbs: ["get", "list", "watch"]
|
||||
`,
|
||||
validateAction: testingcommon.AssertNoActions,
|
||||
},
|
||||
{
|
||||
name: "create clusterrolebinding",
|
||||
manifest: `
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRoleBinding
|
||||
metadata:
|
||||
name: test
|
||||
roleRef:
|
||||
apiGroup: rbac.authorization.k8s.io
|
||||
kind: ClusterRole
|
||||
name: test
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: test
|
||||
namespace: test
|
||||
`,
|
||||
validateAction: func(t *testing.T, actions []clienttesting.Action) {
|
||||
testingcommon.AssertActions(t, actions, "create")
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "update clusterrolebinding",
|
||||
existingManifest: `
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRoleBinding
|
||||
metadata:
|
||||
name: test
|
||||
roleRef:
|
||||
apiGroup: rbac.authorization.k8s.io
|
||||
kind: ClusterRole
|
||||
name: test1
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: test
|
||||
namespace: test1
|
||||
`,
|
||||
manifest: `
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRoleBinding
|
||||
metadata:
|
||||
name: test
|
||||
roleRef:
|
||||
apiGroup: rbac.authorization.k8s.io
|
||||
kind: ClusterRole
|
||||
name: test
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: test
|
||||
namespace: test
|
||||
`,
|
||||
validateAction: func(t *testing.T, actions []clienttesting.Action) {
|
||||
testingcommon.AssertActions(t, actions, "update")
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "no update clusterrolebinding",
|
||||
existingManifest: `
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRoleBinding
|
||||
metadata:
|
||||
name: test
|
||||
roleRef:
|
||||
apiGroup: rbac.authorization.k8s.io
|
||||
kind: ClusterRole
|
||||
name: test
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: test
|
||||
namespace: test
|
||||
`,
|
||||
manifest: `
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRoleBinding
|
||||
metadata:
|
||||
name: test
|
||||
roleRef:
|
||||
apiGroup: rbac.authorization.k8s.io
|
||||
kind: ClusterRole
|
||||
name: test
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: test
|
||||
namespace: test
|
||||
`,
|
||||
validateAction: testingcommon.AssertNoActions,
|
||||
},
|
||||
{
|
||||
name: "create role",
|
||||
manifest: `
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: Role
|
||||
metadata:
|
||||
name: test
|
||||
namespace: default
|
||||
rules:
|
||||
- apiGroups: [""]
|
||||
resources: ["configmaps", "events"]
|
||||
verbs: ["get", "list", "watch"]
|
||||
`,
|
||||
validateAction: func(t *testing.T, actions []clienttesting.Action) {
|
||||
testingcommon.AssertActions(t, actions, "create")
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "upate role",
|
||||
existingManifest: `
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: Role
|
||||
metadata:
|
||||
name: test
|
||||
namespace: default
|
||||
rules:
|
||||
- apiGroups: [""]
|
||||
resources: ["configmaps", "events"]
|
||||
verbs: ["get", "list", "watch", "create"]
|
||||
`,
|
||||
manifest: `
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: Role
|
||||
metadata:
|
||||
name: test
|
||||
namespace: default
|
||||
rules:
|
||||
- apiGroups: [""]
|
||||
resources: ["configmaps", "events"]
|
||||
verbs: ["get", "list", "watch"]
|
||||
`,
|
||||
validateAction: func(t *testing.T, actions []clienttesting.Action) {
|
||||
testingcommon.AssertActions(t, actions, "update")
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "compare and no update clusterrole",
|
||||
existingManifest: `
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: Role
|
||||
metadata:
|
||||
name: test
|
||||
namespace: default
|
||||
rules:
|
||||
- apiGroups: [""]
|
||||
resources: ["configmaps", "events"]
|
||||
verbs: ["get", "list", "watch"]
|
||||
`,
|
||||
manifest: `
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: Role
|
||||
metadata:
|
||||
name: test
|
||||
namespace: default
|
||||
rules:
|
||||
- apiGroups: [""]
|
||||
resources: ["configmaps", "events"]
|
||||
verbs: ["get", "list", "watch"]
|
||||
`,
|
||||
validateAction: testingcommon.AssertNoActions,
|
||||
},
|
||||
{
|
||||
name: "create rolebinding",
|
||||
manifest: `
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRoleBinding
|
||||
metadata:
|
||||
name: test
|
||||
namespace: default
|
||||
roleRef:
|
||||
apiGroup: rbac.authorization.k8s.io
|
||||
kind: Role
|
||||
name: test
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: test
|
||||
namespace: test
|
||||
`,
|
||||
validateAction: func(t *testing.T, actions []clienttesting.Action) {
|
||||
testingcommon.AssertActions(t, actions, "create")
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "update rolebinding",
|
||||
existingManifest: `
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: RoleBinding
|
||||
metadata:
|
||||
name: test
|
||||
namespace: default
|
||||
roleRef:
|
||||
apiGroup: rbac.authorization.k8s.io
|
||||
kind: ClusterRole
|
||||
name: test1
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: test
|
||||
namespace: test1
|
||||
`,
|
||||
manifest: `
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: RoleBinding
|
||||
metadata:
|
||||
name: test
|
||||
namespace: default
|
||||
roleRef:
|
||||
apiGroup: rbac.authorization.k8s.io
|
||||
kind: ClusterRole
|
||||
name: test
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: test
|
||||
namespace: test
|
||||
`,
|
||||
validateAction: func(t *testing.T, actions []clienttesting.Action) {
|
||||
testingcommon.AssertActions(t, actions, "update")
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "no update clusterrolebinding",
|
||||
existingManifest: `
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: RoleBinding
|
||||
metadata:
|
||||
name: test
|
||||
namespace: default
|
||||
roleRef:
|
||||
apiGroup: rbac.authorization.k8s.io
|
||||
kind: ClusterRole
|
||||
name: test
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: test
|
||||
namespace: test
|
||||
`,
|
||||
manifest: `
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: RoleBinding
|
||||
metadata:
|
||||
name: test
|
||||
namespace: default
|
||||
roleRef:
|
||||
apiGroup: rbac.authorization.k8s.io
|
||||
kind: ClusterRole
|
||||
name: test
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: test
|
||||
namespace: test
|
||||
`,
|
||||
validateAction: testingcommon.AssertNoActions,
|
||||
},
|
||||
}
|
||||
|
||||
for _, c := range tc {
|
||||
t.Run(c.name, func(t *testing.T) {
|
||||
var kubeClient *kubefake.Clientset
|
||||
var informerFactory informers.SharedInformerFactory
|
||||
if len(c.existingManifest) > 0 {
|
||||
o, err := resourceread.ReadGenericWithUnstructured([]byte(c.existingManifest))
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
kubeClient = kubefake.NewSimpleClientset(o)
|
||||
informerFactory = informers.NewSharedInformerFactory(kubeClient, 3*time.Minute)
|
||||
if !c.filtered {
|
||||
switch t := o.(type) {
|
||||
case *rbacv1.ClusterRole:
|
||||
err = informerFactory.Rbac().V1().ClusterRoles().Informer().GetStore().Add(t)
|
||||
case *rbacv1.ClusterRoleBinding:
|
||||
err = informerFactory.Rbac().V1().ClusterRoleBindings().Informer().GetStore().Add(t)
|
||||
case *rbacv1.Role:
|
||||
err = informerFactory.Rbac().V1().Roles().Informer().GetStore().Add(t)
|
||||
case *rbacv1.RoleBinding:
|
||||
err = informerFactory.Rbac().V1().RoleBindings().Informer().GetStore().Add(t)
|
||||
}
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
}
|
||||
} else {
|
||||
kubeClient = kubefake.NewSimpleClientset()
|
||||
informerFactory = informers.NewSharedInformerFactory(kubeClient, 3*time.Minute)
|
||||
}
|
||||
|
||||
applier := NewPermissionApplier(
|
||||
kubeClient,
|
||||
informerFactory.Rbac().V1().Roles().Lister(),
|
||||
informerFactory.Rbac().V1().RoleBindings().Lister(),
|
||||
informerFactory.Rbac().V1().ClusterRoles().Lister(),
|
||||
informerFactory.Rbac().V1().ClusterRoleBindings().Lister(),
|
||||
)
|
||||
results := applier.Apply(context.TODO(), eventstesting.NewTestingEventRecorder(t),
|
||||
func(name string) ([]byte, error) {
|
||||
return []byte(c.manifest), nil
|
||||
}, "test")
|
||||
|
||||
for _, r := range results {
|
||||
if r.Error != nil {
|
||||
t.Error(r.Error)
|
||||
}
|
||||
}
|
||||
c.validateAction(t, kubeClient.Actions())
|
||||
})
|
||||
}
|
||||
}
|
||||
@@ -5,12 +5,9 @@ import (
|
||||
"testing"
|
||||
|
||||
"github.com/davecgh/go-spew/spew"
|
||||
"k8s.io/apimachinery/pkg/api/equality"
|
||||
"k8s.io/apimachinery/pkg/api/meta"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
"k8s.io/apimachinery/pkg/runtime"
|
||||
"k8s.io/apimachinery/pkg/runtime/schema"
|
||||
"k8s.io/apimachinery/pkg/util/diff"
|
||||
clienttesting "k8s.io/client-go/testing"
|
||||
)
|
||||
|
||||
@@ -169,15 +166,3 @@ func AssertEqualNameNamespace(t *testing.T, actualName, actualNamespace, name, n
|
||||
t.Errorf("Namespace of the object does not match, expected %s, actual %s", namespace, actualNamespace)
|
||||
}
|
||||
}
|
||||
|
||||
// AssertFinalizers asserts the given runtime object has the expected finalizers
|
||||
func AssertFinalizers(t *testing.T, obj runtime.Object, finalizers []string) {
|
||||
accessor, _ := meta.Accessor(obj)
|
||||
actual := accessor.GetFinalizers()
|
||||
if len(actual) == 0 && len(finalizers) == 0 {
|
||||
return
|
||||
}
|
||||
if !equality.Semantic.DeepEqual(actual, finalizers) {
|
||||
t.Fatal(diff.ObjectDiff(actual, finalizers))
|
||||
}
|
||||
}
|
||||
@@ -20,8 +20,8 @@ import (
|
||||
fakeoperatorclient "open-cluster-management.io/api/client/operator/clientset/versioned/fake"
|
||||
operatorinformers "open-cluster-management.io/api/client/operator/informers/externalversions"
|
||||
operatorapiv1 "open-cluster-management.io/api/operator/v1"
|
||||
testingcommon "open-cluster-management.io/sdk-go/pkg/testing"
|
||||
|
||||
testingcommon "open-cluster-management.io/ocm/pkg/common/testing"
|
||||
"open-cluster-management.io/ocm/pkg/operator/helpers"
|
||||
)
|
||||
|
||||
|
||||
@@ -30,8 +30,8 @@ import (
|
||||
operatorinformers "open-cluster-management.io/api/client/operator/informers/externalversions"
|
||||
operatorapiv1 "open-cluster-management.io/api/operator/v1"
|
||||
"open-cluster-management.io/sdk-go/pkg/patcher"
|
||||
testingcommon "open-cluster-management.io/sdk-go/pkg/testing"
|
||||
|
||||
testingcommon "open-cluster-management.io/ocm/pkg/common/testing"
|
||||
"open-cluster-management.io/ocm/pkg/operator/helpers"
|
||||
)
|
||||
|
||||
|
||||
@@ -19,8 +19,8 @@ import (
|
||||
fakeoperatorlient "open-cluster-management.io/api/client/operator/clientset/versioned/fake"
|
||||
operatorinformers "open-cluster-management.io/api/client/operator/informers/externalversions"
|
||||
operatorapiv1 "open-cluster-management.io/api/operator/v1"
|
||||
testingcommon "open-cluster-management.io/sdk-go/pkg/testing"
|
||||
|
||||
testingcommon "open-cluster-management.io/ocm/pkg/common/testing"
|
||||
"open-cluster-management.io/ocm/pkg/operator/operators/clustermanager/controllers/migrationcontroller"
|
||||
)
|
||||
|
||||
|
||||
@@ -24,7 +24,8 @@ import (
|
||||
operatorinformers "open-cluster-management.io/api/client/operator/informers/externalversions"
|
||||
operatorapiv1 "open-cluster-management.io/api/operator/v1"
|
||||
"open-cluster-management.io/sdk-go/pkg/patcher"
|
||||
testingcommon "open-cluster-management.io/sdk-go/pkg/testing"
|
||||
|
||||
testingcommon "open-cluster-management.io/ocm/pkg/common/testing"
|
||||
)
|
||||
|
||||
func newFakeCRD(name string, storageVersion string, versions ...string) runtime.Object {
|
||||
|
||||
@@ -18,8 +18,8 @@ import (
|
||||
operatorinformers "open-cluster-management.io/api/client/operator/informers/externalversions"
|
||||
operatorapiv1 "open-cluster-management.io/api/operator/v1"
|
||||
"open-cluster-management.io/sdk-go/pkg/patcher"
|
||||
testingcommon "open-cluster-management.io/sdk-go/pkg/testing"
|
||||
|
||||
testingcommon "open-cluster-management.io/ocm/pkg/common/testing"
|
||||
testinghelper "open-cluster-management.io/ocm/pkg/operator/helpers/testing"
|
||||
)
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@ import (
|
||||
versionutil "k8s.io/apimachinery/pkg/util/version"
|
||||
clienttesting "k8s.io/client-go/testing"
|
||||
|
||||
testingcommon "open-cluster-management.io/sdk-go/pkg/testing"
|
||||
testingcommon "open-cluster-management.io/ocm/pkg/common/testing"
|
||||
)
|
||||
|
||||
func TestApplyV1CRD(t *testing.T) {
|
||||
|
||||
@@ -12,7 +12,7 @@ import (
|
||||
"k8s.io/client-go/informers"
|
||||
kubefake "k8s.io/client-go/kubernetes/fake"
|
||||
|
||||
testingcommon "open-cluster-management.io/sdk-go/pkg/testing"
|
||||
testingcommon "open-cluster-management.io/ocm/pkg/common/testing"
|
||||
)
|
||||
|
||||
func TestSync(t *testing.T) {
|
||||
|
||||
@@ -13,8 +13,8 @@ import (
|
||||
"k8s.io/klog/v2"
|
||||
|
||||
workv1 "open-cluster-management.io/api/work/v1"
|
||||
testingcommon "open-cluster-management.io/sdk-go/pkg/testing"
|
||||
|
||||
testingcommon "open-cluster-management.io/ocm/pkg/common/testing"
|
||||
"open-cluster-management.io/ocm/pkg/operator/helpers"
|
||||
)
|
||||
|
||||
|
||||
@@ -35,8 +35,8 @@ import (
|
||||
operatorapiv1 "open-cluster-management.io/api/operator/v1"
|
||||
workapiv1 "open-cluster-management.io/api/work/v1"
|
||||
"open-cluster-management.io/sdk-go/pkg/patcher"
|
||||
testingcommon "open-cluster-management.io/sdk-go/pkg/testing"
|
||||
|
||||
testingcommon "open-cluster-management.io/ocm/pkg/common/testing"
|
||||
"open-cluster-management.io/ocm/pkg/operator/helpers"
|
||||
testinghelper "open-cluster-management.io/ocm/pkg/operator/helpers/testing"
|
||||
)
|
||||
|
||||
@@ -25,8 +25,8 @@ import (
|
||||
operatorinformers "open-cluster-management.io/api/client/operator/informers/externalversions"
|
||||
operatorapiv1 "open-cluster-management.io/api/operator/v1"
|
||||
"open-cluster-management.io/sdk-go/pkg/patcher"
|
||||
testingcommon "open-cluster-management.io/sdk-go/pkg/testing"
|
||||
|
||||
testingcommon "open-cluster-management.io/ocm/pkg/common/testing"
|
||||
"open-cluster-management.io/ocm/pkg/operator/helpers"
|
||||
testinghelper "open-cluster-management.io/ocm/pkg/operator/helpers/testing"
|
||||
)
|
||||
|
||||
@@ -18,8 +18,8 @@ import (
|
||||
operatorinformers "open-cluster-management.io/api/client/operator/informers/externalversions"
|
||||
operatorapiv1 "open-cluster-management.io/api/operator/v1"
|
||||
"open-cluster-management.io/sdk-go/pkg/patcher"
|
||||
testingcommon "open-cluster-management.io/sdk-go/pkg/testing"
|
||||
|
||||
testingcommon "open-cluster-management.io/ocm/pkg/common/testing"
|
||||
testinghelper "open-cluster-management.io/ocm/pkg/operator/helpers/testing"
|
||||
)
|
||||
|
||||
|
||||
@@ -13,8 +13,8 @@ import (
|
||||
|
||||
clusterfake "open-cluster-management.io/api/client/cluster/clientset/versioned/fake"
|
||||
clusterapiv1beta2 "open-cluster-management.io/api/cluster/v1beta2"
|
||||
testingcommon "open-cluster-management.io/sdk-go/pkg/testing"
|
||||
|
||||
testingcommon "open-cluster-management.io/ocm/pkg/common/testing"
|
||||
testinghelpers "open-cluster-management.io/ocm/pkg/placement/helpers/testing"
|
||||
)
|
||||
|
||||
|
||||
@@ -19,8 +19,8 @@ import (
|
||||
clusterapiv1alpha1 "open-cluster-management.io/api/cluster/v1alpha1"
|
||||
clusterapiv1beta1 "open-cluster-management.io/api/cluster/v1beta1"
|
||||
clusterapiv1beta2 "open-cluster-management.io/api/cluster/v1beta2"
|
||||
testingcommon "open-cluster-management.io/sdk-go/pkg/testing"
|
||||
|
||||
testingcommon "open-cluster-management.io/ocm/pkg/common/testing"
|
||||
testinghelpers "open-cluster-management.io/ocm/pkg/placement/helpers/testing"
|
||||
)
|
||||
|
||||
|
||||
@@ -22,8 +22,8 @@ import (
|
||||
clusterapiv1 "open-cluster-management.io/api/cluster/v1"
|
||||
clusterapiv1beta1 "open-cluster-management.io/api/cluster/v1beta1"
|
||||
clusterapiv1beta2 "open-cluster-management.io/api/cluster/v1beta2"
|
||||
testingcommon "open-cluster-management.io/sdk-go/pkg/testing"
|
||||
|
||||
testingcommon "open-cluster-management.io/ocm/pkg/common/testing"
|
||||
"open-cluster-management.io/ocm/pkg/placement/controllers/framework"
|
||||
"open-cluster-management.io/ocm/pkg/placement/controllers/metrics"
|
||||
testinghelpers "open-cluster-management.io/ocm/pkg/placement/helpers/testing"
|
||||
|
||||
@@ -15,8 +15,7 @@ import (
|
||||
certutil "k8s.io/client-go/util/cert"
|
||||
"k8s.io/klog/v2/ktesting"
|
||||
|
||||
testingcommon "open-cluster-management.io/sdk-go/pkg/testing"
|
||||
|
||||
testingcommon "open-cluster-management.io/ocm/pkg/common/testing"
|
||||
testinghelpers "open-cluster-management.io/ocm/pkg/registration/helpers/testing"
|
||||
)
|
||||
|
||||
|
||||
@@ -19,8 +19,7 @@ import (
|
||||
"k8s.io/client-go/tools/cache"
|
||||
"k8s.io/klog/v2/ktesting"
|
||||
|
||||
testingcommon "open-cluster-management.io/sdk-go/pkg/testing"
|
||||
|
||||
testingcommon "open-cluster-management.io/ocm/pkg/common/testing"
|
||||
testinghelpers "open-cluster-management.io/ocm/pkg/registration/helpers/testing"
|
||||
"open-cluster-management.io/ocm/pkg/registration/hub/user"
|
||||
)
|
||||
|
||||
@@ -18,7 +18,8 @@ import (
|
||||
clusterinformers "open-cluster-management.io/api/client/cluster/informers/externalversions"
|
||||
clusterv1 "open-cluster-management.io/api/cluster/v1"
|
||||
"open-cluster-management.io/sdk-go/pkg/patcher"
|
||||
testingcommon "open-cluster-management.io/sdk-go/pkg/testing"
|
||||
|
||||
testingcommon "open-cluster-management.io/ocm/pkg/common/testing"
|
||||
)
|
||||
|
||||
func TestGetAddOnLabelValue(t *testing.T) {
|
||||
|
||||
@@ -16,8 +16,8 @@ import (
|
||||
addoninformers "open-cluster-management.io/api/client/addon/informers/externalversions"
|
||||
clusterfake "open-cluster-management.io/api/client/cluster/clientset/versioned/fake"
|
||||
clusterinformers "open-cluster-management.io/api/client/cluster/informers/externalversions"
|
||||
testingcommon "open-cluster-management.io/sdk-go/pkg/testing"
|
||||
|
||||
testingcommon "open-cluster-management.io/ocm/pkg/common/testing"
|
||||
testinghelpers "open-cluster-management.io/ocm/pkg/registration/helpers/testing"
|
||||
)
|
||||
|
||||
|
||||
@@ -14,8 +14,8 @@ import (
|
||||
|
||||
clusterv1informer "open-cluster-management.io/api/client/cluster/informers/externalversions/cluster/v1"
|
||||
clusterv1listers "open-cluster-management.io/api/client/cluster/listers/cluster/v1"
|
||||
"open-cluster-management.io/sdk-go/pkg/apply"
|
||||
|
||||
"open-cluster-management.io/ocm/pkg/common/apply"
|
||||
"open-cluster-management.io/ocm/pkg/common/queue"
|
||||
"open-cluster-management.io/ocm/pkg/registration/hub/manifests"
|
||||
)
|
||||
|
||||
@@ -16,9 +16,9 @@ import (
|
||||
|
||||
clusterfake "open-cluster-management.io/api/client/cluster/clientset/versioned/fake"
|
||||
clusterinformers "open-cluster-management.io/api/client/cluster/informers/externalversions"
|
||||
"open-cluster-management.io/sdk-go/pkg/apply"
|
||||
testingcommon "open-cluster-management.io/sdk-go/pkg/testing"
|
||||
|
||||
"open-cluster-management.io/ocm/pkg/common/apply"
|
||||
testingcommon "open-cluster-management.io/ocm/pkg/common/testing"
|
||||
testinghelpers "open-cluster-management.io/ocm/pkg/registration/helpers/testing"
|
||||
)
|
||||
|
||||
|
||||
@@ -15,8 +15,7 @@ import (
|
||||
kubefake "k8s.io/client-go/kubernetes/fake"
|
||||
clienttesting "k8s.io/client-go/testing"
|
||||
|
||||
testingcommon "open-cluster-management.io/sdk-go/pkg/testing"
|
||||
|
||||
testingcommon "open-cluster-management.io/ocm/pkg/common/testing"
|
||||
testinghelpers "open-cluster-management.io/ocm/pkg/registration/helpers/testing"
|
||||
"open-cluster-management.io/ocm/pkg/registration/hub/user"
|
||||
)
|
||||
|
||||
@@ -20,8 +20,8 @@ import (
|
||||
clusterfake "open-cluster-management.io/api/client/cluster/clientset/versioned/fake"
|
||||
clusterinformers "open-cluster-management.io/api/client/cluster/informers/externalversions"
|
||||
clusterv1 "open-cluster-management.io/api/cluster/v1"
|
||||
testingcommon "open-cluster-management.io/sdk-go/pkg/testing"
|
||||
|
||||
testingcommon "open-cluster-management.io/ocm/pkg/common/testing"
|
||||
testinghelpers "open-cluster-management.io/ocm/pkg/registration/helpers/testing"
|
||||
"open-cluster-management.io/ocm/pkg/registration/hub/user"
|
||||
)
|
||||
|
||||
@@ -19,8 +19,8 @@ import (
|
||||
workinformers "open-cluster-management.io/api/client/work/informers/externalversions"
|
||||
clusterv1 "open-cluster-management.io/api/cluster/v1"
|
||||
"open-cluster-management.io/sdk-go/pkg/patcher"
|
||||
testingcommon "open-cluster-management.io/sdk-go/pkg/testing"
|
||||
|
||||
testingcommon "open-cluster-management.io/ocm/pkg/common/testing"
|
||||
testinghelpers "open-cluster-management.io/ocm/pkg/registration/helpers/testing"
|
||||
)
|
||||
|
||||
|
||||
@@ -19,8 +19,8 @@ import (
|
||||
clusterv1 "open-cluster-management.io/api/cluster/v1"
|
||||
workv1 "open-cluster-management.io/api/work/v1"
|
||||
"open-cluster-management.io/sdk-go/pkg/patcher"
|
||||
testingcommon "open-cluster-management.io/sdk-go/pkg/testing"
|
||||
|
||||
testingcommon "open-cluster-management.io/ocm/pkg/common/testing"
|
||||
testinghelpers "open-cluster-management.io/ocm/pkg/registration/helpers/testing"
|
||||
)
|
||||
|
||||
|
||||
@@ -15,8 +15,8 @@ import (
|
||||
addonv1alpha1 "open-cluster-management.io/api/addon/v1alpha1"
|
||||
clusterv1 "open-cluster-management.io/api/cluster/v1"
|
||||
workv1 "open-cluster-management.io/api/work/v1"
|
||||
testingcommon "open-cluster-management.io/sdk-go/pkg/testing"
|
||||
|
||||
testingcommon "open-cluster-management.io/ocm/pkg/common/testing"
|
||||
testinghelpers "open-cluster-management.io/ocm/pkg/registration/helpers/testing"
|
||||
)
|
||||
|
||||
|
||||
@@ -17,8 +17,8 @@ import (
|
||||
clusterv1 "open-cluster-management.io/api/cluster/v1"
|
||||
v1 "open-cluster-management.io/api/cluster/v1"
|
||||
"open-cluster-management.io/sdk-go/pkg/patcher"
|
||||
testingcommon "open-cluster-management.io/sdk-go/pkg/testing"
|
||||
|
||||
testingcommon "open-cluster-management.io/ocm/pkg/common/testing"
|
||||
testinghelpers "open-cluster-management.io/ocm/pkg/registration/helpers/testing"
|
||||
)
|
||||
|
||||
|
||||
@@ -18,8 +18,8 @@ import (
|
||||
clusterv1 "open-cluster-management.io/api/cluster/v1"
|
||||
v1 "open-cluster-management.io/api/cluster/v1"
|
||||
"open-cluster-management.io/sdk-go/pkg/patcher"
|
||||
testingcommon "open-cluster-management.io/sdk-go/pkg/testing"
|
||||
|
||||
testingcommon "open-cluster-management.io/ocm/pkg/common/testing"
|
||||
testinghelpers "open-cluster-management.io/ocm/pkg/registration/helpers/testing"
|
||||
)
|
||||
|
||||
|
||||
@@ -20,9 +20,9 @@ import (
|
||||
informerv1 "open-cluster-management.io/api/client/cluster/informers/externalversions/cluster/v1"
|
||||
listerv1 "open-cluster-management.io/api/client/cluster/listers/cluster/v1"
|
||||
v1 "open-cluster-management.io/api/cluster/v1"
|
||||
"open-cluster-management.io/sdk-go/pkg/apply"
|
||||
"open-cluster-management.io/sdk-go/pkg/patcher"
|
||||
|
||||
"open-cluster-management.io/ocm/pkg/common/apply"
|
||||
"open-cluster-management.io/ocm/pkg/common/queue"
|
||||
"open-cluster-management.io/ocm/pkg/registration/helpers"
|
||||
"open-cluster-management.io/ocm/pkg/registration/hub/manifests"
|
||||
|
||||
@@ -16,10 +16,10 @@ import (
|
||||
clusterfake "open-cluster-management.io/api/client/cluster/clientset/versioned/fake"
|
||||
clusterinformers "open-cluster-management.io/api/client/cluster/informers/externalversions"
|
||||
v1 "open-cluster-management.io/api/cluster/v1"
|
||||
"open-cluster-management.io/sdk-go/pkg/apply"
|
||||
"open-cluster-management.io/sdk-go/pkg/patcher"
|
||||
testingcommon "open-cluster-management.io/sdk-go/pkg/testing"
|
||||
|
||||
"open-cluster-management.io/ocm/pkg/common/apply"
|
||||
testingcommon "open-cluster-management.io/ocm/pkg/common/testing"
|
||||
testinghelpers "open-cluster-management.io/ocm/pkg/registration/helpers/testing"
|
||||
)
|
||||
|
||||
|
||||
@@ -16,7 +16,8 @@ import (
|
||||
clusterv1 "open-cluster-management.io/api/cluster/v1"
|
||||
clusterv1beta2 "open-cluster-management.io/api/cluster/v1beta2"
|
||||
"open-cluster-management.io/sdk-go/pkg/patcher"
|
||||
testingcommon "open-cluster-management.io/sdk-go/pkg/testing"
|
||||
|
||||
testingcommon "open-cluster-management.io/ocm/pkg/common/testing"
|
||||
)
|
||||
|
||||
func TestSyncClusterSet(t *testing.T) {
|
||||
|
||||
@@ -14,8 +14,8 @@ import (
|
||||
clusterfake "open-cluster-management.io/api/client/cluster/clientset/versioned/fake"
|
||||
clusterinformers "open-cluster-management.io/api/client/cluster/informers/externalversions"
|
||||
clusterv1beta2 "open-cluster-management.io/api/cluster/v1beta2"
|
||||
testingcommon "open-cluster-management.io/sdk-go/pkg/testing"
|
||||
|
||||
testingcommon "open-cluster-management.io/ocm/pkg/common/testing"
|
||||
testinghelpers "open-cluster-management.io/ocm/pkg/registration/helpers/testing"
|
||||
)
|
||||
|
||||
|
||||
@@ -14,8 +14,8 @@ import (
|
||||
clusterfake "open-cluster-management.io/api/client/cluster/clientset/versioned/fake"
|
||||
clusterinformers "open-cluster-management.io/api/client/cluster/informers/externalversions"
|
||||
clusterv1beta2 "open-cluster-management.io/api/cluster/v1beta2"
|
||||
testingcommon "open-cluster-management.io/sdk-go/pkg/testing"
|
||||
|
||||
testingcommon "open-cluster-management.io/ocm/pkg/common/testing"
|
||||
testinghelpers "open-cluster-management.io/ocm/pkg/registration/helpers/testing"
|
||||
)
|
||||
|
||||
|
||||
@@ -16,7 +16,8 @@ import (
|
||||
clusterfake "open-cluster-management.io/api/client/cluster/clientset/versioned/fake"
|
||||
clusterinformers "open-cluster-management.io/api/client/cluster/informers/externalversions"
|
||||
clusterv1beta2 "open-cluster-management.io/api/cluster/v1beta2"
|
||||
testingcommon "open-cluster-management.io/sdk-go/pkg/testing"
|
||||
|
||||
testingcommon "open-cluster-management.io/ocm/pkg/common/testing"
|
||||
)
|
||||
|
||||
func TestSync(t *testing.T) {
|
||||
|
||||
@@ -15,8 +15,8 @@ import (
|
||||
clusterinformers "open-cluster-management.io/api/client/cluster/informers/externalversions"
|
||||
v1 "open-cluster-management.io/api/cluster/v1"
|
||||
"open-cluster-management.io/sdk-go/pkg/patcher"
|
||||
testingcommon "open-cluster-management.io/sdk-go/pkg/testing"
|
||||
|
||||
testingcommon "open-cluster-management.io/ocm/pkg/common/testing"
|
||||
testinghelpers "open-cluster-management.io/ocm/pkg/registration/helpers/testing"
|
||||
)
|
||||
|
||||
|
||||
@@ -17,8 +17,8 @@ import (
|
||||
addonfake "open-cluster-management.io/api/client/addon/clientset/versioned/fake"
|
||||
addoninformers "open-cluster-management.io/api/client/addon/informers/externalversions"
|
||||
"open-cluster-management.io/sdk-go/pkg/patcher"
|
||||
testingcommon "open-cluster-management.io/sdk-go/pkg/testing"
|
||||
|
||||
testingcommon "open-cluster-management.io/ocm/pkg/common/testing"
|
||||
testinghelpers "open-cluster-management.io/ocm/pkg/registration/helpers/testing"
|
||||
)
|
||||
|
||||
|
||||
@@ -17,7 +17,8 @@ import (
|
||||
addonfake "open-cluster-management.io/api/client/addon/clientset/versioned/fake"
|
||||
addoninformers "open-cluster-management.io/api/client/addon/informers/externalversions"
|
||||
clusterv1 "open-cluster-management.io/api/cluster/v1"
|
||||
testingcommon "open-cluster-management.io/sdk-go/pkg/testing"
|
||||
|
||||
testingcommon "open-cluster-management.io/ocm/pkg/common/testing"
|
||||
)
|
||||
|
||||
func TestFilterCSREvents(t *testing.T) {
|
||||
|
||||
@@ -13,8 +13,8 @@ import (
|
||||
|
||||
clusterfake "open-cluster-management.io/api/client/cluster/clientset/versioned/fake"
|
||||
clusterinformers "open-cluster-management.io/api/client/cluster/informers/externalversions"
|
||||
testingcommon "open-cluster-management.io/sdk-go/pkg/testing"
|
||||
|
||||
testingcommon "open-cluster-management.io/ocm/pkg/common/testing"
|
||||
testinghelpers "open-cluster-management.io/ocm/pkg/registration/helpers/testing"
|
||||
)
|
||||
|
||||
|
||||
@@ -20,8 +20,8 @@ import (
|
||||
clusterv1 "open-cluster-management.io/api/cluster/v1"
|
||||
clusterv1alpha1 "open-cluster-management.io/api/cluster/v1alpha1"
|
||||
ocmfeature "open-cluster-management.io/api/feature"
|
||||
testingcommon "open-cluster-management.io/sdk-go/pkg/testing"
|
||||
|
||||
testingcommon "open-cluster-management.io/ocm/pkg/common/testing"
|
||||
"open-cluster-management.io/ocm/pkg/features"
|
||||
testinghelpers "open-cluster-management.io/ocm/pkg/registration/helpers/testing"
|
||||
)
|
||||
|
||||
@@ -16,8 +16,8 @@ import (
|
||||
clusterfake "open-cluster-management.io/api/client/cluster/clientset/versioned/fake"
|
||||
clusterinformers "open-cluster-management.io/api/client/cluster/informers/externalversions"
|
||||
clusterv1 "open-cluster-management.io/api/cluster/v1"
|
||||
testingcommon "open-cluster-management.io/sdk-go/pkg/testing"
|
||||
|
||||
testingcommon "open-cluster-management.io/ocm/pkg/common/testing"
|
||||
testinghelpers "open-cluster-management.io/ocm/pkg/registration/helpers/testing"
|
||||
)
|
||||
|
||||
|
||||
@@ -22,8 +22,8 @@ import (
|
||||
clusterfake "open-cluster-management.io/api/client/cluster/clientset/versioned/fake"
|
||||
clusterinformers "open-cluster-management.io/api/client/cluster/informers/externalversions"
|
||||
clusterv1 "open-cluster-management.io/api/cluster/v1"
|
||||
testingcommon "open-cluster-management.io/sdk-go/pkg/testing"
|
||||
|
||||
testingcommon "open-cluster-management.io/ocm/pkg/common/testing"
|
||||
testinghelpers "open-cluster-management.io/ocm/pkg/registration/helpers/testing"
|
||||
)
|
||||
|
||||
|
||||
@@ -9,8 +9,8 @@ import (
|
||||
|
||||
clusterfake "open-cluster-management.io/api/client/cluster/clientset/versioned/fake"
|
||||
clusterv1 "open-cluster-management.io/api/cluster/v1"
|
||||
testingcommon "open-cluster-management.io/sdk-go/pkg/testing"
|
||||
|
||||
testingcommon "open-cluster-management.io/ocm/pkg/common/testing"
|
||||
testinghelpers "open-cluster-management.io/ocm/pkg/registration/helpers/testing"
|
||||
)
|
||||
|
||||
|
||||
@@ -4,8 +4,7 @@ import (
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
testingcommon "open-cluster-management.io/sdk-go/pkg/testing"
|
||||
|
||||
testingcommon "open-cluster-management.io/ocm/pkg/common/testing"
|
||||
testinghelpers "open-cluster-management.io/ocm/pkg/registration/helpers/testing"
|
||||
)
|
||||
|
||||
|
||||
@@ -13,9 +13,8 @@ import (
|
||||
"k8s.io/client-go/tools/clientcmd"
|
||||
clientcmdapi "k8s.io/client-go/tools/clientcmd/api"
|
||||
|
||||
testingcommon "open-cluster-management.io/sdk-go/pkg/testing"
|
||||
|
||||
commonoptions "open-cluster-management.io/ocm/pkg/common/options"
|
||||
testingcommon "open-cluster-management.io/ocm/pkg/common/testing"
|
||||
"open-cluster-management.io/ocm/pkg/registration/clientcert"
|
||||
testinghelpers "open-cluster-management.io/ocm/pkg/registration/helpers/testing"
|
||||
)
|
||||
|
||||
@@ -18,8 +18,8 @@ import (
|
||||
workinformers "open-cluster-management.io/api/client/work/informers/externalversions"
|
||||
clusterv1beta1 "open-cluster-management.io/api/cluster/v1beta1"
|
||||
workapiv1alpha1 "open-cluster-management.io/api/work/v1alpha1"
|
||||
testingcommon "open-cluster-management.io/sdk-go/pkg/testing"
|
||||
|
||||
testingcommon "open-cluster-management.io/ocm/pkg/common/testing"
|
||||
helpertest "open-cluster-management.io/ocm/pkg/work/hub/test"
|
||||
)
|
||||
|
||||
|
||||
@@ -12,8 +12,7 @@ import (
|
||||
fakedynamic "k8s.io/client-go/dynamic/fake"
|
||||
clienttesting "k8s.io/client-go/testing"
|
||||
|
||||
testingcommon "open-cluster-management.io/sdk-go/pkg/testing"
|
||||
|
||||
testingcommon "open-cluster-management.io/ocm/pkg/common/testing"
|
||||
"open-cluster-management.io/ocm/pkg/work/spoke/spoketesting"
|
||||
)
|
||||
|
||||
|
||||
@@ -17,8 +17,8 @@ import (
|
||||
clienttesting "k8s.io/client-go/testing"
|
||||
|
||||
workapiv1 "open-cluster-management.io/api/work/v1"
|
||||
testingcommon "open-cluster-management.io/sdk-go/pkg/testing"
|
||||
|
||||
testingcommon "open-cluster-management.io/ocm/pkg/common/testing"
|
||||
"open-cluster-management.io/ocm/pkg/work/spoke/spoketesting"
|
||||
)
|
||||
|
||||
|
||||
@@ -16,8 +16,7 @@ import (
|
||||
"k8s.io/client-go/kubernetes/fake"
|
||||
clienttesting "k8s.io/client-go/testing"
|
||||
|
||||
testingcommon "open-cluster-management.io/sdk-go/pkg/testing"
|
||||
|
||||
testingcommon "open-cluster-management.io/ocm/pkg/common/testing"
|
||||
"open-cluster-management.io/ocm/pkg/work/spoke/spoketesting"
|
||||
)
|
||||
|
||||
|
||||
@@ -21,8 +21,8 @@ import (
|
||||
workinformers "open-cluster-management.io/api/client/work/informers/externalversions"
|
||||
workapiv1 "open-cluster-management.io/api/work/v1"
|
||||
"open-cluster-management.io/sdk-go/pkg/patcher"
|
||||
testingcommon "open-cluster-management.io/sdk-go/pkg/testing"
|
||||
|
||||
testingcommon "open-cluster-management.io/ocm/pkg/common/testing"
|
||||
"open-cluster-management.io/ocm/pkg/work/helper"
|
||||
"open-cluster-management.io/ocm/pkg/work/spoke/spoketesting"
|
||||
)
|
||||
|
||||
@@ -13,8 +13,8 @@ import (
|
||||
fakeworkclient "open-cluster-management.io/api/client/work/clientset/versioned/fake"
|
||||
workapiv1 "open-cluster-management.io/api/work/v1"
|
||||
"open-cluster-management.io/sdk-go/pkg/patcher"
|
||||
testingcommon "open-cluster-management.io/sdk-go/pkg/testing"
|
||||
|
||||
testingcommon "open-cluster-management.io/ocm/pkg/common/testing"
|
||||
"open-cluster-management.io/ocm/pkg/work/spoke/spoketesting"
|
||||
)
|
||||
|
||||
|
||||
@@ -19,8 +19,8 @@ import (
|
||||
fakeworkclient "open-cluster-management.io/api/client/work/clientset/versioned/fake"
|
||||
workapiv1 "open-cluster-management.io/api/work/v1"
|
||||
"open-cluster-management.io/sdk-go/pkg/patcher"
|
||||
testingcommon "open-cluster-management.io/sdk-go/pkg/testing"
|
||||
|
||||
testingcommon "open-cluster-management.io/ocm/pkg/common/testing"
|
||||
"open-cluster-management.io/ocm/pkg/work/helper"
|
||||
"open-cluster-management.io/ocm/pkg/work/spoke/spoketesting"
|
||||
)
|
||||
|
||||
@@ -15,7 +15,8 @@ import (
|
||||
workinformers "open-cluster-management.io/api/client/work/informers/externalversions"
|
||||
workapiv1 "open-cluster-management.io/api/work/v1"
|
||||
"open-cluster-management.io/sdk-go/pkg/patcher"
|
||||
testingcommon "open-cluster-management.io/sdk-go/pkg/testing"
|
||||
|
||||
testingcommon "open-cluster-management.io/ocm/pkg/common/testing"
|
||||
)
|
||||
|
||||
func TestSyncManifestWorkController(t *testing.T) {
|
||||
|
||||
@@ -14,7 +14,8 @@ import (
|
||||
workinformers "open-cluster-management.io/api/client/work/informers/externalversions"
|
||||
workapiv1 "open-cluster-management.io/api/work/v1"
|
||||
"open-cluster-management.io/sdk-go/pkg/patcher"
|
||||
testingcommon "open-cluster-management.io/sdk-go/pkg/testing"
|
||||
|
||||
testingcommon "open-cluster-management.io/ocm/pkg/common/testing"
|
||||
)
|
||||
|
||||
func TestSyncUnamanagedAppliedWork(t *testing.T) {
|
||||
|
||||
@@ -24,8 +24,8 @@ import (
|
||||
workinformers "open-cluster-management.io/api/client/work/informers/externalversions"
|
||||
workapiv1 "open-cluster-management.io/api/work/v1"
|
||||
"open-cluster-management.io/sdk-go/pkg/patcher"
|
||||
testingcommon "open-cluster-management.io/sdk-go/pkg/testing"
|
||||
|
||||
testingcommon "open-cluster-management.io/ocm/pkg/common/testing"
|
||||
"open-cluster-management.io/ocm/pkg/work/helper"
|
||||
"open-cluster-management.io/ocm/pkg/work/spoke/apply"
|
||||
"open-cluster-management.io/ocm/pkg/work/spoke/auth/basic"
|
||||
|
||||
@@ -18,8 +18,8 @@ import (
|
||||
ocmfeature "open-cluster-management.io/api/feature"
|
||||
workapiv1 "open-cluster-management.io/api/work/v1"
|
||||
"open-cluster-management.io/sdk-go/pkg/patcher"
|
||||
testingcommon "open-cluster-management.io/sdk-go/pkg/testing"
|
||||
|
||||
testingcommon "open-cluster-management.io/ocm/pkg/common/testing"
|
||||
"open-cluster-management.io/ocm/pkg/features"
|
||||
"open-cluster-management.io/ocm/pkg/work/spoke/spoketesting"
|
||||
"open-cluster-management.io/ocm/pkg/work/spoke/statusfeedback"
|
||||
|
||||
2
vendor/modules.txt
vendored
2
vendor/modules.txt
vendored
@@ -1586,7 +1586,6 @@ open-cluster-management.io/sdk-go/pkg/apis/cluster/v1beta1
|
||||
open-cluster-management.io/sdk-go/pkg/apis/cluster/v1beta2
|
||||
open-cluster-management.io/sdk-go/pkg/apis/work/v1/applier
|
||||
open-cluster-management.io/sdk-go/pkg/apis/work/v1/validator
|
||||
open-cluster-management.io/sdk-go/pkg/apply
|
||||
open-cluster-management.io/sdk-go/pkg/cloudevents/generic
|
||||
open-cluster-management.io/sdk-go/pkg/cloudevents/generic/options
|
||||
open-cluster-management.io/sdk-go/pkg/cloudevents/generic/options/mqtt
|
||||
@@ -1601,7 +1600,6 @@ open-cluster-management.io/sdk-go/pkg/cloudevents/work/payload
|
||||
open-cluster-management.io/sdk-go/pkg/cloudevents/work/utils
|
||||
open-cluster-management.io/sdk-go/pkg/cloudevents/work/watcher
|
||||
open-cluster-management.io/sdk-go/pkg/patcher
|
||||
open-cluster-management.io/sdk-go/pkg/testing
|
||||
# sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.28.0
|
||||
## explicit; go 1.20
|
||||
sigs.k8s.io/apiserver-network-proxy/konnectivity-client/pkg/client
|
||||
|
||||
Reference in New Issue
Block a user