Skip to content

Commit 3c4bfee

Browse files
Joeavaikathclaude
andcommitted
Update TestProcessBackupCompletions for wildcard normalization
Add IncludedNamespaces: []string{"*"} to all expected BackupSpec structs, reflecting the new prepareBackupRequest normalization. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Signed-off-by: Joseph <jvaikath@redhat.com>
1 parent 94c8622 commit 3c4bfee

1 file changed

Lines changed: 19 additions & 0 deletions

File tree

pkg/controller/backup_controller_test.go

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -737,6 +737,7 @@ func TestProcessBackupCompletions(t *testing.T) {
737737
},
738738
Spec: velerov1api.BackupSpec{
739739
StorageLocation: defaultBackupLocation.Name,
740+
IncludedNamespaces: []string{"*"},
740741
DefaultVolumesToFsBackup: boolptr.True(),
741742
SnapshotMoveData: boolptr.False(),
742743
ExcludedClusterScopedResources: autoExcludeClusterScopedResources,
@@ -776,6 +777,7 @@ func TestProcessBackupCompletions(t *testing.T) {
776777
},
777778
Spec: velerov1api.BackupSpec{
778779
StorageLocation: "alt-loc",
780+
IncludedNamespaces: []string{"*"},
779781
DefaultVolumesToFsBackup: boolptr.False(),
780782
SnapshotMoveData: boolptr.False(),
781783
ExcludedClusterScopedResources: autoExcludeClusterScopedResources,
@@ -819,6 +821,7 @@ func TestProcessBackupCompletions(t *testing.T) {
819821
},
820822
Spec: velerov1api.BackupSpec{
821823
StorageLocation: "read-write",
824+
IncludedNamespaces: []string{"*"},
822825
DefaultVolumesToFsBackup: boolptr.True(),
823826
SnapshotMoveData: boolptr.False(),
824827
ExcludedClusterScopedResources: autoExcludeClusterScopedResources,
@@ -859,6 +862,7 @@ func TestProcessBackupCompletions(t *testing.T) {
859862
Spec: velerov1api.BackupSpec{
860863
TTL: metav1.Duration{Duration: 10 * time.Minute},
861864
StorageLocation: defaultBackupLocation.Name,
865+
IncludedNamespaces: []string{"*"},
862866
DefaultVolumesToFsBackup: boolptr.False(),
863867
SnapshotMoveData: boolptr.False(),
864868
ExcludedClusterScopedResources: autoExcludeClusterScopedResources,
@@ -899,6 +903,7 @@ func TestProcessBackupCompletions(t *testing.T) {
899903
},
900904
Spec: velerov1api.BackupSpec{
901905
StorageLocation: defaultBackupLocation.Name,
906+
IncludedNamespaces: []string{"*"},
902907
DefaultVolumesToFsBackup: boolptr.True(),
903908
SnapshotMoveData: boolptr.False(),
904909
ExcludedClusterScopedResources: autoExcludeClusterScopedResources,
@@ -940,6 +945,7 @@ func TestProcessBackupCompletions(t *testing.T) {
940945
},
941946
Spec: velerov1api.BackupSpec{
942947
StorageLocation: defaultBackupLocation.Name,
948+
IncludedNamespaces: []string{"*"},
943949
DefaultVolumesToFsBackup: boolptr.False(),
944950
SnapshotMoveData: boolptr.False(),
945951
ExcludedClusterScopedResources: autoExcludeClusterScopedResources,
@@ -981,6 +987,7 @@ func TestProcessBackupCompletions(t *testing.T) {
981987
},
982988
Spec: velerov1api.BackupSpec{
983989
StorageLocation: defaultBackupLocation.Name,
990+
IncludedNamespaces: []string{"*"},
984991
DefaultVolumesToFsBackup: boolptr.True(),
985992
SnapshotMoveData: boolptr.False(),
986993
ExcludedClusterScopedResources: autoExcludeClusterScopedResources,
@@ -1022,6 +1029,7 @@ func TestProcessBackupCompletions(t *testing.T) {
10221029
},
10231030
Spec: velerov1api.BackupSpec{
10241031
StorageLocation: defaultBackupLocation.Name,
1032+
IncludedNamespaces: []string{"*"},
10251033
DefaultVolumesToFsBackup: boolptr.True(),
10261034
SnapshotMoveData: boolptr.False(),
10271035
ExcludedClusterScopedResources: autoExcludeClusterScopedResources,
@@ -1063,6 +1071,7 @@ func TestProcessBackupCompletions(t *testing.T) {
10631071
},
10641072
Spec: velerov1api.BackupSpec{
10651073
StorageLocation: defaultBackupLocation.Name,
1074+
IncludedNamespaces: []string{"*"},
10661075
DefaultVolumesToFsBackup: boolptr.False(),
10671076
SnapshotMoveData: boolptr.False(),
10681077
ExcludedClusterScopedResources: autoExcludeClusterScopedResources,
@@ -1105,6 +1114,7 @@ func TestProcessBackupCompletions(t *testing.T) {
11051114
},
11061115
Spec: velerov1api.BackupSpec{
11071116
StorageLocation: defaultBackupLocation.Name,
1117+
IncludedNamespaces: []string{"*"},
11081118
DefaultVolumesToFsBackup: boolptr.True(),
11091119
SnapshotMoveData: boolptr.False(),
11101120
ExcludedClusterScopedResources: autoExcludeClusterScopedResources,
@@ -1147,6 +1157,7 @@ func TestProcessBackupCompletions(t *testing.T) {
11471157
},
11481158
Spec: velerov1api.BackupSpec{
11491159
StorageLocation: defaultBackupLocation.Name,
1160+
IncludedNamespaces: []string{"*"},
11501161
DefaultVolumesToFsBackup: boolptr.True(),
11511162
SnapshotMoveData: boolptr.False(),
11521163
ExcludedClusterScopedResources: autoExcludeClusterScopedResources,
@@ -1189,6 +1200,7 @@ func TestProcessBackupCompletions(t *testing.T) {
11891200
},
11901201
Spec: velerov1api.BackupSpec{
11911202
StorageLocation: defaultBackupLocation.Name,
1203+
IncludedNamespaces: []string{"*"},
11921204
DefaultVolumesToFsBackup: boolptr.False(),
11931205
SnapshotMoveData: boolptr.True(),
11941206
ExcludedClusterScopedResources: autoExcludeClusterScopedResources,
@@ -1232,6 +1244,7 @@ func TestProcessBackupCompletions(t *testing.T) {
12321244
},
12331245
Spec: velerov1api.BackupSpec{
12341246
StorageLocation: defaultBackupLocation.Name,
1247+
IncludedNamespaces: []string{"*"},
12351248
DefaultVolumesToFsBackup: boolptr.False(),
12361249
SnapshotMoveData: boolptr.False(),
12371250
ExcludedClusterScopedResources: autoExcludeClusterScopedResources,
@@ -1275,6 +1288,7 @@ func TestProcessBackupCompletions(t *testing.T) {
12751288
},
12761289
Spec: velerov1api.BackupSpec{
12771290
StorageLocation: defaultBackupLocation.Name,
1291+
IncludedNamespaces: []string{"*"},
12781292
DefaultVolumesToFsBackup: boolptr.False(),
12791293
SnapshotMoveData: boolptr.False(),
12801294
ExcludedClusterScopedResources: autoExcludeClusterScopedResources,
@@ -1318,6 +1332,7 @@ func TestProcessBackupCompletions(t *testing.T) {
13181332
},
13191333
Spec: velerov1api.BackupSpec{
13201334
StorageLocation: defaultBackupLocation.Name,
1335+
IncludedNamespaces: []string{"*"},
13211336
DefaultVolumesToFsBackup: boolptr.False(),
13221337
SnapshotMoveData: boolptr.True(),
13231338
ExcludedClusterScopedResources: autoExcludeClusterScopedResources,
@@ -1362,6 +1377,7 @@ func TestProcessBackupCompletions(t *testing.T) {
13621377
},
13631378
Spec: velerov1api.BackupSpec{
13641379
StorageLocation: defaultBackupLocation.Name,
1380+
IncludedNamespaces: []string{"*"},
13651381
DefaultVolumesToFsBackup: boolptr.False(),
13661382
SnapshotMoveData: boolptr.False(),
13671383
ExcludedClusterScopedResources: autoExcludeClusterScopedResources,
@@ -1405,6 +1421,7 @@ func TestProcessBackupCompletions(t *testing.T) {
14051421
},
14061422
Spec: velerov1api.BackupSpec{
14071423
StorageLocation: defaultBackupLocation.Name,
1424+
IncludedNamespaces: []string{"*"},
14081425
DefaultVolumesToFsBackup: boolptr.False(),
14091426
SnapshotMoveData: boolptr.True(),
14101427
ExcludedClusterScopedResources: autoExcludeClusterScopedResources,
@@ -1452,6 +1469,7 @@ func TestProcessBackupCompletions(t *testing.T) {
14521469
},
14531470
Spec: velerov1api.BackupSpec{
14541471
StorageLocation: defaultBackupLocation.Name,
1472+
IncludedNamespaces: []string{"*"},
14551473
DefaultVolumesToFsBackup: boolptr.False(),
14561474
SnapshotMoveData: boolptr.True(),
14571475
IncludedClusterScopedResources: []string{"storageclasses"},
@@ -1501,6 +1519,7 @@ func TestProcessBackupCompletions(t *testing.T) {
15011519
},
15021520
Spec: velerov1api.BackupSpec{
15031521
StorageLocation: defaultBackupLocation.Name,
1522+
IncludedNamespaces: []string{"*"},
15041523
DefaultVolumesToFsBackup: boolptr.False(),
15051524
SnapshotMoveData: boolptr.True(),
15061525
IncludedClusterScopedResources: []string{"storageclasses"},

0 commit comments

Comments
 (0)