open-nomad/e2e/allocstats/input/raw_exec_windows.nomad
Tim Gross 88cb95261b
e2e: add allocstats test for Windows (#6775)
Extends the BasicAllocStats test to include a test for Windows
clients, exercising stats via a powershell `raw_exec` job.

Adds `ListLinuxClientNodes` and `ListWindowsClientNodes` utils so that
we can scope tests to run only when Linux or Windows clients are
available. This prevents waiting on timeouts when running a subset of
the tests against a development cluster (vs our nightly test
cluster).
2019-11-26 08:05:42 -05:00

35 lines
580 B
HCL

job "test_raw_windows" {
datacenters = ["dc1"]
type = "service"
constraint {
attribute = "${attr.kernel.name}"
value = "windows"
}
group "test" {
count = 1
task "test1" {
driver = "raw_exec"
template {
data = <<EOH
foreach ($loopnumber in 1..2147483647) {
$result=1;foreach ($number in 1..2147483647) {
$result = $result * $number
};$result
}
EOH
destination = "local/factorial.ps1"
}
config {
command = "powershell"
args = ["local/factorial.ps1"]
}
}
}
}