@@ -1302,6 +1302,20 @@ func TestNomosMigrate(t *testing.T) {
13021302
13031303 nt .T .Cleanup (func () {
13041304 // Restore state of Config Sync installation after test
1305+ rmDeployment := k8sobjects .DeploymentObject (
1306+ core .Name (reconcilermanager .ManagerName ),
1307+ core .Namespace (configsync .ControllerNamespace ),
1308+ )
1309+ rgDeployment := k8sobjects .DeploymentObject (
1310+ core .Name (configmanagement .RGControllerName ),
1311+ core .Namespace (configmanagement .RGControllerNamespace ),
1312+ )
1313+ if err := nt .KubeClient .Delete (rmDeployment ); err != nil && ! apierrors .IsNotFound (err ) {
1314+ nt .T .Error (err )
1315+ }
1316+ if err := nt .KubeClient .Delete (rgDeployment ); err != nil && ! apierrors .IsNotFound (err ) {
1317+ nt .T .Error (err )
1318+ }
13051319 if err := nomostest .InstallConfigSyncFromManifest (nt ); err != nil {
13061320 nt .T .Fatal (err )
13071321 }
@@ -1469,6 +1483,20 @@ func TestNomosMigrateMonoRepo(t *testing.T) {
14691483
14701484 nt .T .Cleanup (func () {
14711485 // Restore state of Config Sync installation after test.
1486+ rmDeployment := k8sobjects .DeploymentObject (
1487+ core .Name (reconcilermanager .ManagerName ),
1488+ core .Namespace (configsync .ControllerNamespace ),
1489+ )
1490+ rgDeployment := k8sobjects .DeploymentObject (
1491+ core .Name (configmanagement .RGControllerName ),
1492+ core .Namespace (configmanagement .RGControllerNamespace ),
1493+ )
1494+ if err := nt .KubeClient .Delete (rmDeployment ); err != nil && ! apierrors .IsNotFound (err ) {
1495+ nt .T .Error (err )
1496+ }
1497+ if err := nt .KubeClient .Delete (rgDeployment ); err != nil && ! apierrors .IsNotFound (err ) {
1498+ nt .T .Error (err )
1499+ }
14721500 if err := nomostest .InstallConfigSyncFromManifest (nt ); err != nil {
14731501 nt .T .Fatal (err )
14741502 }
@@ -1711,6 +1739,20 @@ func TestACMUninstallScript(t *testing.T) {
17111739
17121740 nt .T .Cleanup (func () {
17131741 // Restore state of Config Sync installation after test
1742+ rmDeployment := k8sobjects .DeploymentObject (
1743+ core .Name (reconcilermanager .ManagerName ),
1744+ core .Namespace (configsync .ControllerNamespace ),
1745+ )
1746+ rgDeployment := k8sobjects .DeploymentObject (
1747+ core .Name (configmanagement .RGControllerName ),
1748+ core .Namespace (configmanagement .RGControllerNamespace ),
1749+ )
1750+ if err := nt .KubeClient .Delete (rmDeployment ); err != nil && ! apierrors .IsNotFound (err ) {
1751+ nt .T .Error (err )
1752+ }
1753+ if err := nt .KubeClient .Delete (rgDeployment ); err != nil && ! apierrors .IsNotFound (err ) {
1754+ nt .T .Error (err )
1755+ }
17141756 if err := nomostest .InstallConfigSyncFromManifest (nt ); err != nil {
17151757 nt .T .Fatal (err )
17161758 }
0 commit comments