open-nomad/e2e/networking/inputs/basic.nomad
Tim Gross e0ff06be2f
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.
2020-10-16 10:13:16 -04:00

25 lines
392 B
HCL

//e2e:service script=validate.sh
job "networking" {
datacenters = ["dc1", "dc2"]
constraint {
attribute = "${attr.kernel.name}"
value = "linux"
}
group "basic" {
network {
mode = "bridge"
}
task "sleep" {
driver = "docker"
config {
image = "busybox:1"
command = "/bin/sleep"
args = ["300"]
}
}
}
}