@@ -46,6 +46,7 @@ func TestServerGroupSpecValidateCount(t *testing.T) {
4646assert .Nil (t , ServerGroupSpec {Count : util.NewType [int ](2 )}.New ().WithGroup (ServerGroupCoordinators ).New ().Validate (ServerGroupCoordinators , true , DeploymentModeCluster , EnvironmentProduction ))
4747assert .Nil (t , ServerGroupSpec {Count : util.NewType [int ](2 )}.New ().WithGroup (ServerGroupSyncMasters ).New ().Validate (ServerGroupSyncMasters , true , DeploymentModeCluster , EnvironmentProduction ))
4848assert .Nil (t , ServerGroupSpec {Count : util.NewType [int ](2 )}.New ().WithGroup (ServerGroupSyncWorkers ).New ().Validate (ServerGroupSyncWorkers , true , DeploymentModeCluster , EnvironmentProduction ))
49+ assert .Nil (t , ServerGroupSpec {Count : util.NewType [int ](2 )}.New ().WithGroup (ServerGroupGateways ).New ().Validate (ServerGroupGateways , true , DeploymentModeCluster , EnvironmentProduction ))
4950
5051assert .Nil (t , ServerGroupSpec {Count : util.NewType [int ](2 ), MinCount : util.NewType [int ](2 ), MaxCount : util.NewType [int ](5 )}.New ().WithGroup (ServerGroupCoordinators ).New ().Validate (ServerGroupCoordinators , true , DeploymentModeCluster , EnvironmentDevelopment ))
5152assert .Nil (t , ServerGroupSpec {Count : util.NewType [int ](1 ), MaxCount : util.NewType [int ](5 )}.New ().WithGroup (ServerGroupCoordinators ).New ().Validate (ServerGroupCoordinators , true , DeploymentModeCluster , EnvironmentDevelopment ))
@@ -112,6 +113,10 @@ func TestServerGroupSpecDefault(t *testing.T) {
112113assert .Equal (t , 0 , def (ServerGroupSpec {}, ServerGroupSyncWorkers , false , DeploymentModeActiveFailover ).New ().GetCount ())
113114assert .Equal (t , 3 , def (ServerGroupSpec {}, ServerGroupSyncWorkers , true , DeploymentModeCluster ).New ().GetCount ())
114115
116+ assert .Equal (t , 0 , def (ServerGroupSpec {}, ServerGroupGateways , false , DeploymentModeSingle ).New ().GetCount ())
117+ assert .Equal (t , 0 , def (ServerGroupSpec {}, ServerGroupGateways , false , DeploymentModeActiveFailover ).New ().GetCount ())
118+ assert .Equal (t , 3 , def (ServerGroupSpec {}, ServerGroupGateways , true , DeploymentModeCluster ).New ().GetCount ())
119+ 
115120for  _ , g  :=  range  AllServerGroups  {
116121assert .Equal (t , 0 , len (def (ServerGroupSpec {}, g , true , DeploymentModeSingle ).Args ))
117122assert .Equal (t , "" , def (ServerGroupSpec {}, g , true , DeploymentModeSingle ).New ().GetStorageClassName ())
0 commit comments