Merge pull request #18825 from sean-/master-make-dev-drift
build: Updates required to bump golang version to 1.11
This commit is contained in:
commit
813b5fd27f
|
@ -4,7 +4,7 @@ services:
|
||||||
- docker
|
- docker
|
||||||
language: go
|
language: go
|
||||||
go:
|
go:
|
||||||
- "1.10.1"
|
- "1.11"
|
||||||
|
|
||||||
# add TF_CONSUL_TEST=1 to run consul tests
|
# add TF_CONSUL_TEST=1 to run consul tests
|
||||||
# they were causing timouts in travis
|
# they were causing timouts in travis
|
||||||
|
|
|
@ -34,7 +34,7 @@ All documentation is available on the [Terraform website](http://www.terraform.i
|
||||||
Developing Terraform
|
Developing Terraform
|
||||||
--------------------
|
--------------------
|
||||||
|
|
||||||
If you wish to work on Terraform itself or any of its built-in providers, you'll first need [Go](http://www.golang.org) installed on your machine (version 1.10+ is *required*). Alternatively, you can use the Vagrantfile in the root of this repo to stand up a virtual machine with the appropriate dev tooling already set up for you.
|
If you wish to work on Terraform itself or any of its built-in providers, you'll first need [Go](http://www.golang.org) installed on your machine (version 1.11+ is *required*). Alternatively, you can use the Vagrantfile in the root of this repo to stand up a virtual machine with the appropriate dev tooling already set up for you.
|
||||||
|
|
||||||
This repository contains only Terraform core, which includes the command line interface and the main graph engine. Providers are implemented as plugins that each have their own repository in [the `terraform-providers` organization](https://github.com/terraform-providers) on GitHub. Instructions for developing each provider are in the associated README file. For more information, see [the provider development overview](https://www.terraform.io/docs/plugins/provider.html).
|
This repository contains only Terraform core, which includes the command line interface and the main graph engine. Providers are implemented as plugins that each have their own repository in [the `terraform-providers` organization](https://github.com/terraform-providers) on GitHub. Instructions for developing each provider are in the associated README file. For more information, see [the provider development overview](https://www.terraform.io/docs/plugins/provider.html).
|
||||||
|
|
||||||
|
|
|
@ -257,8 +257,8 @@ func TestBackendPrefixInWorkspace(t *testing.T) {
|
||||||
bucketName := fmt.Sprintf("terraform-remote-s3-test-%x", time.Now().Unix())
|
bucketName := fmt.Sprintf("terraform-remote-s3-test-%x", time.Now().Unix())
|
||||||
|
|
||||||
b := backend.TestBackendConfig(t, New(), map[string]interface{}{
|
b := backend.TestBackendConfig(t, New(), map[string]interface{}{
|
||||||
"bucket": bucketName,
|
"bucket": bucketName,
|
||||||
"key": "test-env.tfstate",
|
"key": "test-env.tfstate",
|
||||||
"workspace_key_prefix": "env",
|
"workspace_key_prefix": "env",
|
||||||
}).(*Backend)
|
}).(*Backend)
|
||||||
|
|
||||||
|
|
|
@ -121,7 +121,7 @@ func TestResourceProvider_linuxInstallChefClient(t *testing.T) {
|
||||||
Commands: map[string]bool{
|
Commands: map[string]bool{
|
||||||
"curl -LO https://omnitruck.chef.io/install.sh": true,
|
"curl -LO https://omnitruck.chef.io/install.sh": true,
|
||||||
"bash ./install.sh -v \"11.18.6\" -c stable": true,
|
"bash ./install.sh -v \"11.18.6\" -c stable": true,
|
||||||
"rm -f install.sh": true,
|
"rm -f install.sh": true,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -140,7 +140,7 @@ func TestResourceProvider_linuxInstallChefClient(t *testing.T) {
|
||||||
Commands: map[string]bool{
|
Commands: map[string]bool{
|
||||||
"curl -LO https://omnitruck.chef.io/install.sh": true,
|
"curl -LO https://omnitruck.chef.io/install.sh": true,
|
||||||
"bash ./install.sh -v \"11.18.6\" -c current": true,
|
"bash ./install.sh -v \"11.18.6\" -c current": true,
|
||||||
"rm -f install.sh": true,
|
"rm -f install.sh": true,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
|
@ -72,8 +72,8 @@ func (c *InitCommand) Run(args []string) int {
|
||||||
// set providerInstaller if we don't have a test version already
|
// set providerInstaller if we don't have a test version already
|
||||||
if c.providerInstaller == nil {
|
if c.providerInstaller == nil {
|
||||||
c.providerInstaller = &discovery.ProviderInstaller{
|
c.providerInstaller = &discovery.ProviderInstaller{
|
||||||
Dir: c.pluginDir(),
|
Dir: c.pluginDir(),
|
||||||
Cache: c.pluginCache(),
|
Cache: c.pluginCache(),
|
||||||
PluginProtocolVersion: plugin.Handshake.ProtocolVersion,
|
PluginProtocolVersion: plugin.Handshake.ProtocolVersion,
|
||||||
SkipVerify: !flagVerifyPlugins,
|
SkipVerify: !flagVerifyPlugins,
|
||||||
Ui: c.Ui,
|
Ui: c.Ui,
|
||||||
|
|
|
@ -1434,7 +1434,7 @@ func TestMetaBackend_configuredChangeCopy_multiToNoDefaultWithDefault(t *testing
|
||||||
// Ask input
|
// Ask input
|
||||||
defer testInputMap(t, map[string]string{
|
defer testInputMap(t, map[string]string{
|
||||||
"backend-migrate-multistate-to-multistate": "yes",
|
"backend-migrate-multistate-to-multistate": "yes",
|
||||||
"new-state-name": "env1",
|
"new-state-name": "env1",
|
||||||
})()
|
})()
|
||||||
|
|
||||||
// Setup the meta
|
// Setup the meta
|
||||||
|
|
|
@ -23,28 +23,28 @@ func TestResourceTimeout_ConfigDecode_badkey(t *testing.T) {
|
||||||
ShouldErr bool
|
ShouldErr bool
|
||||||
}{
|
}{
|
||||||
{
|
{
|
||||||
Name: "Source does not define 'delete' key",
|
Name: "Source does not define 'delete' key",
|
||||||
ResourceDefaultTimeout: timeoutForValues(10, 0, 5, 0, 0),
|
ResourceDefaultTimeout: timeoutForValues(10, 0, 5, 0, 0),
|
||||||
Config: expectedConfigForValues(2, 0, 0, 1, 0),
|
Config: expectedConfigForValues(2, 0, 0, 1, 0),
|
||||||
Expected: timeoutForValues(10, 0, 5, 0, 0),
|
Expected: timeoutForValues(10, 0, 5, 0, 0),
|
||||||
ShouldErr: true,
|
ShouldErr: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
Name: "Config overrides create",
|
Name: "Config overrides create",
|
||||||
ResourceDefaultTimeout: timeoutForValues(10, 0, 5, 0, 0),
|
ResourceDefaultTimeout: timeoutForValues(10, 0, 5, 0, 0),
|
||||||
Config: expectedConfigForValues(2, 0, 7, 0, 0),
|
Config: expectedConfigForValues(2, 0, 7, 0, 0),
|
||||||
Expected: timeoutForValues(2, 0, 7, 0, 0),
|
Expected: timeoutForValues(2, 0, 7, 0, 0),
|
||||||
ShouldErr: false,
|
ShouldErr: false,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
Name: "Config overrides create, default provided. Should still have zero values",
|
Name: "Config overrides create, default provided. Should still have zero values",
|
||||||
ResourceDefaultTimeout: timeoutForValues(10, 0, 5, 0, 3),
|
ResourceDefaultTimeout: timeoutForValues(10, 0, 5, 0, 3),
|
||||||
Config: expectedConfigForValues(2, 0, 7, 0, 0),
|
Config: expectedConfigForValues(2, 0, 7, 0, 0),
|
||||||
Expected: timeoutForValues(2, 0, 7, 0, 3),
|
Expected: timeoutForValues(2, 0, 7, 0, 3),
|
||||||
ShouldErr: false,
|
ShouldErr: false,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
Name: "Use something besides 'minutes'",
|
Name: "Use something besides 'minutes'",
|
||||||
ResourceDefaultTimeout: timeoutForValues(10, 0, 5, 0, 3),
|
ResourceDefaultTimeout: timeoutForValues(10, 0, 5, 0, 3),
|
||||||
Config: []map[string]interface{}{
|
Config: []map[string]interface{}{
|
||||||
map[string]interface{}{
|
map[string]interface{}{
|
||||||
|
|
|
@ -2056,7 +2056,7 @@ func TestSchemaMap_Diff(t *testing.T) {
|
||||||
|
|
||||||
State: &terraform.InstanceState{
|
State: &terraform.InstanceState{
|
||||||
Attributes: map[string]string{
|
Attributes: map[string]string{
|
||||||
"block_device.#": "2",
|
"block_device.#": "2",
|
||||||
"block_device.616397234.delete_on_termination": "true",
|
"block_device.616397234.delete_on_termination": "true",
|
||||||
"block_device.616397234.device_name": "/dev/sda1",
|
"block_device.616397234.device_name": "/dev/sda1",
|
||||||
"block_device.2801811477.delete_on_termination": "true",
|
"block_device.2801811477.delete_on_termination": "true",
|
||||||
|
|
|
@ -148,7 +148,7 @@ func TestProviderInstallerGet(t *testing.T) {
|
||||||
|
|
||||||
// attempt to use an incompatible protocol version
|
// attempt to use an incompatible protocol version
|
||||||
i := &ProviderInstaller{
|
i := &ProviderInstaller{
|
||||||
Dir: tmpDir,
|
Dir: tmpDir,
|
||||||
PluginProtocolVersion: 5,
|
PluginProtocolVersion: 5,
|
||||||
SkipVerify: true,
|
SkipVerify: true,
|
||||||
Ui: cli.NewMockUi(),
|
Ui: cli.NewMockUi(),
|
||||||
|
@ -159,7 +159,7 @@ func TestProviderInstallerGet(t *testing.T) {
|
||||||
}
|
}
|
||||||
|
|
||||||
i = &ProviderInstaller{
|
i = &ProviderInstaller{
|
||||||
Dir: tmpDir,
|
Dir: tmpDir,
|
||||||
PluginProtocolVersion: 3,
|
PluginProtocolVersion: 3,
|
||||||
SkipVerify: true,
|
SkipVerify: true,
|
||||||
Ui: cli.NewMockUi(),
|
Ui: cli.NewMockUi(),
|
||||||
|
@ -231,7 +231,7 @@ func TestProviderInstallerPurgeUnused(t *testing.T) {
|
||||||
f.Close()
|
f.Close()
|
||||||
|
|
||||||
i := &ProviderInstaller{
|
i := &ProviderInstaller{
|
||||||
Dir: tmpDir,
|
Dir: tmpDir,
|
||||||
PluginProtocolVersion: 3,
|
PluginProtocolVersion: 3,
|
||||||
SkipVerify: true,
|
SkipVerify: true,
|
||||||
Ui: cli.NewMockUi(),
|
Ui: cli.NewMockUi(),
|
||||||
|
|
|
@ -29,8 +29,8 @@ import (
|
||||||
"errors"
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
"sync"
|
"sync"
|
||||||
. "syscall"
|
"syscall"
|
||||||
. "unsafe"
|
"unsafe"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Maximum size of message can be sent to pageant
|
// Maximum size of message can be sent to pageant
|
||||||
|
@ -53,7 +53,7 @@ const (
|
||||||
type copyData struct {
|
type copyData struct {
|
||||||
dwData uintptr
|
dwData uintptr
|
||||||
cbData uint32
|
cbData uint32
|
||||||
lpData Pointer
|
lpData unsafe.Pointer
|
||||||
}
|
}
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
@ -65,7 +65,7 @@ var (
|
||||||
)
|
)
|
||||||
|
|
||||||
func winAPI(dllName, funcName string) func(...uintptr) (uintptr, uintptr, error) {
|
func winAPI(dllName, funcName string) func(...uintptr) (uintptr, uintptr, error) {
|
||||||
proc := MustLoadDLL(dllName).MustFindProc(funcName)
|
proc := syscall.MustLoadDLL(dllName).MustFindProc(funcName)
|
||||||
return func(a ...uintptr) (uintptr, uintptr, error) { return proc.Call(a...) }
|
return func(a ...uintptr) (uintptr, uintptr, error) { return proc.Call(a...) }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -96,21 +96,21 @@ func query(msg []byte) ([]byte, error) {
|
||||||
|
|
||||||
thID, _, _ := winGetCurrentThreadID()
|
thID, _, _ := winGetCurrentThreadID()
|
||||||
mapName := fmt.Sprintf("PageantRequest%08x", thID)
|
mapName := fmt.Sprintf("PageantRequest%08x", thID)
|
||||||
pMapName, _ := UTF16PtrFromString(mapName)
|
pMapName, _ := syscall.UTF16PtrFromString(mapName)
|
||||||
|
|
||||||
mmap, err := CreateFileMapping(InvalidHandle, nil, PAGE_READWRITE, 0, MaxMessageLen+4, pMapName)
|
mmap, err := syscall.CreateFileMapping(syscall.InvalidHandle, nil, syscall.PAGE_READWRITE, 0, MaxMessageLen+4, pMapName)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
defer CloseHandle(mmap)
|
defer syscall.CloseHandle(mmap)
|
||||||
|
|
||||||
ptr, err := MapViewOfFile(mmap, FILE_MAP_WRITE, 0, 0, 0)
|
ptr, err := syscall.MapViewOfFile(mmap, syscall.FILE_MAP_WRITE, 0, 0, 0)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
defer UnmapViewOfFile(ptr)
|
defer syscall.UnmapViewOfFile(ptr)
|
||||||
|
|
||||||
mmSlice := (*(*[MaxMessageLen]byte)(Pointer(ptr)))[:]
|
mmSlice := (*(*[MaxMessageLen]byte)(unsafe.Pointer(ptr)))[:]
|
||||||
|
|
||||||
copy(mmSlice, msg)
|
copy(mmSlice, msg)
|
||||||
|
|
||||||
|
@ -119,10 +119,10 @@ func query(msg []byte) ([]byte, error) {
|
||||||
cds := copyData{
|
cds := copyData{
|
||||||
dwData: agentCopydataID,
|
dwData: agentCopydataID,
|
||||||
cbData: uint32(len(mapNameBytesZ)),
|
cbData: uint32(len(mapNameBytesZ)),
|
||||||
lpData: Pointer(&(mapNameBytesZ[0])),
|
lpData: unsafe.Pointer(&(mapNameBytesZ[0])),
|
||||||
}
|
}
|
||||||
|
|
||||||
resp, _, _ := winSendMessage(paWin, wmCopydata, 0, uintptr(Pointer(&cds)))
|
resp, _, _ := winSendMessage(paWin, wmCopydata, 0, uintptr(unsafe.Pointer(&cds)))
|
||||||
|
|
||||||
if resp == 0 {
|
if resp == 0 {
|
||||||
return nil, ErrSendMessage
|
return nil, ErrSendMessage
|
||||||
|
@ -140,7 +140,7 @@ func query(msg []byte) ([]byte, error) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func pageantWindow() uintptr {
|
func pageantWindow() uintptr {
|
||||||
nameP, _ := UTF16PtrFromString("Pageant")
|
nameP, _ := syscall.UTF16PtrFromString("Pageant")
|
||||||
h, _, _ := winFindWindow(uintptr(Pointer(nameP)), uintptr(Pointer(nameP)))
|
h, _, _ := winFindWindow(uintptr(unsafe.Pointer(nameP)), uintptr(unsafe.Pointer(nameP)))
|
||||||
return h
|
return h
|
||||||
}
|
}
|
||||||
|
|
|
@ -2408,10 +2408,10 @@
|
||||||
"revisionTime": "2017-06-05T21:53:11Z"
|
"revisionTime": "2017-06-05T21:53:11Z"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"checksumSHA1": "iHiMTBffQvWYlOLu3130JXuQpgQ=",
|
"checksumSHA1": "VNhImVFfxO7x8Kp1BrM2zgp4vi0=",
|
||||||
"path": "github.com/xanzy/ssh-agent",
|
"path": "github.com/xanzy/ssh-agent",
|
||||||
"revision": "ba9c9e33906f58169366275e3450db66139a31a9",
|
"revision": "640f0ab560aeb89d523bb6ac322b1244d5c3796c",
|
||||||
"revisionTime": "2015-12-15T15:34:51Z"
|
"revisionTime": "2018-07-03T18:17:07Z"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"checksumSHA1": "xtw+Llokq30p1Gn+Q8JBZ7NtE+I=",
|
"checksumSHA1": "xtw+Llokq30p1Gn+Q8JBZ7NtE+I=",
|
||||||
|
|
Loading…
Reference in New Issue