File tree Expand file tree Collapse file tree 2 files changed +11
-3
lines changed Expand file tree Collapse file tree 2 files changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -6,9 +6,10 @@ job "redis" {
66 driver = " containerd-driver"
77
88 config {
9- image = " redis:alpine"
10- seccomp = true
11- cwd = " /home/redis"
9+ image = " redis:alpine"
10+ hostname = " foobar"
11+ seccomp = true
12+ cwd = " /home/redis"
1213 }
1314
1415 resources {
Original file line number Diff line number Diff line change @@ -34,6 +34,13 @@ test_redis_nomad_job() {
3434 exit 1
3535 fi
3636
37+ echo " INFO: Exec redis job and check hostname is foobar."
38+ hostname=$( nomad alloc exec -job redis hostname)
39+ if [ $hostname != " foobar" ]; then
40+ echo " ERROR: hostname is not foobar."
41+ exit 1
42+ fi
43+
3744 echo " INFO: Check if default seccomp is enabled."
3845 output=$( nomad alloc exec -job redis cat /proc/1/status | grep Seccomp)
3946 seccomp_code=$( echo $output | cut -d' ' -f2)
You can’t perform that action at this time.
0 commit comments