// SetTaskEnv configures the environment of t so that Run executes a testtask // script when called from within t. func SetTaskEnv(t *structs.Task) { if t.Env == nil { t.Env = map[string]string{} } t.Env["TEST_TASK"] = "execute" }