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