client: Rename drivers/shared/env => client/taskenv

This commit is contained in:
Danielle Tomlinson
2018-11-30 12:18:39 +01:00
parent ca91d503ed
commit 03db4cf82d
27 changed files with 72 additions and 72 deletions

View File

@@ -19,7 +19,7 @@ import (
multierror "github.com/hashicorp/go-multierror"
"github.com/hashicorp/nomad/client/allocrunner/taskrunner/interfaces"
"github.com/hashicorp/nomad/client/config"
"github.com/hashicorp/nomad/drivers/shared/env"
"github.com/hashicorp/nomad/client/taskenv"
"github.com/hashicorp/nomad/helper"
"github.com/hashicorp/nomad/nomad/structs"
)
@@ -91,7 +91,7 @@ type TaskTemplateManagerConfig struct {
TaskDir string
// EnvBuilder is the environment variable builder for the task.
EnvBuilder *env.Builder
EnvBuilder *taskenv.Builder
// MaxTemplateEventRate is the maximum rate at which we should emit events.
MaxTemplateEventRate time.Duration

View File

@@ -13,7 +13,7 @@ import (
ctestutil "github.com/hashicorp/consul/testutil"
"github.com/hashicorp/nomad/client/config"
"github.com/hashicorp/nomad/drivers/shared/env"
"github.com/hashicorp/nomad/client/taskenv"
"github.com/hashicorp/nomad/helper"
"github.com/hashicorp/nomad/nomad/mock"
"github.com/hashicorp/nomad/nomad/structs"
@@ -102,7 +102,7 @@ type testHarness struct {
manager *TaskTemplateManager
mockHooks *MockTaskHooks
templates []*structs.Template
envBuilder *env.Builder
envBuilder *taskenv.Builder
node *structs.Node
config *config.Config
vaultToken string
@@ -128,7 +128,7 @@ func newTestHarness(t *testing.T, templates []*structs.Template, consul, vault b
a := mock.Alloc()
task := a.Job.TaskGroups[0].Tasks[0]
task.Name = TestTaskName
harness.envBuilder = env.NewBuilder(harness.node, a, task, region)
harness.envBuilder = taskenv.NewBuilder(harness.node, a, task, region)
// Make a tempdir
d, err := ioutil.TempDir("", "ct_test")
@@ -206,7 +206,7 @@ func TestTaskTemplateManager_InvalidConfig(t *testing.T) {
clientConfig := &config.Config{Region: "global"}
taskDir := "foo"
a := mock.Alloc()
envBuilder := env.NewBuilder(mock.Node(), a, a.Job.TaskGroups[0].Tasks[0], clientConfig.Region)
envBuilder := taskenv.NewBuilder(mock.Node(), a, a.Job.TaskGroups[0].Tasks[0], clientConfig.Region)
cases := []struct {
name string
@@ -1277,7 +1277,7 @@ func TestTaskTemplateManager_Config_VaultGrace(t *testing.T) {
VaultGrace: 100 * time.Second,
},
},
EnvBuilder: env.NewBuilder(c.Node, alloc, alloc.Job.TaskGroups[0].Tasks[0], c.Region),
EnvBuilder: taskenv.NewBuilder(c.Node, alloc, alloc.Job.TaskGroups[0].Tasks[0], c.Region),
}
ctmplMapping, err := parseTemplateConfigs(config)