@@ -1297,13 +1297,15 @@ func TestApiResourceFormatting(t *testing.T) {
1297
1297
}
1298
1298
1299
1299
func TestNomosMigrate (t * testing.T ) {
1300
- nt := nomostest .New (t , nomostesting .NomosCLI , ntopts . SkipConfigSyncInstall )
1300
+ nt := nomostest .New (t , nomostesting .NomosCLI )
1301
1301
1302
1302
nt .T .Cleanup (func () {
1303
1303
// Restore state of Config Sync installation after test
1304
- if err := nomostest .InstallConfigSync (nt ); err != nil {
1304
+ if err := nomostest .InstallConfigSyncFromManifest (nt ); err != nil {
1305
1305
nt .T .Fatal (err )
1306
1306
}
1307
+ // Check that reconciler-manager is properly recreated after Config Sync installation
1308
+ nt .Must (nt .WatchForAllSyncs ())
1307
1309
})
1308
1310
nt .T .Cleanup (func () {
1309
1311
cmObj := & unstructured.Unstructured {
@@ -1451,11 +1453,11 @@ func TestNomosMigrate(t *testing.T) {
1451
1453
configmanagement .RGControllerName , configmanagement .RGControllerNamespace )
1452
1454
})
1453
1455
tg .Go (func () error {
1454
- return nt .Watcher .WatchForNotFound (kinds .Deployment (),
1456
+ return nt .Watcher .WatchForCurrentStatus (kinds .Deployment (),
1455
1457
core .RootReconcilerName (configsync .RootSyncName ), configsync .ControllerNamespace )
1456
1458
})
1457
1459
tg .Go (func () error {
1458
- return nt .Watcher .WatchForNotFound (kinds .RootSyncV1Beta1 (),
1460
+ return nt .Watcher .WatchForCurrentStatus (kinds .RootSyncV1Beta1 (),
1459
1461
configsync .RootSyncName , configsync .ControllerNamespace )
1460
1462
})
1461
1463
if err := tg .Wait (); err != nil {
@@ -1464,14 +1466,15 @@ func TestNomosMigrate(t *testing.T) {
1464
1466
}
1465
1467
1466
1468
func TestNomosMigrateMonoRepo (t * testing.T ) {
1467
- nt := nomostest .New (t , nomostesting .NomosCLI , ntopts . SkipConfigSyncInstall )
1469
+ nt := nomostest .New (t , nomostesting .NomosCLI )
1468
1470
1469
1471
nt .T .Cleanup (func () {
1470
1472
// 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 {
1473
1474
nt .T .Fatal (err )
1474
1475
}
1476
+ // Check that Reconciler-manager is properly recreated after Config Sync installation
1477
+ nt .Must (nt .WatchForAllSyncs ())
1475
1478
})
1476
1479
nt .T .Cleanup (func () {
1477
1480
crds := []string {
@@ -1707,13 +1710,15 @@ func TestNomosMigrateMonoRepo(t *testing.T) {
1707
1710
// This test case validates the behavior of the uninstall script defined
1708
1711
// at installation/uninstall_configmanagement.sh
1709
1712
func TestACMUninstallScript (t * testing.T ) {
1710
- nt := nomostest .New (t , nomostesting .NomosCLI , ntopts . SkipConfigSyncInstall )
1713
+ nt := nomostest .New (t , nomostesting .NomosCLI )
1711
1714
1712
1715
nt .T .Cleanup (func () {
1713
1716
// Restore state of Config Sync installation after test
1714
- if err := nomostest .InstallConfigSync (nt ); err != nil {
1717
+ if err := nomostest .InstallConfigSyncFromManifest (nt ); err != nil {
1715
1718
nt .T .Fatal (err )
1716
1719
}
1720
+ // Check that reconciler-manager is properly recreated after Config Sync installation
1721
+ nt .Must (nt .WatchForAllSyncs ())
1717
1722
})
1718
1723
nt .T .Cleanup (func () {
1719
1724
cmObj := & unstructured.Unstructured {
@@ -1861,11 +1866,11 @@ func TestACMUninstallScript(t *testing.T) {
1861
1866
configmanagement .RGControllerName , configmanagement .RGControllerNamespace )
1862
1867
})
1863
1868
tg .Go (func () error {
1864
- return nt .Watcher .WatchForNotFound (kinds .Deployment (),
1869
+ return nt .Watcher .WatchForCurrentStatus (kinds .Deployment (),
1865
1870
core .RootReconcilerName (configsync .RootSyncName ), configsync .ControllerNamespace )
1866
1871
})
1867
1872
tg .Go (func () error {
1868
- return nt .Watcher .WatchForNotFound (kinds .RootSyncV1Beta1 (),
1873
+ return nt .Watcher .WatchForCurrentStatus (kinds .RootSyncV1Beta1 (),
1869
1874
configsync .RootSyncName , configsync .ControllerNamespace )
1870
1875
})
1871
1876
if err := tg .Wait (); err != nil {
0 commit comments