mirror of
https://github.com/kemko/nomad.git
synced 2026-01-01 16:05:42 +03:00
The E2E test suite for rescheduling had a few bugs: * Using the command line to stop a job with a failing deployment returns a non-zero exit code, which would cause an otherwise passing test to fail. * Two of the input jobs were actually invalid but were only correctly detected as such because of #17342 This changeset also updates the whole test suite to move it off the v1 "framework". A few test assertions are also de-flaked. Fixes: #19076
34 lines
470 B
HCL
34 lines
470 B
HCL
# Copyright (c) HashiCorp, Inc.
|
|
# SPDX-License-Identifier: BUSL-1.1
|
|
|
|
job "test" {
|
|
|
|
datacenters = ["dc1", "dc2"]
|
|
|
|
constraint {
|
|
attribute = "${attr.kernel.name}"
|
|
value = "linux"
|
|
}
|
|
|
|
type = "system"
|
|
|
|
group "t" {
|
|
count = 1
|
|
|
|
task "t" {
|
|
driver = "raw_exec"
|
|
|
|
config {
|
|
command = "bash"
|
|
args = ["-c", "lol 5000"]
|
|
}
|
|
}
|
|
|
|
restart {
|
|
attempts = 0
|
|
delay = "0s"
|
|
mode = "fail"
|
|
}
|
|
}
|
|
}
|