Files
nomad/e2e/consultemplate/input/bad_template_paths.nomad
Tim Gross 4e7ad58d2d E2E: modernize ConsulTemplate test and fix some assertions (#19126)
The `TestTemplateUpdateTriggers` is flaky because of what turned out to be
incompatibility between the Consul agent on the E2E cluster and the HCP Consul
server we were running but hadn't upgraded in a while. Upgrading the HCP Consul
server seems to have fixed the tests, but while I'm in here I've updated this
test suite:

* Port all the consul template test suite off of the old framework, and upgrade to
  using e2e "v3" where feasible.
* Clean up some of the assertions in the update triggers test to make the
  purpose of the test more clear.
* Remove unnecessary default fields from the job specs.

Closes: #19075
2023-11-29 12:16:41 -05:00

40 lines
629 B
HCL

# Copyright (c) HashiCorp, Inc.
# SPDX-License-Identifier: BUSL-1.1
job "bad-template-paths" {
constraint {
attribute = "${attr.kernel.name}"
value = "linux"
}
group "template-paths" {
restart {
attempts = 0
mode = "fail"
}
task "task" {
driver = "docker"
config {
image = "busybox:1"
command = "/bin/sh"
args = ["-c", "sleep 300"]
}
template {
source = "/etc/passwd"
destination = "${NOMAD_SECRETS_DIR}/foo/dst"
}
resources {
cpu = 128
memory = 64
}
}
}
}