@@ -416,33 +416,6 @@ func TestLoadBalancedWebService_validate(t *testing.T) {
416416 },
417417 wantedErrorMsgPrefix : "validate Windows: service connect (`network.connect`) is not supported for Window" ,
418418 },
419- "error if fail to validate ARM" : {
420- lbConfig : LoadBalancedWebService {
421- Workload : Workload {
422- Name : aws .String ("mockName" ),
423- },
424- LoadBalancedWebServiceConfig : LoadBalancedWebServiceConfig {
425- ImageConfig : testImageConfig ,
426- TaskConfig : TaskConfig {
427- Platform : PlatformArgsOrString {PlatformString : (* PlatformString )(aws .String ("linux/arm64" ))},
428- Count : Count {
429- AdvancedCount : AdvancedCount {
430- Spot : aws .Int (123 ),
431- workloadType : manifestinfo .LoadBalancedWebServiceType ,
432- },
433- },
434- },
435- HTTPOrBool : HTTPOrBool {
436- HTTP : HTTP {
437- Main : RoutingRule {
438- Path : stringP ("/" ),
439- },
440- },
441- },
442- },
443- },
444- wantedErrorMsgPrefix : `validate ARM: ` ,
445- },
446419 "error if neither of http or nlb is enabled" : {
447420 lbConfig : LoadBalancedWebService {
448421 Workload : Workload {
@@ -729,26 +702,6 @@ func TestBackendService_validate(t *testing.T) {
729702 },
730703 wantedErrorMsgPrefix : "validate Windows: service connect (`network.connect`) is not supported for Window" ,
731704 },
732- "error if fail to validate ARM" : {
733- config : BackendService {
734- Workload : Workload {
735- Name : aws .String ("mockName" ),
736- },
737- BackendServiceConfig : BackendServiceConfig {
738- ImageConfig : testImageConfig ,
739- TaskConfig : TaskConfig {
740- Platform : PlatformArgsOrString {PlatformString : (* PlatformString )(aws .String ("linux/arm64" ))},
741- Count : Count {
742- AdvancedCount : AdvancedCount {
743- Spot : aws .Int (123 ),
744- workloadType : manifestinfo .BackendServiceType ,
745- },
746- },
747- },
748- },
749- },
750- wantedErrorMsgPrefix : `validate ARM: ` ,
751- },
752705 "error if fail to validate deployment" : {
753706 config : BackendService {
754707 Workload : Workload {
@@ -1177,26 +1130,6 @@ func TestWorkerService_validate(t *testing.T) {
11771130 },
11781131 wantedErrorMsgPrefix : `validate Windows: ` ,
11791132 },
1180- "error if fail to validate ARM" : {
1181- config : WorkerService {
1182- Workload : Workload {
1183- Name : aws .String ("mockName" ),
1184- },
1185- WorkerServiceConfig : WorkerServiceConfig {
1186- ImageConfig : testImageConfig ,
1187- TaskConfig : TaskConfig {
1188- Platform : PlatformArgsOrString {PlatformString : (* PlatformString )(aws .String ("linux/arm64" ))},
1189- Count : Count {
1190- AdvancedCount : AdvancedCount {
1191- Spot : aws .Int (123 ),
1192- workloadType : manifestinfo .WorkerServiceType ,
1193- },
1194- },
1195- },
1196- },
1197- },
1198- wantedErrorMsgPrefix : `validate ARM: ` ,
1199- },
12001133 "error if fail to validate deployment" : {
12011134 config : WorkerService {
12021135 Workload : Workload {
@@ -3925,43 +3858,6 @@ func TestValidateWindows(t *testing.T) {
39253858 }
39263859}
39273860
3928- func TestValidateARM (t * testing.T ) {
3929- testCases := map [string ]struct {
3930- in validateARMOpts
3931- wantedError error
3932- }{
3933- "should return an error if Spot specified inline" : {
3934- in : validateARMOpts {
3935- Spot : aws .Int (2 ),
3936- },
3937- wantedError : fmt .Errorf (`'Fargate Spot' is not supported when deploying on ARM architecture` ),
3938- },
3939- "should return an error if Spot specified with spot_from" : {
3940- in : validateARMOpts {
3941- SpotFrom : aws .Int (2 ),
3942- },
3943- wantedError : fmt .Errorf (`'Fargate Spot' is not supported when deploying on ARM architecture` ),
3944- },
3945- "should return nil if Spot not specified" : {
3946- in : validateARMOpts {
3947- Spot : nil ,
3948- },
3949- wantedError : nil ,
3950- },
3951- }
3952- for name , tc := range testCases {
3953- t .Run (name , func (t * testing.T ) {
3954- err := validateARM (tc .in )
3955-
3956- if tc .wantedError != nil {
3957- require .EqualError (t , err , tc .wantedError .Error ())
3958- } else {
3959- require .NoError (t , err )
3960- }
3961- })
3962- }
3963- }
3964-
39653861func TestDeploymentConfig_validate (t * testing.T ) {
39663862 testCases := map [string ]struct {
39673863 deployConfig DeploymentConfig
0 commit comments