Fix flacky test

Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
This commit is contained in:
Nicolas De Loof 2020-08-12 14:45:10 +02:00
parent d281f6cb3e
commit 83d65c02a0
No known key found for this signature in database
GPG Key ID: 9858809D6F8F6E7E
1 changed files with 8 additions and 3 deletions
ecs/pkg/amazon/backend

View File

@ -64,7 +64,6 @@ services:
}
}
assert.Check(t, found, "environment variable FOO not set")
}
func TestEnvFileAndEnv(t *testing.T) {
@ -79,8 +78,14 @@ services:
`)
def := template.Resources["FooTaskDefinition"].(*ecs.TaskDefinition)
env := def.ContainerDefinitions[0].Environment
assert.Equal(t, env[0].Name, "FOO")
assert.Equal(t, env[0].Value, "ZOT")
var found bool
for _, pair := range env {
if pair.Name == "FOO" {
assert.Equal(t, pair.Value, "ZOT")
found = true
}
}
assert.Check(t, found, "environment variable FOO not set")
}
func TestRollingUpdateLimits(t *testing.T) {