mirror of
https://github.com/open-cluster-management-io/ocm.git
synced 2026-05-21 00:24:08 +00:00
Fix: delete addon crd at first (#277)
This is to ensure manifestwork of addon is deleted at first. Signed-off-by: Jian Qiu <jqiu@redhat.com> Signed-off-by: Jian Qiu <jqiu@redhat.com>
This commit is contained in:
@@ -35,7 +35,11 @@ import (
|
||||
)
|
||||
|
||||
var (
|
||||
// crdNames is the list of CRDs to be wiped out before deleting other resources when clusterManager is deleted.
|
||||
// The order of the list matters, the managedclusteraddon crd needs to be deleted at first so all addon related
|
||||
// manifestwork is deleted, then other manifestworks.
|
||||
crdNames = []string{
|
||||
"managedclusteraddons.addon.open-cluster-management.io",
|
||||
"manifestworks.work.open-cluster-management.io",
|
||||
"managedclusters.cluster.open-cluster-management.io",
|
||||
}
|
||||
|
||||
@@ -222,7 +222,7 @@ func TestSyncDelete(t *testing.T) {
|
||||
}
|
||||
}
|
||||
// Check if resources are created as expected
|
||||
testinghelper.AssertEqualNumber(t, len(deleteCRDActions), 12)
|
||||
testinghelper.AssertEqualNumber(t, len(deleteCRDActions), 13)
|
||||
|
||||
deleteAPIServiceActions := []clienttesting.DeleteActionImpl{}
|
||||
apiServiceActions := tc.apiRegistrationClient.Actions()
|
||||
|
||||
Reference in New Issue
Block a user