@@ -1297,13 +1297,14 @@ 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+ nt .Must (nt .WatchForAllSyncs ())
13071308 })
13081309 nt .T .Cleanup (func () {
13091310 cmObj := & unstructured.Unstructured {
@@ -1451,11 +1452,11 @@ func TestNomosMigrate(t *testing.T) {
14511452 configmanagement .RGControllerName , configmanagement .RGControllerNamespace )
14521453 })
14531454 tg .Go (func () error {
1454- return nt .Watcher .WatchForNotFound (kinds .Deployment (),
1455+ return nt .Watcher .WatchForCurrentStatus (kinds .Deployment (),
14551456 core .RootReconcilerName (configsync .RootSyncName ), configsync .ControllerNamespace )
14561457 })
14571458 tg .Go (func () error {
1458- return nt .Watcher .WatchForNotFound (kinds .RootSyncV1Beta1 (),
1459+ return nt .Watcher .WatchForCurrentStatus (kinds .RootSyncV1Beta1 (),
14591460 configsync .RootSyncName , configsync .ControllerNamespace )
14601461 })
14611462 if err := tg .Wait (); err != nil {
@@ -1464,14 +1465,14 @@ func TestNomosMigrate(t *testing.T) {
14641465}
14651466
14661467func TestNomosMigrateMonoRepo (t * testing.T ) {
1467- nt := nomostest .New (t , nomostesting .NomosCLI , ntopts . SkipConfigSyncInstall )
1468+ nt := nomostest .New (t , nomostesting .NomosCLI )
14681469
14691470 nt .T .Cleanup (func () {
14701471 // 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 {
1472+ if err := nomostest .InstallConfigSyncFromManifest (nt ); err != nil {
14731473 nt .T .Fatal (err )
14741474 }
1475+ nt .Must (nt .WatchForAllSyncs ())
14751476 })
14761477 nt .T .Cleanup (func () {
14771478 crds := []string {
@@ -1707,13 +1708,14 @@ func TestNomosMigrateMonoRepo(t *testing.T) {
17071708// This test case validates the behavior of the uninstall script defined
17081709// at installation/uninstall_configmanagement.sh
17091710func TestACMUninstallScript (t * testing.T ) {
1710- nt := nomostest .New (t , nomostesting .NomosCLI , ntopts . SkipConfigSyncInstall )
1711+ nt := nomostest .New (t , nomostesting .NomosCLI )
17111712
17121713 nt .T .Cleanup (func () {
17131714 // Restore state of Config Sync installation after test
1714- if err := nomostest .InstallConfigSync (nt ); err != nil {
1715+ if err := nomostest .InstallConfigSyncFromManifest (nt ); err != nil {
17151716 nt .T .Fatal (err )
17161717 }
1718+ nt .Must (nt .WatchForAllSyncs ())
17171719 })
17181720 nt .T .Cleanup (func () {
17191721 cmObj := & unstructured.Unstructured {
@@ -1861,11 +1863,11 @@ func TestACMUninstallScript(t *testing.T) {
18611863 configmanagement .RGControllerName , configmanagement .RGControllerNamespace )
18621864 })
18631865 tg .Go (func () error {
1864- return nt .Watcher .WatchForNotFound (kinds .Deployment (),
1866+ return nt .Watcher .WatchForCurrentStatus (kinds .Deployment (),
18651867 core .RootReconcilerName (configsync .RootSyncName ), configsync .ControllerNamespace )
18661868 })
18671869 tg .Go (func () error {
1868- return nt .Watcher .WatchForNotFound (kinds .RootSyncV1Beta1 (),
1870+ return nt .Watcher .WatchForCurrentStatus (kinds .RootSyncV1Beta1 (),
18691871 configsync .RootSyncName , configsync .ControllerNamespace )
18701872 })
18711873 if err := tg .Wait (); err != nil {
0 commit comments