@@ -48,6 +48,11 @@ func TestServerGroupSpecValidateCount(t *testing.T) {
4848 assert .Nil (t , ServerGroupSpec {Count : util .NewInt (2 )}.Validate (ServerGroupSyncMasters , true , DeploymentModeCluster , EnvironmentProduction ))
4949 assert .Nil (t , ServerGroupSpec {Count : util .NewInt (2 )}.Validate (ServerGroupSyncWorkers , true , DeploymentModeCluster , EnvironmentProduction ))
5050
51+ assert .Nil (t , ServerGroupSpec {Count : util .NewInt (2 ), MinCount : util .NewInt (2 ), MaxCount : util .NewInt (5 )}.Validate (ServerGroupCoordinators , true , DeploymentModeCluster , EnvironmentDevelopment ))
52+ assert .Nil (t , ServerGroupSpec {Count : util .NewInt (1 ), MaxCount : util .NewInt (5 )}.Validate (ServerGroupCoordinators , true , DeploymentModeCluster , EnvironmentDevelopment ))
53+ assert .Nil (t , ServerGroupSpec {Count : util .NewInt (6 ), MinCount : util .NewInt (2 )}.Validate (ServerGroupCoordinators , true , DeploymentModeCluster , EnvironmentDevelopment ))
54+ assert .Nil (t , ServerGroupSpec {Count : util .NewInt (2 )}.Validate (ServerGroupCoordinators , true , DeploymentModeCluster , EnvironmentDevelopment ))
55+
5156 // Invalid
5257 assert .Error (t , ServerGroupSpec {Count : util .NewInt (1 )}.Validate (ServerGroupSingle , false , DeploymentModeCluster , EnvironmentDevelopment ))
5358 assert .Error (t , ServerGroupSpec {Count : util .NewInt (2 )}.Validate (ServerGroupSingle , true , DeploymentModeSingle , EnvironmentDevelopment ))
@@ -70,6 +75,11 @@ func TestServerGroupSpecValidateCount(t *testing.T) {
7075 assert .Error (t , ServerGroupSpec {Count : util .NewInt (1 )}.Validate (ServerGroupCoordinators , true , DeploymentModeCluster , EnvironmentProduction ))
7176 assert .Error (t , ServerGroupSpec {Count : util .NewInt (1 )}.Validate (ServerGroupSyncMasters , true , DeploymentModeCluster , EnvironmentProduction ))
7277 assert .Error (t , ServerGroupSpec {Count : util .NewInt (1 )}.Validate (ServerGroupSyncWorkers , true , DeploymentModeCluster , EnvironmentProduction ))
78+
79+ assert .Error (t , ServerGroupSpec {Count : util .NewInt (2 ), MinCount : util .NewInt (5 ), MaxCount : util .NewInt (1 )}.Validate (ServerGroupCoordinators , true , DeploymentModeCluster , EnvironmentDevelopment ))
80+ assert .Error (t , ServerGroupSpec {Count : util .NewInt (6 ), MaxCount : util .NewInt (5 )}.Validate (ServerGroupCoordinators , true , DeploymentModeCluster , EnvironmentDevelopment ))
81+ assert .Error (t , ServerGroupSpec {Count : util .NewInt (1 ), MinCount : util .NewInt (2 )}.Validate (ServerGroupCoordinators , true , DeploymentModeCluster , EnvironmentDevelopment ))
82+
7383}
7484
7585func TestServerGroupSpecDefault (t * testing.T ) {
0 commit comments