@@ -35,14 +35,14 @@ func TestServerGroupSpecValidateCount(t *testing.T) {
35
35
assert .Nil (t , ServerGroupSpec {Count : util .NewInt (0 )}.Validate (ServerGroupSingle , false , DeploymentModeCluster , EnvironmentDevelopment ))
36
36
assert .Nil (t , ServerGroupSpec {Count : util .NewInt (1 )}.Validate (ServerGroupAgents , true , DeploymentModeCluster , EnvironmentDevelopment ))
37
37
assert .Nil (t , ServerGroupSpec {Count : util .NewInt (3 )}.Validate (ServerGroupAgents , true , DeploymentModeCluster , EnvironmentDevelopment ))
38
- assert .Nil (t , ServerGroupSpec {Count : util .NewInt (1 )}.Validate (ServerGroupAgents , true , DeploymentModeResilientSingle , EnvironmentDevelopment ))
39
- assert .Nil (t , ServerGroupSpec {Count : util .NewInt (3 )}.Validate (ServerGroupAgents , true , DeploymentModeResilientSingle , EnvironmentDevelopment ))
38
+ assert .Nil (t , ServerGroupSpec {Count : util .NewInt (1 )}.Validate (ServerGroupAgents , true , DeploymentModeActiveFailover , EnvironmentDevelopment ))
39
+ assert .Nil (t , ServerGroupSpec {Count : util .NewInt (3 )}.Validate (ServerGroupAgents , true , DeploymentModeActiveFailover , EnvironmentDevelopment ))
40
40
assert .Nil (t , ServerGroupSpec {Count : util .NewInt (1 )}.Validate (ServerGroupDBServers , true , DeploymentModeCluster , EnvironmentDevelopment ))
41
41
assert .Nil (t , ServerGroupSpec {Count : util .NewInt (6 )}.Validate (ServerGroupDBServers , true , DeploymentModeCluster , EnvironmentDevelopment ))
42
42
assert .Nil (t , ServerGroupSpec {Count : util .NewInt (1 )}.Validate (ServerGroupCoordinators , true , DeploymentModeCluster , EnvironmentDevelopment ))
43
43
assert .Nil (t , ServerGroupSpec {Count : util .NewInt (2 )}.Validate (ServerGroupCoordinators , true , DeploymentModeCluster , EnvironmentDevelopment ))
44
44
assert .Nil (t , ServerGroupSpec {Count : util .NewInt (3 )}.Validate (ServerGroupAgents , true , DeploymentModeCluster , EnvironmentProduction ))
45
- assert .Nil (t , ServerGroupSpec {Count : util .NewInt (3 )}.Validate (ServerGroupAgents , true , DeploymentModeResilientSingle , EnvironmentProduction ))
45
+ assert .Nil (t , ServerGroupSpec {Count : util .NewInt (3 )}.Validate (ServerGroupAgents , true , DeploymentModeActiveFailover , EnvironmentProduction ))
46
46
assert .Nil (t , ServerGroupSpec {Count : util .NewInt (2 )}.Validate (ServerGroupDBServers , true , DeploymentModeCluster , EnvironmentProduction ))
47
47
assert .Nil (t , ServerGroupSpec {Count : util .NewInt (2 )}.Validate (ServerGroupCoordinators , true , DeploymentModeCluster , EnvironmentProduction ))
48
48
assert .Nil (t , ServerGroupSpec {Count : util .NewInt (2 )}.Validate (ServerGroupSyncMasters , true , DeploymentModeCluster , EnvironmentProduction ))
@@ -51,21 +51,21 @@ func TestServerGroupSpecValidateCount(t *testing.T) {
51
51
// Invalid
52
52
assert .Error (t , ServerGroupSpec {Count : util .NewInt (1 )}.Validate (ServerGroupSingle , false , DeploymentModeCluster , EnvironmentDevelopment ))
53
53
assert .Error (t , ServerGroupSpec {Count : util .NewInt (2 )}.Validate (ServerGroupSingle , true , DeploymentModeSingle , EnvironmentDevelopment ))
54
- assert .Error (t , ServerGroupSpec {Count : util .NewInt (1 )}.Validate (ServerGroupSingle , true , DeploymentModeResilientSingle , EnvironmentProduction ))
54
+ assert .Error (t , ServerGroupSpec {Count : util .NewInt (1 )}.Validate (ServerGroupSingle , true , DeploymentModeActiveFailover , EnvironmentProduction ))
55
55
assert .Error (t , ServerGroupSpec {Count : util .NewInt (0 )}.Validate (ServerGroupAgents , true , DeploymentModeCluster , EnvironmentDevelopment ))
56
- assert .Error (t , ServerGroupSpec {Count : util .NewInt (0 )}.Validate (ServerGroupAgents , true , DeploymentModeResilientSingle , EnvironmentDevelopment ))
56
+ assert .Error (t , ServerGroupSpec {Count : util .NewInt (0 )}.Validate (ServerGroupAgents , true , DeploymentModeActiveFailover , EnvironmentDevelopment ))
57
57
assert .Error (t , ServerGroupSpec {Count : util .NewInt (0 )}.Validate (ServerGroupDBServers , true , DeploymentModeCluster , EnvironmentDevelopment ))
58
58
assert .Error (t , ServerGroupSpec {Count : util .NewInt (0 )}.Validate (ServerGroupCoordinators , true , DeploymentModeCluster , EnvironmentDevelopment ))
59
59
assert .Error (t , ServerGroupSpec {Count : util .NewInt (0 )}.Validate (ServerGroupSyncMasters , true , DeploymentModeCluster , EnvironmentDevelopment ))
60
60
assert .Error (t , ServerGroupSpec {Count : util .NewInt (0 )}.Validate (ServerGroupSyncWorkers , true , DeploymentModeCluster , EnvironmentDevelopment ))
61
61
assert .Error (t , ServerGroupSpec {Count : util .NewInt (- 1 )}.Validate (ServerGroupAgents , true , DeploymentModeCluster , EnvironmentDevelopment ))
62
- assert .Error (t , ServerGroupSpec {Count : util .NewInt (- 1 )}.Validate (ServerGroupAgents , true , DeploymentModeResilientSingle , EnvironmentDevelopment ))
62
+ assert .Error (t , ServerGroupSpec {Count : util .NewInt (- 1 )}.Validate (ServerGroupAgents , true , DeploymentModeActiveFailover , EnvironmentDevelopment ))
63
63
assert .Error (t , ServerGroupSpec {Count : util .NewInt (- 1 )}.Validate (ServerGroupDBServers , true , DeploymentModeCluster , EnvironmentDevelopment ))
64
64
assert .Error (t , ServerGroupSpec {Count : util .NewInt (- 1 )}.Validate (ServerGroupCoordinators , true , DeploymentModeCluster , EnvironmentDevelopment ))
65
65
assert .Error (t , ServerGroupSpec {Count : util .NewInt (- 1 )}.Validate (ServerGroupSyncMasters , true , DeploymentModeCluster , EnvironmentDevelopment ))
66
66
assert .Error (t , ServerGroupSpec {Count : util .NewInt (- 1 )}.Validate (ServerGroupSyncWorkers , true , DeploymentModeCluster , EnvironmentDevelopment ))
67
67
assert .Error (t , ServerGroupSpec {Count : util .NewInt (2 )}.Validate (ServerGroupAgents , true , DeploymentModeCluster , EnvironmentProduction ))
68
- assert .Error (t , ServerGroupSpec {Count : util .NewInt (2 )}.Validate (ServerGroupAgents , true , DeploymentModeResilientSingle , EnvironmentProduction ))
68
+ assert .Error (t , ServerGroupSpec {Count : util .NewInt (2 )}.Validate (ServerGroupAgents , true , DeploymentModeActiveFailover , EnvironmentProduction ))
69
69
assert .Error (t , ServerGroupSpec {Count : util .NewInt (1 )}.Validate (ServerGroupDBServers , true , DeploymentModeCluster , EnvironmentProduction ))
70
70
assert .Error (t , ServerGroupSpec {Count : util .NewInt (1 )}.Validate (ServerGroupCoordinators , true , DeploymentModeCluster , EnvironmentProduction ))
71
71
assert .Error (t , ServerGroupSpec {Count : util .NewInt (1 )}.Validate (ServerGroupSyncMasters , true , DeploymentModeCluster , EnvironmentProduction ))
@@ -79,27 +79,27 @@ func TestServerGroupSpecDefault(t *testing.T) {
79
79
}
80
80
81
81
assert .Equal (t , 1 , def (ServerGroupSpec {}, ServerGroupSingle , true , DeploymentModeSingle ).GetCount ())
82
- assert .Equal (t , 2 , def (ServerGroupSpec {}, ServerGroupSingle , true , DeploymentModeResilientSingle ).GetCount ())
82
+ assert .Equal (t , 2 , def (ServerGroupSpec {}, ServerGroupSingle , true , DeploymentModeActiveFailover ).GetCount ())
83
83
assert .Equal (t , 0 , def (ServerGroupSpec {}, ServerGroupSingle , false , DeploymentModeCluster ).GetCount ())
84
84
85
85
assert .Equal (t , 0 , def (ServerGroupSpec {}, ServerGroupAgents , false , DeploymentModeSingle ).GetCount ())
86
- assert .Equal (t , 3 , def (ServerGroupSpec {}, ServerGroupAgents , true , DeploymentModeResilientSingle ).GetCount ())
86
+ assert .Equal (t , 3 , def (ServerGroupSpec {}, ServerGroupAgents , true , DeploymentModeActiveFailover ).GetCount ())
87
87
assert .Equal (t , 3 , def (ServerGroupSpec {}, ServerGroupAgents , true , DeploymentModeCluster ).GetCount ())
88
88
89
89
assert .Equal (t , 0 , def (ServerGroupSpec {}, ServerGroupDBServers , false , DeploymentModeSingle ).GetCount ())
90
- assert .Equal (t , 0 , def (ServerGroupSpec {}, ServerGroupDBServers , false , DeploymentModeResilientSingle ).GetCount ())
90
+ assert .Equal (t , 0 , def (ServerGroupSpec {}, ServerGroupDBServers , false , DeploymentModeActiveFailover ).GetCount ())
91
91
assert .Equal (t , 3 , def (ServerGroupSpec {}, ServerGroupDBServers , true , DeploymentModeCluster ).GetCount ())
92
92
93
93
assert .Equal (t , 0 , def (ServerGroupSpec {}, ServerGroupCoordinators , false , DeploymentModeSingle ).GetCount ())
94
- assert .Equal (t , 0 , def (ServerGroupSpec {}, ServerGroupCoordinators , false , DeploymentModeResilientSingle ).GetCount ())
94
+ assert .Equal (t , 0 , def (ServerGroupSpec {}, ServerGroupCoordinators , false , DeploymentModeActiveFailover ).GetCount ())
95
95
assert .Equal (t , 3 , def (ServerGroupSpec {}, ServerGroupCoordinators , true , DeploymentModeCluster ).GetCount ())
96
96
97
97
assert .Equal (t , 0 , def (ServerGroupSpec {}, ServerGroupSyncMasters , false , DeploymentModeSingle ).GetCount ())
98
- assert .Equal (t , 0 , def (ServerGroupSpec {}, ServerGroupSyncMasters , false , DeploymentModeResilientSingle ).GetCount ())
98
+ assert .Equal (t , 0 , def (ServerGroupSpec {}, ServerGroupSyncMasters , false , DeploymentModeActiveFailover ).GetCount ())
99
99
assert .Equal (t , 3 , def (ServerGroupSpec {}, ServerGroupSyncMasters , true , DeploymentModeCluster ).GetCount ())
100
100
101
101
assert .Equal (t , 0 , def (ServerGroupSpec {}, ServerGroupSyncWorkers , false , DeploymentModeSingle ).GetCount ())
102
- assert .Equal (t , 0 , def (ServerGroupSpec {}, ServerGroupSyncWorkers , false , DeploymentModeResilientSingle ).GetCount ())
102
+ assert .Equal (t , 0 , def (ServerGroupSpec {}, ServerGroupSyncWorkers , false , DeploymentModeActiveFailover ).GetCount ())
103
103
assert .Equal (t , 3 , def (ServerGroupSpec {}, ServerGroupSyncWorkers , true , DeploymentModeCluster ).GetCount ())
104
104
105
105
for _ , g := range AllServerGroups {
0 commit comments