gofmt all the files
mostly to handle build directives in 1.17.
This commit is contained in:
parent
6c7519fc10
commit
4d90afb425
|
@ -1,3 +1,4 @@
|
||||||
|
//go:build ent
|
||||||
// +build ent
|
// +build ent
|
||||||
|
|
||||||
package api
|
package api
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
//go:build ent
|
||||||
// +build ent
|
// +build ent
|
||||||
|
|
||||||
package api
|
package api
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
//go:build ent
|
||||||
// +build ent
|
// +build ent
|
||||||
|
|
||||||
package api
|
package api
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
//go:build linux && cgo
|
||||||
// +build linux,cgo
|
// +build linux,cgo
|
||||||
|
|
||||||
// #cgo LDFLAGS: -mfloat-abi=hard
|
// #cgo LDFLAGS: -mfloat-abi=hard
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
//go:build darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris
|
||||||
// +build darwin dragonfly freebsd linux netbsd openbsd solaris
|
// +build darwin dragonfly freebsd linux netbsd openbsd solaris
|
||||||
|
|
||||||
package allocdir
|
package allocdir
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
//go:build !linux
|
||||||
// +build !linux
|
// +build !linux
|
||||||
|
|
||||||
package allocdir
|
package allocdir
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
//go:build !windows
|
||||||
// +build !windows
|
// +build !windows
|
||||||
|
|
||||||
package allocrunner
|
package allocrunner
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
//+build !linux
|
//go:build !linux
|
||||||
|
// +build !linux
|
||||||
|
|
||||||
package allocrunner
|
package allocrunner
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
// For now CNI is supported only on Linux.
|
// For now CNI is supported only on Linux.
|
||||||
//
|
//
|
||||||
//+build linux
|
//go:build linux
|
||||||
|
// +build linux
|
||||||
|
|
||||||
package allocrunner
|
package allocrunner
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
//go:build linux
|
||||||
// +build linux
|
// +build linux
|
||||||
|
|
||||||
package allocrunner
|
package allocrunner
|
||||||
|
@ -19,10 +20,10 @@ func TestCNI_cniToAllocNet_Fallback(t *testing.T) {
|
||||||
// following:
|
// following:
|
||||||
cniResult := &cni.CNIResult{
|
cniResult := &cni.CNIResult{
|
||||||
Interfaces: map[string]*cni.Config{
|
Interfaces: map[string]*cni.Config{
|
||||||
"cali39179aa3-74": &cni.Config{},
|
"cali39179aa3-74": {},
|
||||||
"eth0": &cni.Config{
|
"eth0": {
|
||||||
IPConfigs: []*cni.IPConfig{
|
IPConfigs: []*cni.IPConfig{
|
||||||
&cni.IPConfig{
|
{
|
||||||
IP: net.IPv4(192, 168, 135, 232),
|
IP: net.IPv4(192, 168, 135, 232),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
@ -48,8 +49,8 @@ func TestCNI_cniToAllocNet_Fallback(t *testing.T) {
|
||||||
func TestCNI_cniToAllocNet_Invalid(t *testing.T) {
|
func TestCNI_cniToAllocNet_Invalid(t *testing.T) {
|
||||||
cniResult := &cni.CNIResult{
|
cniResult := &cni.CNIResult{
|
||||||
Interfaces: map[string]*cni.Config{
|
Interfaces: map[string]*cni.Config{
|
||||||
"eth0": &cni.Config{},
|
"eth0": {},
|
||||||
"veth1": &cni.Config{
|
"veth1": {
|
||||||
IPConfigs: []*cni.IPConfig{},
|
IPConfigs: []*cni.IPConfig{},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
|
@ -1,4 +1,6 @@
|
||||||
|
//go:build !windows
|
||||||
// +build !windows
|
// +build !windows
|
||||||
|
|
||||||
// todo(shoenig): Once Connect is supported on Windows, we'll need to make this
|
// todo(shoenig): Once Connect is supported on Windows, we'll need to make this
|
||||||
// set of tests work there too.
|
// set of tests work there too.
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
//go:build !windows
|
||||||
// +build !windows
|
// +build !windows
|
||||||
|
|
||||||
package taskrunner
|
package taskrunner
|
||||||
|
|
|
@ -1,4 +1,6 @@
|
||||||
|
//go:build !windows
|
||||||
// +build !windows
|
// +build !windows
|
||||||
|
|
||||||
// todo(shoenig): Once Connect is supported on Windows, we'll need to make this
|
// todo(shoenig): Once Connect is supported on Windows, we'll need to make this
|
||||||
// set of tests work there too.
|
// set of tests work there too.
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
//go:build !release
|
||||||
// +build !release
|
// +build !release
|
||||||
|
|
||||||
package allocrunner
|
package allocrunner
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
//go:build !windows
|
||||||
// +build !windows
|
// +build !windows
|
||||||
|
|
||||||
package allocwatcher
|
package allocwatcher
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
//go:build !ent
|
||||||
// +build !ent
|
// +build !ent
|
||||||
|
|
||||||
package client
|
package client
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
//go:build !linux
|
||||||
// +build !linux
|
// +build !linux
|
||||||
|
|
||||||
package fingerprint
|
package fingerprint
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
//go:build !linux
|
||||||
// +build !linux
|
// +build !linux
|
||||||
|
|
||||||
package fingerprint
|
package fingerprint
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
//go:build linux
|
||||||
// +build linux
|
// +build linux
|
||||||
|
|
||||||
package fingerprint
|
package fingerprint
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
//go:build linux
|
||||||
// +build linux
|
// +build linux
|
||||||
|
|
||||||
package fingerprint
|
package fingerprint
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
//+build !linux
|
//go:build !linux
|
||||||
|
// +build !linux
|
||||||
|
|
||||||
package fingerprint
|
package fingerprint
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
//go:build darwin || dragonfly || freebsd || netbsd || openbsd || solaris || windows
|
||||||
// +build darwin dragonfly freebsd netbsd openbsd solaris windows
|
// +build darwin dragonfly freebsd netbsd openbsd solaris windows
|
||||||
|
|
||||||
package fingerprint
|
package fingerprint
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
//go:build !linux && !windows
|
||||||
// +build !linux,!windows
|
// +build !linux,!windows
|
||||||
|
|
||||||
package fingerprint
|
package fingerprint
|
||||||
|
|
|
@ -479,7 +479,7 @@ func TestNetworkFingerPrint_MultipleAliases(t *testing.T) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
expected := []string{}
|
expected := []string{}
|
||||||
for alias, _ := range cfg.HostNetworks {
|
for alias := range cfg.HostNetworks {
|
||||||
expected = append(expected, alias)
|
expected = append(expected, alias)
|
||||||
}
|
}
|
||||||
sort.Strings(expected)
|
sort.Strings(expected)
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
//go:build darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris
|
||||||
// +build darwin dragonfly freebsd linux netbsd openbsd solaris
|
// +build darwin dragonfly freebsd linux netbsd openbsd solaris
|
||||||
|
|
||||||
package fingerprint
|
package fingerprint
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
//go:build !linux
|
||||||
// +build !linux
|
// +build !linux
|
||||||
|
|
||||||
package cgutil
|
package cgutil
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
//go:build !linux
|
||||||
// +build !linux
|
// +build !linux
|
||||||
|
|
||||||
package cgutil
|
package cgutil
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
//go:build !windows
|
||||||
// +build !windows
|
// +build !windows
|
||||||
|
|
||||||
package fifo
|
package fifo
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
//go:build !release
|
||||||
// +build !release
|
// +build !release
|
||||||
|
|
||||||
package drivermanager
|
package drivermanager
|
||||||
|
|
|
@ -196,7 +196,7 @@ func TestStateDB_Batch(t *testing.T) {
|
||||||
if getTxID != nil {
|
if getTxID != nil {
|
||||||
numTransactions := getTxID() - prevTxID
|
numTransactions := getTxID() - prevTxID
|
||||||
writeTime := time.Now().Sub(startTime)
|
writeTime := time.Now().Sub(startTime)
|
||||||
expectedNumTransactions := ceilDiv(2 * numAllocs, batchSize) + ceilDiv(int(writeTime), int(batchDelay))
|
expectedNumTransactions := ceilDiv(2*numAllocs, batchSize) + ceilDiv(int(writeTime), int(batchDelay))
|
||||||
require.LessOrEqual(numTransactions, expectedNumTransactions)
|
require.LessOrEqual(numTransactions, expectedNumTransactions)
|
||||||
prevTxID = getTxID()
|
prevTxID = getTxID()
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
//go:build !ent
|
||||||
// +build !ent
|
// +build !ent
|
||||||
|
|
||||||
package agent
|
package agent
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
//go:build !ent
|
||||||
// +build !ent
|
// +build !ent
|
||||||
|
|
||||||
package agent
|
package agent
|
||||||
|
|
|
@ -12,6 +12,6 @@ func TestConnectProxies_Proxies(t *testing.T) {
|
||||||
proxies, err := pc.Proxies()
|
proxies, err := pc.Proxies()
|
||||||
require.NoError(t, err)
|
require.NoError(t, err)
|
||||||
require.Equal(t, map[string][]string{
|
require.Equal(t, map[string][]string{
|
||||||
"envoy": []string{"1.14.2", "1.13.2", "1.12.4", "1.11.2"},
|
"envoy": {"1.14.2", "1.13.2", "1.12.4", "1.11.2"},
|
||||||
}, proxies)
|
}, proxies)
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
//go:build darwin
|
||||||
// +build darwin
|
// +build darwin
|
||||||
|
|
||||||
package host
|
package host
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
//go:build linux
|
||||||
// +build linux
|
// +build linux
|
||||||
|
|
||||||
package host
|
package host
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
//go:build !windows
|
||||||
// +build !windows
|
// +build !windows
|
||||||
|
|
||||||
package host
|
package host
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
//go:build windows
|
||||||
// +build windows
|
// +build windows
|
||||||
|
|
||||||
package host
|
package host
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
//go:build !ent
|
||||||
// +build !ent
|
// +build !ent
|
||||||
|
|
||||||
package agent
|
package agent
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
//go:build ent
|
||||||
// +build ent
|
// +build ent
|
||||||
|
|
||||||
package agent
|
package agent
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
//go:build !ent
|
||||||
// +build !ent
|
// +build !ent
|
||||||
|
|
||||||
package agent
|
package agent
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
//go:build !ui
|
||||||
// +build !ui
|
// +build !ui
|
||||||
|
|
||||||
package agent
|
package agent
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
//go:build !ent
|
||||||
// +build !ent
|
// +build !ent
|
||||||
|
|
||||||
package agent
|
package agent
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
//go:build darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris
|
||||||
// +build darwin dragonfly freebsd linux netbsd openbsd solaris
|
// +build darwin dragonfly freebsd linux netbsd openbsd solaris
|
||||||
|
|
||||||
package command
|
package command
|
||||||
|
|
|
@ -133,9 +133,9 @@ func TestAllocStatusCommand_LifecycleInfo(t *testing.T) {
|
||||||
a.TaskResources["init_task"] = a.TaskResources["web"]
|
a.TaskResources["init_task"] = a.TaskResources["web"]
|
||||||
a.TaskResources["prestart_sidecar"] = a.TaskResources["web"]
|
a.TaskResources["prestart_sidecar"] = a.TaskResources["web"]
|
||||||
a.TaskStates = map[string]*structs.TaskState{
|
a.TaskStates = map[string]*structs.TaskState{
|
||||||
"web": &structs.TaskState{State: "pending"},
|
"web": {State: "pending"},
|
||||||
"init_task": &structs.TaskState{State: "running"},
|
"init_task": {State: "running"},
|
||||||
"prestart_sidecar": &structs.TaskState{State: "running"},
|
"prestart_sidecar": {State: "running"},
|
||||||
}
|
}
|
||||||
|
|
||||||
require.Nil(t, state.UpsertAllocs(structs.MsgTypeTestSetup, 1000, []*structs.Allocation{a}))
|
require.Nil(t, state.UpsertAllocs(structs.MsgTypeTestSetup, 1000, []*structs.Allocation{a}))
|
||||||
|
@ -429,7 +429,7 @@ func TestAllocStatusCommand_HostVolumes(t *testing.T) {
|
||||||
// fakes the placement enough so that we have something to iterate
|
// fakes the placement enough so that we have something to iterate
|
||||||
// on in 'nomad alloc status'
|
// on in 'nomad alloc status'
|
||||||
alloc.TaskStates = map[string]*structs.TaskState{
|
alloc.TaskStates = map[string]*structs.TaskState{
|
||||||
"web": &structs.TaskState{
|
"web": {
|
||||||
Events: []*structs.TaskEvent{
|
Events: []*structs.TaskEvent{
|
||||||
structs.NewTaskEvent("test event").SetMessage("test msg"),
|
structs.NewTaskEvent("test event").SetMessage("test msg"),
|
||||||
},
|
},
|
||||||
|
@ -504,7 +504,7 @@ func TestAllocStatusCommand_CSIVolumes(t *testing.T) {
|
||||||
}
|
}
|
||||||
// if we don't set a task state, there's nothing to iterate on alloc status
|
// if we don't set a task state, there's nothing to iterate on alloc status
|
||||||
alloc.TaskStates = map[string]*structs.TaskState{
|
alloc.TaskStates = map[string]*structs.TaskState{
|
||||||
"web": &structs.TaskState{
|
"web": {
|
||||||
Events: []*structs.TaskEvent{
|
Events: []*structs.TaskEvent{
|
||||||
structs.NewTaskEvent("test event").SetMessage("test msg"),
|
structs.NewTaskEvent("test event").SetMessage("test msg"),
|
||||||
},
|
},
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
//go:build !ent
|
||||||
// +build !ent
|
// +build !ent
|
||||||
|
|
||||||
package command
|
package command
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
//go:build ent
|
||||||
// +build ent
|
// +build ent
|
||||||
|
|
||||||
package command
|
package command
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
//go:build ent
|
||||||
// +build ent
|
// +build ent
|
||||||
|
|
||||||
package command
|
package command
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
//go:build ent
|
||||||
// +build ent
|
// +build ent
|
||||||
|
|
||||||
package command
|
package command
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
//go:build ent
|
||||||
// +build ent
|
// +build ent
|
||||||
|
|
||||||
package command
|
package command
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
//go:build ent
|
||||||
// +build ent
|
// +build ent
|
||||||
|
|
||||||
package command
|
package command
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
//go:build ent
|
||||||
// +build ent
|
// +build ent
|
||||||
|
|
||||||
package command
|
package command
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
//go:build ent
|
||||||
// +build ent
|
// +build ent
|
||||||
|
|
||||||
package command
|
package command
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
//go:build ent
|
||||||
// +build ent
|
// +build ent
|
||||||
|
|
||||||
package command
|
package command
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
//go:build ent
|
||||||
// +build ent
|
// +build ent
|
||||||
|
|
||||||
package command
|
package command
|
||||||
|
|
|
@ -694,12 +694,12 @@ func TestConfig_DriverConfig_AllowRuntimes(t *testing.T) {
|
||||||
{
|
{
|
||||||
name: "pure default",
|
name: "pure default",
|
||||||
config: `{}`,
|
config: `{}`,
|
||||||
expected: map[string]struct{}{"runc": struct{}{}, "nvidia": struct{}{}},
|
expected: map[string]struct{}{"runc": {}, "nvidia": {}},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "custom",
|
name: "custom",
|
||||||
config: `{ allow_runtimes = ["runc", "firecracker"]}`,
|
config: `{ allow_runtimes = ["runc", "firecracker"]}`,
|
||||||
expected: map[string]struct{}{"runc": struct{}{}, "firecracker": struct{}{}},
|
expected: map[string]struct{}{"runc": {}, "firecracker": {}},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
//+build !windows
|
//go:build !windows
|
||||||
|
// +build !windows
|
||||||
|
|
||||||
package docker
|
package docker
|
||||||
|
|
||||||
|
|
|
@ -1224,12 +1224,12 @@ func TestDockerDriver_CreateContainerConfig_Mounts(t *testing.T) {
|
||||||
defer freeport.Return(ports)
|
defer freeport.Return(ports)
|
||||||
|
|
||||||
cfg.Mounts = []DockerMount{
|
cfg.Mounts = []DockerMount{
|
||||||
DockerMount{
|
{
|
||||||
Type: "bind",
|
Type: "bind",
|
||||||
Target: "/map-bind-target",
|
Target: "/map-bind-target",
|
||||||
Source: "/map-source",
|
Source: "/map-source",
|
||||||
},
|
},
|
||||||
DockerMount{
|
{
|
||||||
Type: "tmpfs",
|
Type: "tmpfs",
|
||||||
Target: "/map-tmpfs-target",
|
Target: "/map-tmpfs-target",
|
||||||
},
|
},
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
//go:build darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris
|
||||||
// +build darwin dragonfly freebsd linux netbsd openbsd solaris
|
// +build darwin dragonfly freebsd linux netbsd openbsd solaris
|
||||||
|
|
||||||
package docker
|
package docker
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
//go:build windows
|
||||||
// +build windows
|
// +build windows
|
||||||
|
|
||||||
package docker
|
package docker
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
//go:build !windows
|
||||||
// +build !windows
|
// +build !windows
|
||||||
|
|
||||||
package util
|
package util
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
//go:build darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris
|
||||||
// +build darwin dragonfly freebsd linux netbsd openbsd solaris
|
// +build darwin dragonfly freebsd linux netbsd openbsd solaris
|
||||||
|
|
||||||
package docker
|
package docker
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
//go:build windows
|
||||||
// +build windows
|
// +build windows
|
||||||
|
|
||||||
package docker
|
package docker
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
//go:build darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris
|
||||||
// +build darwin dragonfly freebsd linux netbsd openbsd solaris
|
// +build darwin dragonfly freebsd linux netbsd openbsd solaris
|
||||||
|
|
||||||
package exec
|
package exec
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
//go:build !windows
|
||||||
// +build !windows
|
// +build !windows
|
||||||
|
|
||||||
package rawexec
|
package rawexec
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
//go:build !linux
|
||||||
// +build !linux
|
// +build !linux
|
||||||
|
|
||||||
package executor
|
package executor
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
//go:build linux
|
||||||
// +build linux
|
// +build linux
|
||||||
|
|
||||||
package executor
|
package executor
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
//go:build darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris
|
||||||
// +build darwin dragonfly freebsd linux netbsd openbsd solaris
|
// +build darwin dragonfly freebsd linux netbsd openbsd solaris
|
||||||
|
|
||||||
package executor
|
package executor
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
//go:build darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris
|
||||||
// +build darwin dragonfly freebsd linux netbsd openbsd solaris
|
// +build darwin dragonfly freebsd linux netbsd openbsd solaris
|
||||||
|
|
||||||
package executor
|
package executor
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
//go:build windows
|
||||||
// +build windows
|
// +build windows
|
||||||
|
|
||||||
package executor
|
package executor
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
//go:build darwin || dragonfly || freebsd || netbsd || openbsd || solaris || windows
|
||||||
// +build darwin dragonfly freebsd netbsd openbsd solaris windows
|
// +build darwin dragonfly freebsd netbsd openbsd solaris windows
|
||||||
|
|
||||||
package executor
|
package executor
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
//go:build darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris
|
||||||
// +build darwin dragonfly freebsd linux netbsd openbsd solaris
|
// +build darwin dragonfly freebsd linux netbsd openbsd solaris
|
||||||
|
|
||||||
package executor
|
package executor
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
//go:build !windows
|
||||||
// +build !windows
|
// +build !windows
|
||||||
|
|
||||||
package hostnames
|
package hostnames
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
//go:build !windows
|
||||||
// +build !windows
|
// +build !windows
|
||||||
|
|
||||||
package resolvconf
|
package resolvconf
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
//go:build !ent
|
||||||
// +build !ent
|
// +build !ent
|
||||||
|
|
||||||
// Nomad OSS ignores Consul Namespace configuration in jobs, these e2e tests
|
// Nomad OSS ignores Consul Namespace configuration in jobs, these e2e tests
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
//+build linux
|
//go:build linux
|
||||||
|
// +build linux
|
||||||
|
|
||||||
package nomad09upgrade
|
package nomad09upgrade
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
//+build !linux
|
//go:build !linux
|
||||||
|
// +build !linux
|
||||||
|
|
||||||
package nomad09upgrade
|
package nomad09upgrade
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
//go:build !ent
|
||||||
// +build !ent
|
// +build !ent
|
||||||
|
|
||||||
package quotas
|
package quotas
|
||||||
|
|
|
@ -70,7 +70,7 @@ func syncVault(t *testing.T) ([]*version.Version, map[string]string) {
|
||||||
}
|
}
|
||||||
|
|
||||||
binaries := make(map[string]string, len(versions))
|
binaries := make(map[string]string, len(versions))
|
||||||
for ver, _ := range versions {
|
for ver := range versions {
|
||||||
binaries[ver] = filepath.Join(binDir, ver)
|
binaries[ver] = filepath.Join(binDir, ver)
|
||||||
}
|
}
|
||||||
return sorted, binaries
|
return sorted, binaries
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
//+build darwin
|
//go:build darwin
|
||||||
|
// +build darwin
|
||||||
|
|
||||||
package freeport
|
package freeport
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
//+build darwin
|
//go:build darwin
|
||||||
|
// +build darwin
|
||||||
|
|
||||||
package freeport
|
package freeport
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
//+build freebsd
|
//go:build freebsd
|
||||||
|
// +build freebsd
|
||||||
|
|
||||||
package freeport
|
package freeport
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
//+build linux
|
//go:build linux
|
||||||
|
// +build linux
|
||||||
|
|
||||||
package freeport
|
package freeport
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
//+build linux
|
//go:build linux
|
||||||
|
// +build linux
|
||||||
|
|
||||||
package freeport
|
package freeport
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
//+build windows
|
//go:build windows
|
||||||
|
// +build windows
|
||||||
|
|
||||||
package freeport
|
package freeport
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
//go:build linux
|
||||||
// +build linux
|
// +build linux
|
||||||
|
|
||||||
package mount
|
package mount
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
//go:build !linux
|
||||||
// +build !linux
|
// +build !linux
|
||||||
|
|
||||||
package mount
|
package mount
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
//go:build !release
|
||||||
// +build !release
|
// +build !release
|
||||||
|
|
||||||
package catalog
|
package catalog
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
//go:build !windows
|
||||||
// +build !windows
|
// +build !windows
|
||||||
|
|
||||||
package loader
|
package loader
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
//go:build windows
|
||||||
// +build windows
|
// +build windows
|
||||||
|
|
||||||
package loader
|
package loader
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
//go:build !ent
|
||||||
// +build !ent
|
// +build !ent
|
||||||
|
|
||||||
package raftutil
|
package raftutil
|
||||||
|
|
|
@ -21,7 +21,7 @@ func TestArchive(t *testing.T) {
|
||||||
Term: 2011,
|
Term: 2011,
|
||||||
Configuration: raft.Configuration{
|
Configuration: raft.Configuration{
|
||||||
Servers: []raft.Server{
|
Servers: []raft.Server{
|
||||||
raft.Server{
|
{
|
||||||
Suffrage: raft.Voter,
|
Suffrage: raft.Voter,
|
||||||
ID: raft.ServerID("hello"),
|
ID: raft.ServerID("hello"),
|
||||||
Address: raft.ServerAddress("127.0.0.1:8300"),
|
Address: raft.ServerAddress("127.0.0.1:8300"),
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
//go:build darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris
|
||||||
// +build darwin dragonfly freebsd linux netbsd openbsd solaris
|
// +build darwin dragonfly freebsd linux netbsd openbsd solaris
|
||||||
|
|
||||||
package testtask
|
package testtask
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
//go:build windows
|
||||||
// +build windows
|
// +build windows
|
||||||
|
|
||||||
package testtask
|
package testtask
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
//+build windows
|
//go:build windows
|
||||||
|
// +build windows
|
||||||
|
|
||||||
package winsvc
|
package winsvc
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
//+build !ent
|
//go:build !ent
|
||||||
|
// +build !ent
|
||||||
|
|
||||||
package nomad
|
package nomad
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
//+build !ent
|
//go:build !ent
|
||||||
|
// +build !ent
|
||||||
|
|
||||||
package nomad
|
package nomad
|
||||||
|
|
||||||
|
|
|
@ -521,7 +521,7 @@ func TestConsulPolicy_allowKeystoreRead(t *testing.T) {
|
||||||
t.Run("kv wild namespace prefix any read", func(t *testing.T) {
|
t.Run("kv wild namespace prefix any read", func(t *testing.T) {
|
||||||
policy := &ConsulPolicy{
|
policy := &ConsulPolicy{
|
||||||
NamespacePrefixes: map[string]*ConsulPolicy{
|
NamespacePrefixes: map[string]*ConsulPolicy{
|
||||||
"": &ConsulPolicy{
|
"": {
|
||||||
KeyPrefixes: []*ConsulKeyRule{{
|
KeyPrefixes: []*ConsulKeyRule{{
|
||||||
Name: "",
|
Name: "",
|
||||||
Policy: "read",
|
Policy: "read",
|
||||||
|
@ -536,7 +536,7 @@ func TestConsulPolicy_allowKeystoreRead(t *testing.T) {
|
||||||
t.Run("kv apple namespace prefix any read", func(t *testing.T) {
|
t.Run("kv apple namespace prefix any read", func(t *testing.T) {
|
||||||
policy := &ConsulPolicy{
|
policy := &ConsulPolicy{
|
||||||
NamespacePrefixes: map[string]*ConsulPolicy{
|
NamespacePrefixes: map[string]*ConsulPolicy{
|
||||||
"apple": &ConsulPolicy{
|
"apple": {
|
||||||
KeyPrefixes: []*ConsulKeyRule{{
|
KeyPrefixes: []*ConsulKeyRule{{
|
||||||
Name: "",
|
Name: "",
|
||||||
Policy: "read",
|
Policy: "read",
|
||||||
|
@ -551,7 +551,7 @@ func TestConsulPolicy_allowKeystoreRead(t *testing.T) {
|
||||||
t.Run("kv matching namespace prefix any read", func(t *testing.T) {
|
t.Run("kv matching namespace prefix any read", func(t *testing.T) {
|
||||||
policy := &ConsulPolicy{
|
policy := &ConsulPolicy{
|
||||||
NamespacePrefixes: map[string]*ConsulPolicy{
|
NamespacePrefixes: map[string]*ConsulPolicy{
|
||||||
"app": &ConsulPolicy{
|
"app": {
|
||||||
KeyPrefixes: []*ConsulKeyRule{{
|
KeyPrefixes: []*ConsulKeyRule{{
|
||||||
Name: "",
|
Name: "",
|
||||||
Policy: "read",
|
Policy: "read",
|
||||||
|
@ -566,7 +566,7 @@ func TestConsulPolicy_allowKeystoreRead(t *testing.T) {
|
||||||
t.Run("kv other namespace prefix any read", func(t *testing.T) {
|
t.Run("kv other namespace prefix any read", func(t *testing.T) {
|
||||||
policy := &ConsulPolicy{
|
policy := &ConsulPolicy{
|
||||||
NamespacePrefixes: map[string]*ConsulPolicy{
|
NamespacePrefixes: map[string]*ConsulPolicy{
|
||||||
"other": &ConsulPolicy{
|
"other": {
|
||||||
KeyPrefixes: []*ConsulKeyRule{{
|
KeyPrefixes: []*ConsulKeyRule{{
|
||||||
Name: "",
|
Name: "",
|
||||||
Policy: "read",
|
Policy: "read",
|
||||||
|
@ -583,7 +583,7 @@ func TestConsulPolicy_allowKeystoreRead(t *testing.T) {
|
||||||
t.Run("kv match namespace any read", func(t *testing.T) {
|
t.Run("kv match namespace any read", func(t *testing.T) {
|
||||||
policy := &ConsulPolicy{
|
policy := &ConsulPolicy{
|
||||||
Namespaces: map[string]*ConsulPolicy{
|
Namespaces: map[string]*ConsulPolicy{
|
||||||
"apple": &ConsulPolicy{
|
"apple": {
|
||||||
KeyPrefixes: []*ConsulKeyRule{{
|
KeyPrefixes: []*ConsulKeyRule{{
|
||||||
Name: "",
|
Name: "",
|
||||||
Policy: "read",
|
Policy: "read",
|
||||||
|
@ -598,7 +598,7 @@ func TestConsulPolicy_allowKeystoreRead(t *testing.T) {
|
||||||
t.Run("kv mismatch namespace any read", func(t *testing.T) {
|
t.Run("kv mismatch namespace any read", func(t *testing.T) {
|
||||||
policy := &ConsulPolicy{
|
policy := &ConsulPolicy{
|
||||||
Namespaces: map[string]*ConsulPolicy{
|
Namespaces: map[string]*ConsulPolicy{
|
||||||
"other": &ConsulPolicy{
|
"other": {
|
||||||
KeyPrefixes: []*ConsulKeyRule{{
|
KeyPrefixes: []*ConsulKeyRule{{
|
||||||
Name: "",
|
Name: "",
|
||||||
Policy: "read",
|
Policy: "read",
|
||||||
|
@ -613,7 +613,7 @@ func TestConsulPolicy_allowKeystoreRead(t *testing.T) {
|
||||||
t.Run("kv matching namespace prefix any read", func(t *testing.T) {
|
t.Run("kv matching namespace prefix any read", func(t *testing.T) {
|
||||||
policy := &ConsulPolicy{
|
policy := &ConsulPolicy{
|
||||||
Namespaces: map[string]*ConsulPolicy{
|
Namespaces: map[string]*ConsulPolicy{
|
||||||
"apple": &ConsulPolicy{
|
"apple": {
|
||||||
KeyPrefixes: []*ConsulKeyRule{{
|
KeyPrefixes: []*ConsulKeyRule{{
|
||||||
Name: "",
|
Name: "",
|
||||||
Policy: "read",
|
Policy: "read",
|
||||||
|
@ -628,7 +628,7 @@ func TestConsulPolicy_allowKeystoreRead(t *testing.T) {
|
||||||
t.Run("kv mismatch namespace prefix any read", func(t *testing.T) {
|
t.Run("kv mismatch namespace prefix any read", func(t *testing.T) {
|
||||||
policy := &ConsulPolicy{
|
policy := &ConsulPolicy{
|
||||||
Namespaces: map[string]*ConsulPolicy{
|
Namespaces: map[string]*ConsulPolicy{
|
||||||
"other": &ConsulPolicy{
|
"other": {
|
||||||
KeyPrefixes: []*ConsulKeyRule{{
|
KeyPrefixes: []*ConsulKeyRule{{
|
||||||
Name: "",
|
Name: "",
|
||||||
Policy: "read",
|
Policy: "read",
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
//go:build !ent
|
||||||
// +build !ent
|
// +build !ent
|
||||||
|
|
||||||
package deploymentwatcher
|
package deploymentwatcher
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
//go:build !ent
|
||||||
// +build !ent
|
// +build !ent
|
||||||
|
|
||||||
package nomad
|
package nomad
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
//go:build !ent
|
||||||
// +build !ent
|
// +build !ent
|
||||||
|
|
||||||
package nomad
|
package nomad
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue