forked from taskcluster/taskcluster
-
Notifications
You must be signed in to change notification settings - Fork 0
/
envvars_broken_on_docker_test.go
48 lines (40 loc) · 1.15 KB
/
envvars_broken_on_docker_test.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
// +build !docker
package main
import (
"testing"
)
func TestWorkerLocation(t *testing.T) {
defer setup(t)()
oldWorkerLocation := config.WorkerLocation
defer func(oldWorkerLocation string) {
config.WorkerLocation = oldWorkerLocation
}(oldWorkerLocation)
config.WorkerLocation = `{"cloud":"9","biscuits":"free"}`
payload := GenericWorkerPayload{
Env: map[string]string{
"STRANGE_VAR": `()%!^"<>&|%3 r %!4 %~4RS %3 %PATH% %% " tt`,
},
Command: append(
// In multiuser engine on Windows, the env vars are exported to a
// file at the end of each command, and then imported by the
// wrapper script at the start of the following command. Therefore
// make sure we have at least two commands in order to also test
// export/import of env vars between commands.
helloGoodbye(),
goRun(
"check-env.go",
"TASKCLUSTER_WORKER_LOCATION",
`{"cloud":"9","biscuits":"free"}`,
"RUN_ID",
"0",
"TASKCLUSTER_ROOT_URL",
config.RootURL,
"STRANGE_VAR",
`()%!^"<>&|%3 r %!4 %~4RS %3 %PATH% %% " tt`,
)...,
),
MaxRunTime: 180,
}
td := testTask(t)
_ = submitAndAssert(t, td, payload, "completed", "completed")
}