mirror of
https://github.com/kemko/nomad.git
synced 2026-01-03 00:45:43 +03:00
* e2e: add tests for exec2 task driver * e2e: use envoy 1.29.4 because consul * e2e: add a bridge networking http test for exec driver * e2e: split up http test so curl always starts after the server
44 lines
693 B
HCL
44 lines
693 B
HCL
# Copyright (c) HashiCorp, Inc.
|
|
# SPDX-License-Identifier: BUSL-1.1
|
|
|
|
# This job makes requests to the "python-http" service.
|
|
|
|
job "http_curl" {
|
|
type = "service"
|
|
|
|
constraint {
|
|
attribute = "${attr.kernel.name}"
|
|
value = "linux"
|
|
}
|
|
|
|
group "client" {
|
|
task "curl" {
|
|
driver = "exec2"
|
|
|
|
config {
|
|
command = "bash"
|
|
args = ["local/script.sh"]
|
|
}
|
|
|
|
template {
|
|
destination = "local/script.sh"
|
|
change_mode = "noop"
|
|
data = <<EOF
|
|
#!/usr/bin/env bash
|
|
|
|
while true
|
|
do
|
|
|
|
{{ range nomadService "python-http" }}
|
|
(curl -s -S -L "{{ .Address }}:{{ .Port }}/hi.html") || true
|
|
{{ end }}
|
|
|
|
sleep 2
|
|
|
|
done
|
|
EOF
|
|
}
|
|
}
|
|
}
|
|
}
|