Merge pull request #16992 from hashicorp/jbardin/go1.10-prep

go1.10 prep
This commit is contained in:
James Bardin 2018-01-03 15:41:41 -05:00 committed by GitHub
commit dd5882e5b2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
14 changed files with 2 additions and 17 deletions

View File

@ -78,7 +78,6 @@ func (b *Backend) State(name string) (state.State, error) {
//if this isn't the default state name, we need to create the object so
//it's listed by States.
if name != backend.DefaultStateName {
// take a lock on this state while we write it
lockInfo := state.NewLockInfo()
lockInfo.Operation = "init"

View File

@ -64,7 +64,6 @@ func TestBackendLocked(t *testing.T) {
}
func createMantaFolder(t *testing.T, mantaClient *storage.StorageClient, directoryName string) {
// Be clear about what we're doing in case the user needs to clean
// this up later.
//t.Logf("creating Manta directory %s", directoryName)

View File

@ -88,7 +88,6 @@ func (c *RemoteClient) Delete() error {
}
func (c *RemoteClient) Lock(info *state.LockInfo) (string, error) {
//At Joyent, we want to make sure that the State directory exists before we interact with it
//We don't expect users to have to create it in advance
//The order of operations of Backend State as follows:

View File

@ -213,7 +213,6 @@ func downloadSwiftObject(t *testing.T, osClient *gophercloud.ServiceClient, cont
// Helper function to get a list of objects in a Swift container
func getSwiftObjectNames(t *testing.T, osClient *gophercloud.ServiceClient, container string) (objectNames []string) {
_ = objects.List(osClient, container, nil).EachPage(func(page pagination.Page) (bool, error) {
// Get a slice of object names
names, err := objects.ExtractNames(page)
if err != nil {

View File

@ -558,7 +558,6 @@ func (p *provisioner) startHabUnmanaged(o terraform.UIOutput, comm communicator.
}
func (p *provisioner) startHabSystemd(o terraform.UIOutput, comm communicator.Communicator, options string) error {
// Create a new template and parse the client config into it
unitString := template.Must(template.New("hab-supervisor.service").Parse(systemdUnit))

View File

@ -862,7 +862,6 @@ func TestApply_shutdown(t *testing.T) {
*terraform.InstanceInfo,
*terraform.InstanceState,
*terraform.InstanceDiff) (*terraform.InstanceState, error) {
// only cancel once
if !cancelled {
shutdownCh <- struct{}{}

View File

@ -32,7 +32,6 @@ func configDir() (string, error) {
func homeDir() (string, error) {
// First prefer the HOME environmental variable
if home := os.Getenv("HOME"); home != "" {
// FIXME: homeDir gets called from globalPluginDirs during init, before
// the logging is setup. We should move meta initializtion outside of
// init, but in the meantime we just need to silence this output.

View File

@ -470,10 +470,7 @@ func TestTest_importStateIdFuncFail(t *testing.T) {
return s, nil
}
checked := false
checkFn := func(s []*terraform.InstanceState) error {
checked = true
if s[0].ID != "foo" {
return fmt.Errorf("bad: %#v", s)
}

View File

@ -282,7 +282,6 @@ func (r *Resource) ReadDataApply(
d *terraform.InstanceDiff,
meta interface{},
) (*terraform.InstanceState, error) {
// Data sources are always built completely from scratch
// on each read, so the source state is always nil.
data, err := schemaMap(r.Schema).Data(nil, d)

View File

@ -1528,7 +1528,6 @@ func (m schemaMap) validatePrimitive(
raw interface{},
schema *Schema,
c *terraform.ResourceConfig) ([]string, []error) {
// Catch if the user gave a complex type where a primitive was
// expected, so we can return a friendly error message that
// doesn't contain Go type system terminology.

View File

@ -3883,7 +3883,6 @@ func TestContext2Apply_outputDependsOn(t *testing.T) {
info *InstanceInfo,
is *InstanceState,
id *InstanceDiff) (*InstanceState, error) {
// Sleep to allow parallel execution
time.Sleep(50 * time.Millisecond)

View File

@ -142,7 +142,6 @@ func (i *Interpolater) valueModuleVar(
n string,
v *config.ModuleVariable,
result map[string]ast.Variable) error {
// Build the path to the child module we want
path := make([]string, len(scope.Path), len(scope.Path)+1)
copy(path, scope.Path)
@ -319,7 +318,6 @@ func (i *Interpolater) valueTerraformVar(
n string,
v *config.TerraformVariable,
result map[string]ast.Variable) error {
// "env" is supported for backward compatibility, but it's deprecated and
// so we won't advertise it as being allowed in the error message. It will
// be removed in a future version of Terraform.
@ -701,7 +699,6 @@ func (i *Interpolater) computeResourceMultiVariable(
func (i *Interpolater) interpolateComplexTypeAttribute(
resourceID string,
attributes map[string]string) (ast.Variable, error) {
// We can now distinguish between lists and maps in state by the count field:
// - lists (and by extension, sets) use the traditional .# notation
// - maps use the newer .% notation

View File

@ -17,7 +17,6 @@ import (
// present in the configuration. This is guaranteed not to happen for any
// configuration that has passed a call to Config.Validate().
func ModuleTreeDependencies(root *module.Tree, state *State) *moduledeps.Module {
// First we walk the configuration tree to build the overall structure
// and capture the explicit/implicit/inherited provider dependencies.
deps := moduleTreeConfigDependencies(root, nil)

View File

@ -0,0 +1,2 @@
// terraform bundle e2e tests
package e2etest