@@ -57,23 +57,6 @@ type testScenario struct {
57
57
work func (ctx context.Context , t * testing.T , server framework.RunningServer , kcpShardClusterDynamicClient kcpdynamic.ClusterInterface , cacheKcpClusterDynamicClient kcpdynamic.ClusterInterface )
58
58
}
59
59
60
- // scenarios all test scenarios that will be run against an environment provided by the test binary.
61
- var scenarios = []testScenario {
62
- {"TestReplicateAPIExport" , replicateAPIExportScenario },
63
- {"TestReplicateAPIExportNegative" , replicateAPIExportNegativeScenario },
64
- {"TestReplicateAPIResourceSchema" , replicateAPIResourceSchemaScenario },
65
- {"TestReplicateAPIResourceSchemaNegative" , replicateAPIResourceSchemaNegativeScenario },
66
- {"TestReplicateWorkspaceType" , replicateWorkspaceTypeScenario },
67
- {"TestReplicateWorkspaceTypeNegative" , replicateWorkspaceTypeNegativeScenario },
68
- }
69
-
70
- // disruptiveScenarios contains a list of scenarios that will be run in a private environment
71
- // so that they don't disrupt other tests.
72
- var disruptiveScenarios = []testScenario {
73
- {"TestReplicateShard" , replicateShardScenario },
74
- {"TestReplicateShardNegative" , replicateShardNegativeScenario },
75
- }
76
-
77
60
// replicateAPIResourceSchemaScenario tests if an APIResourceSchema is propagated to the cache server.
78
61
// The test exercises creation, modification and removal of the APIResourceSchema object.
79
62
func replicateAPIResourceSchemaScenario (ctx context.Context , t * testing.T , server framework.RunningServer , kcpShardClusterDynamicClient kcpdynamic.ClusterInterface , cacheKcpClusterDynamicClient kcpdynamic.ClusterInterface ) {
@@ -436,6 +419,14 @@ func TestReplication(t *testing.T) {
436
419
cacheKcpClusterDynamicClient , err := kcpdynamic .NewForConfig (cacheClientRT )
437
420
require .NoError (t , err )
438
421
422
+ scenarios := []testScenario {
423
+ {"APIExport" , replicateAPIExportScenario },
424
+ {"APIExportNegative" , replicateAPIExportNegativeScenario },
425
+ {"APIResourceSchema" , replicateAPIResourceSchemaScenario },
426
+ {"APIResourceSchemaNegative" , replicateAPIResourceSchemaNegativeScenario },
427
+ {"WorkspaceType" , replicateWorkspaceTypeScenario },
428
+ {"WorkspaceTypeNegative" , replicateWorkspaceTypeNegativeScenario },
429
+ }
439
430
for _ , scenario := range scenarios {
440
431
scenario := scenario
441
432
t .Run (scenario .name , func (t * testing.T ) {
@@ -450,6 +441,10 @@ func TestReplicationDisruptive(t *testing.T) {
450
441
t .Parallel ()
451
442
framework .Suite (t , "control-plane" )
452
443
444
+ disruptiveScenarios := []testScenario {
445
+ {"Shard" , replicateShardScenario },
446
+ {"ShardNegative" , replicateShardNegativeScenario },
447
+ }
453
448
for _ , scenario := range disruptiveScenarios {
454
449
scenario := scenario
455
450
0 commit comments