improve error message for unsupported resource combination

Signed-off-by: aiordache <anca.iordache@docker.com>
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
This commit is contained in:
aiordache 2020-07-24 09:46:52 +02:00 committed by Nicolas De Loof
parent ce3ab38e61
commit 94671e99e1
No known key found for this signature in database
GPG Key ID: 9858809D6F8F6E7E
2 changed files with 2 additions and 2 deletions

View File

@ -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) {

View File

@ -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) {