From 6756ffd05211bfe4cba79374c71699622ced2f13 Mon Sep 17 00:00:00 2001 From: Danielle Tomlinson Date: Wed, 28 Nov 2018 16:41:59 +0100 Subject: [PATCH] drivers: Move client/drivers/env to drivers/shared/env As part of deprecating legacy drivers, we're moving the env package to a new drivers/shared tree, as it is used by the modern docker and rkt driver packages, and is useful for 3rd party plugins. --- client/allocrunner/interfaces/task_lifecycle.go | 2 +- client/allocrunner/taskrunner/getter/getter_test.go | 2 +- client/allocrunner/taskrunner/service_hook.go | 2 +- client/allocrunner/taskrunner/task_runner.go | 2 +- client/allocrunner/taskrunner/template/template.go | 2 +- client/allocrunner/taskrunner/template/template_test.go | 2 +- client/allocrunner/taskrunner/template_hook.go | 2 +- client/allocrunner/taskrunner/validate_hook.go | 2 +- client/allocrunner/taskrunner/validate_hook_test.go | 2 +- .../allocrunnerdeprecated/taskrunner/consul_template.go | 2 +- .../taskrunner/consul_template_test.go | 2 +- client/allocrunnerdeprecated/taskrunner/task_runner.go | 2 +- .../allocrunnerdeprecated/taskrunner/task_runner_test.go | 2 +- client/driver/docker.go | 2 +- client/driver/docker_test.go | 2 +- client/driver/driver.go | 2 +- client/driver/driver_test.go | 2 +- client/driver/exec_test.go | 2 +- client/driver/executor/executor_linux_test.go | 2 +- client/driver/executor/executor_test.go | 2 +- client/driver/java.go | 2 +- client/driver/raw_exec.go | 2 +- client/driver/raw_exec_test.go | 2 +- client/driver/rkt.go | 2 +- client/driver/utils.go | 2 +- drivers/docker/driver.go | 2 +- drivers/docker/driver_test.go | 2 +- drivers/rkt/driver.go | 2 +- drivers/rkt/handle.go | 2 +- {client/driver => drivers/shared}/env/env.go | 0 {client/driver => drivers/shared}/env/env_test.go | 0 {client/driver => drivers/shared}/env/util.go | 0 {client/driver => drivers/shared}/env/util_test.go | 8 ++++---- plugins/drivers/testing.go | 2 +- plugins/drivers/utils/utils.go | 2 +- vendor/github.com/golang/snappy/encode_amd64.go | 2 +- vendor/github.com/hashicorp/serf/serf/keymanager.go | 2 +- 37 files changed, 37 insertions(+), 37 deletions(-) rename {client/driver => drivers/shared}/env/env.go (100%) rename {client/driver => drivers/shared}/env/env_test.go (100%) rename {client/driver => drivers/shared}/env/util.go (100%) rename {client/driver => drivers/shared}/env/util_test.go (97%) diff --git a/client/allocrunner/interfaces/task_lifecycle.go b/client/allocrunner/interfaces/task_lifecycle.go index c34b583a1..778a5c136 100644 --- a/client/allocrunner/interfaces/task_lifecycle.go +++ b/client/allocrunner/interfaces/task_lifecycle.go @@ -5,8 +5,8 @@ import ( "github.com/hashicorp/nomad/client/allocdir" "github.com/hashicorp/nomad/client/allocrunner/taskrunner/interfaces" - "github.com/hashicorp/nomad/client/driver/env" cstructs "github.com/hashicorp/nomad/client/structs" + "github.com/hashicorp/nomad/drivers/shared/env" "github.com/hashicorp/nomad/nomad/structs" "github.com/hashicorp/nomad/plugins/drivers" ) diff --git a/client/allocrunner/taskrunner/getter/getter_test.go b/client/allocrunner/taskrunner/getter/getter_test.go index 41f9f92ff..969a880ab 100644 --- a/client/allocrunner/taskrunner/getter/getter_test.go +++ b/client/allocrunner/taskrunner/getter/getter_test.go @@ -11,7 +11,7 @@ import ( "strings" "testing" - "github.com/hashicorp/nomad/client/driver/env" + "github.com/hashicorp/nomad/drivers/shared/env" "github.com/hashicorp/nomad/nomad/mock" "github.com/hashicorp/nomad/nomad/structs" ) diff --git a/client/allocrunner/taskrunner/service_hook.go b/client/allocrunner/taskrunner/service_hook.go index a754cbcef..86a32d02b 100644 --- a/client/allocrunner/taskrunner/service_hook.go +++ b/client/allocrunner/taskrunner/service_hook.go @@ -10,9 +10,9 @@ import ( "github.com/hashicorp/nomad/client/allocrunner/interfaces" tinterfaces "github.com/hashicorp/nomad/client/allocrunner/taskrunner/interfaces" "github.com/hashicorp/nomad/client/consul" - "github.com/hashicorp/nomad/client/driver/env" cstructs "github.com/hashicorp/nomad/client/structs" agentconsul "github.com/hashicorp/nomad/command/agent/consul" + "github.com/hashicorp/nomad/drivers/shared/env" "github.com/hashicorp/nomad/nomad/structs" ) diff --git a/client/allocrunner/taskrunner/task_runner.go b/client/allocrunner/taskrunner/task_runner.go index 74a636eca..2f0c1dacc 100644 --- a/client/allocrunner/taskrunner/task_runner.go +++ b/client/allocrunner/taskrunner/task_runner.go @@ -20,11 +20,11 @@ import ( "github.com/hashicorp/nomad/client/config" "github.com/hashicorp/nomad/client/consul" "github.com/hashicorp/nomad/client/devicemanager" - "github.com/hashicorp/nomad/client/driver/env" cinterfaces "github.com/hashicorp/nomad/client/interfaces" cstate "github.com/hashicorp/nomad/client/state" cstructs "github.com/hashicorp/nomad/client/structs" "github.com/hashicorp/nomad/client/vaultclient" + "github.com/hashicorp/nomad/drivers/shared/env" "github.com/hashicorp/nomad/nomad/structs" "github.com/hashicorp/nomad/plugins/base" "github.com/hashicorp/nomad/plugins/drivers" diff --git a/client/allocrunner/taskrunner/template/template.go b/client/allocrunner/taskrunner/template/template.go index 54f035a9a..b56da3f98 100644 --- a/client/allocrunner/taskrunner/template/template.go +++ b/client/allocrunner/taskrunner/template/template.go @@ -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/client/driver/env" + "github.com/hashicorp/nomad/drivers/shared/env" "github.com/hashicorp/nomad/helper" "github.com/hashicorp/nomad/nomad/structs" ) diff --git a/client/allocrunner/taskrunner/template/template_test.go b/client/allocrunner/taskrunner/template/template_test.go index 8561a8f2f..8201e8bf6 100644 --- a/client/allocrunner/taskrunner/template/template_test.go +++ b/client/allocrunner/taskrunner/template/template_test.go @@ -13,7 +13,7 @@ import ( ctestutil "github.com/hashicorp/consul/testutil" "github.com/hashicorp/nomad/client/config" - "github.com/hashicorp/nomad/client/driver/env" + "github.com/hashicorp/nomad/drivers/shared/env" "github.com/hashicorp/nomad/helper" "github.com/hashicorp/nomad/nomad/mock" "github.com/hashicorp/nomad/nomad/structs" diff --git a/client/allocrunner/taskrunner/template_hook.go b/client/allocrunner/taskrunner/template_hook.go index bb920755a..0db1f60c3 100644 --- a/client/allocrunner/taskrunner/template_hook.go +++ b/client/allocrunner/taskrunner/template_hook.go @@ -10,7 +10,7 @@ import ( ti "github.com/hashicorp/nomad/client/allocrunner/taskrunner/interfaces" "github.com/hashicorp/nomad/client/allocrunner/taskrunner/template" "github.com/hashicorp/nomad/client/config" - "github.com/hashicorp/nomad/client/driver/env" + "github.com/hashicorp/nomad/drivers/shared/env" "github.com/hashicorp/nomad/nomad/structs" ) diff --git a/client/allocrunner/taskrunner/validate_hook.go b/client/allocrunner/taskrunner/validate_hook.go index 150604802..daf188d0b 100644 --- a/client/allocrunner/taskrunner/validate_hook.go +++ b/client/allocrunner/taskrunner/validate_hook.go @@ -8,7 +8,7 @@ import ( multierror "github.com/hashicorp/go-multierror" "github.com/hashicorp/nomad/client/allocrunner/interfaces" "github.com/hashicorp/nomad/client/config" - "github.com/hashicorp/nomad/client/driver/env" + "github.com/hashicorp/nomad/drivers/shared/env" "github.com/hashicorp/nomad/nomad/structs" ) diff --git a/client/allocrunner/taskrunner/validate_hook_test.go b/client/allocrunner/taskrunner/validate_hook_test.go index c4850bd04..1ac9370c5 100644 --- a/client/allocrunner/taskrunner/validate_hook_test.go +++ b/client/allocrunner/taskrunner/validate_hook_test.go @@ -4,7 +4,7 @@ import ( "testing" "github.com/hashicorp/nomad/client/config" - "github.com/hashicorp/nomad/client/driver/env" + "github.com/hashicorp/nomad/drivers/shared/env" "github.com/hashicorp/nomad/nomad/structs" "github.com/stretchr/testify/require" ) diff --git a/client/allocrunnerdeprecated/taskrunner/consul_template.go b/client/allocrunnerdeprecated/taskrunner/consul_template.go index 25f1e4d5f..32e000fb6 100644 --- a/client/allocrunnerdeprecated/taskrunner/consul_template.go +++ b/client/allocrunnerdeprecated/taskrunner/consul_template.go @@ -19,7 +19,7 @@ import ( envparse "github.com/hashicorp/go-envparse" multierror "github.com/hashicorp/go-multierror" "github.com/hashicorp/nomad/client/config" - "github.com/hashicorp/nomad/client/driver/env" + "github.com/hashicorp/nomad/drivers/shared/env" "github.com/hashicorp/nomad/helper" "github.com/hashicorp/nomad/nomad/structs" ) diff --git a/client/allocrunnerdeprecated/taskrunner/consul_template_test.go b/client/allocrunnerdeprecated/taskrunner/consul_template_test.go index 5f722cbb0..e10bd7999 100644 --- a/client/allocrunnerdeprecated/taskrunner/consul_template_test.go +++ b/client/allocrunnerdeprecated/taskrunner/consul_template_test.go @@ -14,7 +14,7 @@ import ( ctestutil "github.com/hashicorp/consul/testutil" "github.com/hashicorp/nomad/client/config" - "github.com/hashicorp/nomad/client/driver/env" + "github.com/hashicorp/nomad/drivers/shared/env" "github.com/hashicorp/nomad/helper" "github.com/hashicorp/nomad/nomad/mock" "github.com/hashicorp/nomad/nomad/structs" diff --git a/client/allocrunnerdeprecated/taskrunner/task_runner.go b/client/allocrunnerdeprecated/taskrunner/task_runner.go index 9642591b0..4df5f94dc 100644 --- a/client/allocrunnerdeprecated/taskrunner/task_runner.go +++ b/client/allocrunnerdeprecated/taskrunner/task_runner.go @@ -32,9 +32,9 @@ import ( "github.com/hashicorp/nomad/nomad/structs" "github.com/ugorji/go/codec" - "github.com/hashicorp/nomad/client/driver/env" dstructs "github.com/hashicorp/nomad/client/driver/structs" cstructs "github.com/hashicorp/nomad/client/structs" + "github.com/hashicorp/nomad/drivers/shared/env" ) const ( diff --git a/client/allocrunnerdeprecated/taskrunner/task_runner_test.go b/client/allocrunnerdeprecated/taskrunner/task_runner_test.go index 526475ebf..77325cccc 100644 --- a/client/allocrunnerdeprecated/taskrunner/task_runner_test.go +++ b/client/allocrunnerdeprecated/taskrunner/task_runner_test.go @@ -21,10 +21,10 @@ import ( "github.com/hashicorp/nomad/client/allocrunner/taskrunner/restarts" "github.com/hashicorp/nomad/client/config" consulApi "github.com/hashicorp/nomad/client/consul" - "github.com/hashicorp/nomad/client/driver/env" cstructs "github.com/hashicorp/nomad/client/structs" "github.com/hashicorp/nomad/client/vaultclient" "github.com/hashicorp/nomad/command/agent/consul" + "github.com/hashicorp/nomad/drivers/shared/env" "github.com/hashicorp/nomad/helper/testlog" "github.com/hashicorp/nomad/nomad/mock" "github.com/hashicorp/nomad/nomad/structs" diff --git a/client/driver/docker.go b/client/driver/docker.go index 0351b2102..3d4f8ad94 100644 --- a/client/driver/docker.go +++ b/client/driver/docker.go @@ -26,9 +26,9 @@ import ( "github.com/hashicorp/go-multierror" "github.com/hashicorp/nomad/client/allocdir" - "github.com/hashicorp/nomad/client/driver/env" dstructs "github.com/hashicorp/nomad/client/driver/structs" cstructs "github.com/hashicorp/nomad/client/structs" + "github.com/hashicorp/nomad/drivers/shared/env" "github.com/hashicorp/nomad/helper" "github.com/hashicorp/nomad/helper/fields" shelpers "github.com/hashicorp/nomad/helper/stats" diff --git a/client/driver/docker_test.go b/client/driver/docker_test.go index 7b9b3b097..44a69ab99 100644 --- a/client/driver/docker_test.go +++ b/client/driver/docker_test.go @@ -20,10 +20,10 @@ import ( sockaddr "github.com/hashicorp/go-sockaddr" "github.com/hashicorp/nomad/client/allocdir" "github.com/hashicorp/nomad/client/config" - "github.com/hashicorp/nomad/client/driver/env" "github.com/hashicorp/nomad/client/fingerprint" cstructs "github.com/hashicorp/nomad/client/structs" "github.com/hashicorp/nomad/client/testutil" + "github.com/hashicorp/nomad/drivers/shared/env" "github.com/hashicorp/nomad/helper/testlog" "github.com/hashicorp/nomad/helper/uuid" "github.com/hashicorp/nomad/nomad/mock" diff --git a/client/driver/driver.go b/client/driver/driver.go index c65150a21..4cca5b917 100644 --- a/client/driver/driver.go +++ b/client/driver/driver.go @@ -11,8 +11,8 @@ import ( "github.com/hashicorp/nomad/client/allocdir" "github.com/hashicorp/nomad/client/config" - "github.com/hashicorp/nomad/client/driver/env" "github.com/hashicorp/nomad/client/fingerprint" + "github.com/hashicorp/nomad/drivers/shared/env" "github.com/hashicorp/nomad/nomad/structs" dstructs "github.com/hashicorp/nomad/client/driver/structs" diff --git a/client/driver/driver_test.go b/client/driver/driver_test.go index 4c3112b3f..1db47f0c4 100644 --- a/client/driver/driver_test.go +++ b/client/driver/driver_test.go @@ -15,8 +15,8 @@ import ( plugin "github.com/hashicorp/go-plugin" "github.com/hashicorp/nomad/client/allocdir" "github.com/hashicorp/nomad/client/config" - "github.com/hashicorp/nomad/client/driver/env" "github.com/hashicorp/nomad/client/logmon" + "github.com/hashicorp/nomad/drivers/shared/env" "github.com/hashicorp/nomad/helper/testlog" "github.com/hashicorp/nomad/helper/testtask" "github.com/hashicorp/nomad/helper/uuid" diff --git a/client/driver/exec_test.go b/client/driver/exec_test.go index 787d008f0..1662fc466 100644 --- a/client/driver/exec_test.go +++ b/client/driver/exec_test.go @@ -13,8 +13,8 @@ import ( "time" "github.com/hashicorp/nomad/client/config" - "github.com/hashicorp/nomad/client/driver/env" cstructs "github.com/hashicorp/nomad/client/structs" + "github.com/hashicorp/nomad/drivers/shared/env" "github.com/hashicorp/nomad/nomad/structs" "github.com/hashicorp/nomad/testutil" diff --git a/client/driver/executor/executor_linux_test.go b/client/driver/executor/executor_linux_test.go index d65c33df6..5656f8568 100644 --- a/client/driver/executor/executor_linux_test.go +++ b/client/driver/executor/executor_linux_test.go @@ -12,9 +12,9 @@ import ( hclog "github.com/hashicorp/go-hclog" "github.com/hashicorp/nomad/client/allocdir" - "github.com/hashicorp/nomad/client/driver/env" cstructs "github.com/hashicorp/nomad/client/structs" "github.com/hashicorp/nomad/client/testutil" + "github.com/hashicorp/nomad/drivers/shared/env" "github.com/hashicorp/nomad/helper/testlog" "github.com/hashicorp/nomad/nomad/mock" tu "github.com/hashicorp/nomad/testutil" diff --git a/client/driver/executor/executor_test.go b/client/driver/executor/executor_test.go index bc2ef623c..09cb997be 100644 --- a/client/driver/executor/executor_test.go +++ b/client/driver/executor/executor_test.go @@ -15,8 +15,8 @@ import ( hclog "github.com/hashicorp/go-hclog" "github.com/hashicorp/nomad/client/allocdir" - "github.com/hashicorp/nomad/client/driver/env" cstructs "github.com/hashicorp/nomad/client/structs" + "github.com/hashicorp/nomad/drivers/shared/env" "github.com/hashicorp/nomad/helper/testlog" "github.com/hashicorp/nomad/nomad/mock" "github.com/stretchr/testify/require" diff --git a/client/driver/java.go b/client/driver/java.go index 470463030..d7a086a56 100644 --- a/client/driver/java.go +++ b/client/driver/java.go @@ -18,11 +18,11 @@ import ( "github.com/hashicorp/go-plugin" "github.com/mitchellh/mapstructure" - "github.com/hashicorp/nomad/client/driver/env" "github.com/hashicorp/nomad/client/driver/executor" dstructs "github.com/hashicorp/nomad/client/driver/structs" "github.com/hashicorp/nomad/client/fingerprint" cstructs "github.com/hashicorp/nomad/client/structs" + "github.com/hashicorp/nomad/drivers/shared/env" "github.com/hashicorp/nomad/helper" "github.com/hashicorp/nomad/helper/fields" "github.com/hashicorp/nomad/nomad/structs" diff --git a/client/driver/raw_exec.go b/client/driver/raw_exec.go index 2001b423d..da1e18e9e 100644 --- a/client/driver/raw_exec.go +++ b/client/driver/raw_exec.go @@ -14,11 +14,11 @@ import ( multierror "github.com/hashicorp/go-multierror" "github.com/hashicorp/go-plugin" "github.com/hashicorp/nomad/client/allocdir" - "github.com/hashicorp/nomad/client/driver/env" "github.com/hashicorp/nomad/client/driver/executor" dstructs "github.com/hashicorp/nomad/client/driver/structs" "github.com/hashicorp/nomad/client/fingerprint" cstructs "github.com/hashicorp/nomad/client/structs" + "github.com/hashicorp/nomad/drivers/shared/env" "github.com/hashicorp/nomad/helper/fields" "github.com/hashicorp/nomad/nomad/structs" "github.com/mitchellh/mapstructure" diff --git a/client/driver/raw_exec_test.go b/client/driver/raw_exec_test.go index 990045de3..d5f684a58 100644 --- a/client/driver/raw_exec_test.go +++ b/client/driver/raw_exec_test.go @@ -14,9 +14,9 @@ import ( "time" "github.com/hashicorp/nomad/client/config" - "github.com/hashicorp/nomad/client/driver/env" cstructs "github.com/hashicorp/nomad/client/structs" tu "github.com/hashicorp/nomad/client/testutil" + "github.com/hashicorp/nomad/drivers/shared/env" "github.com/hashicorp/nomad/helper/testtask" "github.com/hashicorp/nomad/nomad/structs" "github.com/hashicorp/nomad/testutil" diff --git a/client/driver/rkt.go b/client/driver/rkt.go index ef505c6e2..8edb2a5dd 100644 --- a/client/driver/rkt.go +++ b/client/driver/rkt.go @@ -28,10 +28,10 @@ import ( "github.com/hashicorp/go-version" "github.com/hashicorp/nomad/client/allocdir" "github.com/hashicorp/nomad/client/config" - "github.com/hashicorp/nomad/client/driver/env" "github.com/hashicorp/nomad/client/driver/executor" dstructs "github.com/hashicorp/nomad/client/driver/structs" cstructs "github.com/hashicorp/nomad/client/structs" + "github.com/hashicorp/nomad/drivers/shared/env" "github.com/hashicorp/nomad/helper" "github.com/hashicorp/nomad/helper/fields" "github.com/hashicorp/nomad/nomad/structs" diff --git a/client/driver/utils.go b/client/driver/utils.go index ef6dd17a9..6958fb40d 100644 --- a/client/driver/utils.go +++ b/client/driver/utils.go @@ -16,10 +16,10 @@ import ( "github.com/hashicorp/go-plugin" "github.com/hashicorp/nomad/client/allocdir" "github.com/hashicorp/nomad/client/config" - "github.com/hashicorp/nomad/client/driver/env" "github.com/hashicorp/nomad/client/driver/executor" dstructs "github.com/hashicorp/nomad/client/driver/structs" cstructs "github.com/hashicorp/nomad/client/structs" + "github.com/hashicorp/nomad/drivers/shared/env" "github.com/hashicorp/nomad/helper/discover" "github.com/hashicorp/nomad/nomad/structs" ) diff --git a/drivers/docker/driver.go b/drivers/docker/driver.go index 4c22a1783..2617254de 100644 --- a/drivers/docker/driver.go +++ b/drivers/docker/driver.go @@ -16,9 +16,9 @@ import ( "github.com/hashicorp/consul-template/signals" hclog "github.com/hashicorp/go-hclog" multierror "github.com/hashicorp/go-multierror" - "github.com/hashicorp/nomad/client/driver/env" "github.com/hashicorp/nomad/client/structs" "github.com/hashicorp/nomad/drivers/docker/docklog" + "github.com/hashicorp/nomad/drivers/shared/env" "github.com/hashicorp/nomad/drivers/shared/eventer" nstructs "github.com/hashicorp/nomad/nomad/structs" "github.com/hashicorp/nomad/plugins/base" diff --git a/drivers/docker/driver_test.go b/drivers/docker/driver_test.go index 7babd31d5..e7fc4f5b3 100644 --- a/drivers/docker/driver_test.go +++ b/drivers/docker/driver_test.go @@ -20,8 +20,8 @@ import ( "github.com/hashicorp/consul/lib/freeport" hclog "github.com/hashicorp/go-hclog" "github.com/hashicorp/nomad/client/allocdir" - "github.com/hashicorp/nomad/client/driver/env" "github.com/hashicorp/nomad/client/testutil" + "github.com/hashicorp/nomad/drivers/shared/env" "github.com/hashicorp/nomad/helper/testlog" "github.com/hashicorp/nomad/helper/uuid" "github.com/hashicorp/nomad/nomad/structs" diff --git a/drivers/rkt/driver.go b/drivers/rkt/driver.go index 45f97f2b5..2c3e48482 100644 --- a/drivers/rkt/driver.go +++ b/drivers/rkt/driver.go @@ -25,10 +25,10 @@ import ( "github.com/hashicorp/go-plugin" "github.com/hashicorp/go-version" "github.com/hashicorp/nomad/client/config" - "github.com/hashicorp/nomad/client/driver/env" "github.com/hashicorp/nomad/client/driver/executor" dstructs "github.com/hashicorp/nomad/client/driver/structs" cstructs "github.com/hashicorp/nomad/client/structs" + "github.com/hashicorp/nomad/drivers/shared/env" "github.com/hashicorp/nomad/drivers/shared/eventer" "github.com/hashicorp/nomad/plugins/base" "github.com/hashicorp/nomad/plugins/drivers" diff --git a/drivers/rkt/handle.go b/drivers/rkt/handle.go index aa6da311c..754704160 100644 --- a/drivers/rkt/handle.go +++ b/drivers/rkt/handle.go @@ -9,8 +9,8 @@ import ( hclog "github.com/hashicorp/go-hclog" plugin "github.com/hashicorp/go-plugin" - "github.com/hashicorp/nomad/client/driver/env" "github.com/hashicorp/nomad/client/driver/executor" + "github.com/hashicorp/nomad/drivers/shared/env" "github.com/hashicorp/nomad/plugins/drivers" ) diff --git a/client/driver/env/env.go b/drivers/shared/env/env.go similarity index 100% rename from client/driver/env/env.go rename to drivers/shared/env/env.go diff --git a/client/driver/env/env_test.go b/drivers/shared/env/env_test.go similarity index 100% rename from client/driver/env/env_test.go rename to drivers/shared/env/env_test.go diff --git a/client/driver/env/util.go b/drivers/shared/env/util.go similarity index 100% rename from client/driver/env/util.go rename to drivers/shared/env/util.go diff --git a/client/driver/env/util_test.go b/drivers/shared/env/util_test.go similarity index 97% rename from client/driver/env/util_test.go rename to drivers/shared/env/util_test.go index c25e710e4..5f93f82a1 100644 --- a/client/driver/env/util_test.go +++ b/drivers/shared/env/util_test.go @@ -8,9 +8,9 @@ import ( "github.com/zclconf/go-cty/cty" ) -// TestaddNestedKey_Ok asserts test cases that succeed when passed to +// TestAddNestedKey_Ok asserts test cases that succeed when passed to // addNestedKey. -func TestaddNestedKey_Ok(t *testing.T) { +func TestAddNestedKey_Ok(t *testing.T) { cases := []struct { // M will be initialized if unset M map[string]interface{} @@ -142,9 +142,9 @@ func TestaddNestedKey_Ok(t *testing.T) { } } -// TestaddNestedKey_Bad asserts test cases return an error when passed to +// TestAddNestedKey_Bad asserts test cases return an error when passed to // addNestedKey. -func TestaddNestedKey_Bad(t *testing.T) { +func TestAddNestedKey_Bad(t *testing.T) { cases := []struct { // M will be initialized if unset M func() map[string]interface{} diff --git a/plugins/drivers/testing.go b/plugins/drivers/testing.go index f205aae85..4f9e1caff 100644 --- a/plugins/drivers/testing.go +++ b/plugins/drivers/testing.go @@ -12,9 +12,9 @@ import ( plugin "github.com/hashicorp/go-plugin" "github.com/hashicorp/nomad/client/allocdir" "github.com/hashicorp/nomad/client/config" - "github.com/hashicorp/nomad/client/driver/env" "github.com/hashicorp/nomad/client/logmon" cstructs "github.com/hashicorp/nomad/client/structs" + "github.com/hashicorp/nomad/drivers/shared/env" "github.com/hashicorp/nomad/helper/testlog" "github.com/hashicorp/nomad/helper/uuid" "github.com/hashicorp/nomad/nomad/mock" diff --git a/plugins/drivers/utils/utils.go b/plugins/drivers/utils/utils.go index 95ab90f3d..b690ebce1 100644 --- a/plugins/drivers/utils/utils.go +++ b/plugins/drivers/utils/utils.go @@ -13,10 +13,10 @@ import ( "github.com/hashicorp/nomad/client/allocdir" "github.com/hashicorp/nomad/client/config" "github.com/hashicorp/nomad/client/driver" - "github.com/hashicorp/nomad/client/driver/env" "github.com/hashicorp/nomad/client/driver/executor" dstructs "github.com/hashicorp/nomad/client/driver/structs" cstructs "github.com/hashicorp/nomad/client/structs" + "github.com/hashicorp/nomad/drivers/shared/env" "github.com/hashicorp/nomad/helper/discover" "github.com/hashicorp/nomad/nomad/structs" "github.com/hashicorp/nomad/plugins/base" diff --git a/vendor/github.com/golang/snappy/encode_amd64.go b/vendor/github.com/golang/snappy/encode_amd64.go index 2a56fb504..150d91bc8 100644 --- a/vendor/github.com/golang/snappy/encode_amd64.go +++ b/vendor/github.com/golang/snappy/encode_amd64.go @@ -26,4 +26,4 @@ func extendMatch(src []byte, i, j int) int // encodeBlock has the same semantics as in encode_other.go. // //go:noescape -func encodeBlock(dst, src []byte) (d int) \ No newline at end of file +func encodeBlock(dst, src []byte) (d int) diff --git a/vendor/github.com/hashicorp/serf/serf/keymanager.go b/vendor/github.com/hashicorp/serf/serf/keymanager.go index fd53182fc..bea038cd2 100644 --- a/vendor/github.com/hashicorp/serf/serf/keymanager.go +++ b/vendor/github.com/hashicorp/serf/serf/keymanager.go @@ -189,4 +189,4 @@ func (k *KeyManager) ListKeysWithOptions(opts *KeyRequestOptions) (*KeyResponse, defer k.l.RUnlock() return k.handleKeyRequest("", listKeysQuery, opts) -} \ No newline at end of file +}