Browse Source

improve error message for unsupported resource combination

Signed-off-by: aiordache <[email protected]>
Signed-off-by: Nicolas De Loof <[email protected]>
aiordache 5 years ago
parent
commit
94671e99e1

+ 1 - 1
ecs/pkg/amazon/backend/cloudformation_test.go

@@ -167,7 +167,7 @@ services:
           memory: 2043248M
           memory: 2043248M
 `)
 `)
 	_, err := Backend{}.Convert(model)
 	_, err := Backend{}.Convert(model)
-	assert.ErrorContains(t, err, "unable to find cpu/mem for the required resources")
+	assert.ErrorContains(t, err, "The resources requested are not supported by ECS/Fargate")
 }
 }
 
 
 func TestLoadBalancerTypeNetwork(t *testing.T) {
 func TestLoadBalancerTypeNetwork(t *testing.T) {

+ 1 - 1
ecs/pkg/amazon/backend/convert.go

@@ -159,7 +159,7 @@ func toLimits(service types.ServiceConfig) (string, string, error) {
 			}
 			}
 		}
 		}
 	}
 	}
-	return "", "", fmt.Errorf("unable to find cpu/mem for the required resources")
+	return "", "", fmt.Errorf("The resources requested are not supported by ECS/Fargate")
 }
 }
 
 
 func toContainerReservation(service types.ServiceConfig) (string, int, error) {
 func toContainerReservation(service types.ServiceConfig) (string, int, error) {