@@ -1297,13 +1297,15 @@ func TestApiResourceFormatting(t *testing.T) {
12971297}
12981298
12991299func TestNomosMigrate (t * testing.T ) {
1300- nt := nomostest .New (t , nomostesting .NomosCLI , ntopts . SkipConfigSyncInstall )
1300+ nt := nomostest .New (t , nomostesting .NomosCLI )
13011301
13021302 nt .T .Cleanup (func () {
13031303 // Restore state of Config Sync installation after test
1304- if err := nomostest .InstallConfigSync (nt ); err != nil {
1304+ if err := nomostest .InstallConfigSyncFromManifest (nt ); err != nil {
13051305 nt .T .Fatal (err )
13061306 }
1307+ // Check that reconciler-manager is properly recreated after Config Sync installation
1308+ nt .Must (nt .WatchForAllSyncs ())
13071309 })
13081310 nt .T .Cleanup (func () {
13091311 cmObj := & unstructured.Unstructured {
@@ -1451,11 +1453,11 @@ func TestNomosMigrate(t *testing.T) {
14511453 configmanagement .RGControllerName , configmanagement .RGControllerNamespace )
14521454 })
14531455 tg .Go (func () error {
1454- return nt .Watcher .WatchForNotFound (kinds .Deployment (),
1456+ return nt .Watcher .WatchForCurrentStatus (kinds .Deployment (),
14551457 core .RootReconcilerName (configsync .RootSyncName ), configsync .ControllerNamespace )
14561458 })
14571459 tg .Go (func () error {
1458- return nt .Watcher .WatchForNotFound (kinds .RootSyncV1Beta1 (),
1460+ return nt .Watcher .WatchForCurrentStatus (kinds .RootSyncV1Beta1 (),
14591461 configsync .RootSyncName , configsync .ControllerNamespace )
14601462 })
14611463 if err := tg .Wait (); err != nil {
@@ -1464,14 +1466,15 @@ func TestNomosMigrate(t *testing.T) {
14641466}
14651467
14661468func TestNomosMigrateMonoRepo (t * testing.T ) {
1467- nt := nomostest .New (t , nomostesting .NomosCLI , ntopts . SkipConfigSyncInstall )
1469+ nt := nomostest .New (t , nomostesting .NomosCLI )
14681470
14691471 nt .T .Cleanup (func () {
14701472 // Restore state of Config Sync installation after test.
1471- // This also emulates upgrading to the current version after migrating
1472- if err := nomostest .InstallConfigSync (nt ); err != nil {
1473+ if err := nomostest .InstallConfigSyncFromManifest (nt ); err != nil {
14731474 nt .T .Fatal (err )
14741475 }
1476+ // Check that Reconciler-manager is properly recreated after Config Sync installation
1477+ nt .Must (nt .WatchForAllSyncs ())
14751478 })
14761479 nt .T .Cleanup (func () {
14771480 crds := []string {
@@ -1707,13 +1710,15 @@ func TestNomosMigrateMonoRepo(t *testing.T) {
17071710// This test case validates the behavior of the uninstall script defined
17081711// at installation/uninstall_configmanagement.sh
17091712func TestACMUninstallScript (t * testing.T ) {
1710- nt := nomostest .New (t , nomostesting .NomosCLI , ntopts . SkipConfigSyncInstall )
1713+ nt := nomostest .New (t , nomostesting .NomosCLI )
17111714
17121715 nt .T .Cleanup (func () {
17131716 // Restore state of Config Sync installation after test
1714- if err := nomostest .InstallConfigSync (nt ); err != nil {
1717+ if err := nomostest .InstallConfigSyncFromManifest (nt ); err != nil {
17151718 nt .T .Fatal (err )
17161719 }
1720+ // Check that reconciler-manager is properly recreated after Config Sync installation
1721+ nt .Must (nt .WatchForAllSyncs ())
17171722 })
17181723 nt .T .Cleanup (func () {
17191724 cmObj := & unstructured.Unstructured {
@@ -1861,11 +1866,11 @@ func TestACMUninstallScript(t *testing.T) {
18611866 configmanagement .RGControllerName , configmanagement .RGControllerNamespace )
18621867 })
18631868 tg .Go (func () error {
1864- return nt .Watcher .WatchForNotFound (kinds .Deployment (),
1869+ return nt .Watcher .WatchForCurrentStatus (kinds .Deployment (),
18651870 core .RootReconcilerName (configsync .RootSyncName ), configsync .ControllerNamespace )
18661871 })
18671872 tg .Go (func () error {
1868- return nt .Watcher .WatchForNotFound (kinds .RootSyncV1Beta1 (),
1873+ return nt .Watcher .WatchForCurrentStatus (kinds .RootSyncV1Beta1 (),
18691874 configsync .RootSyncName , configsync .ControllerNamespace )
18701875 })
18711876 if err := tg .Wait (); err != nil {
0 commit comments