e2e: networking test job needs to outlast assert (#9113)

The `e2ejob` utility asserts that a job is running for 5s, but with a sleep
time of 5s, the networking job can race with that check. Sleeping for a longer
period should guarantee that we're running long enough to pass the assert.

Also constrains the job to Linux because our Windows test targets don't yet
support Docker (LCOW), and expand the set of DCs we can safely land on.
This commit is contained in:
Tim Gross 2020-10-16 10:13:16 -04:00 committed by GitHub
parent f05d4cc93a
commit e0ff06be2f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 9 additions and 3 deletions

View File

@ -1,6 +1,12 @@
//e2e:service script=validate.sh
job "networking" {
datacenters = ["dc1"]
datacenters = ["dc1", "dc2"]
constraint {
attribute = "${attr.kernel.name}"
value = "linux"
}
group "basic" {
network {
mode = "bridge"
@ -11,8 +17,8 @@ job "networking" {
config {
image = "busybox:1"
command = "/bin/sleep"
args = ["5"]
args = ["300"]
}
}
}
}
}