e2e: fix destination of templates in VaultSecrets test (#9146)

The `$NOMAD_SECRETS_DIR` environment variable is rendered as `/secrets`, which
prior to the recent security patch would unintentionally escape the file
sandbox and get dropped in a directory named `/secrets` where the Nomad client
binary was running. The `VaultSecrets` test was accidentally relying on this
behavior and that causes the test to fail.
This commit is contained in:
Tim Gross 2020-10-22 13:00:08 -04:00 committed by GitHub
parent f3dcefe5a9
commit 344e821ace
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -33,7 +33,7 @@ job "secrets" {
{{ end }}
EOT
destination = "${NOMAD_SECRETS_DIR}/certificate.crt"
destination = "secrets/certificate.crt"
change_mode = "noop"
}
@ -42,7 +42,7 @@ EOT
SOME_SECRET={{ with secret "secrets-TESTID/data/myapp" }}{{- .Data.data.key -}}{{end}}
EOT
destination = "${NOMAD_SECRETS_DIR}/access.key"
destination = "secrets/access.key"
}
resources {