mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-01 07:47:56 +00:00
Merge pull request #60599 from cblecker/gofmt-1.10
Automatic merge from submit-queue (batch tested with PRs 60599, 61819). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>. Update gofmt for go1.10, and fix go vet errors **What this PR does / why we need it**: Update gofmt for go1.10, and fix go vet errors **Release note**: ```release-note NONE ```
This commit is contained in:
commit
b17afaa29e
@ -474,7 +474,7 @@ func TestTokenCreation(t *testing.T) {
|
|||||||
|
|
||||||
AddedSecret: serviceAccountTokenSecretWithNamespaceData([]byte("custom")),
|
AddedSecret: serviceAccountTokenSecretWithNamespaceData([]byte("custom")),
|
||||||
ExpectedActions: []core.Action{
|
ExpectedActions: []core.Action{
|
||||||
// no update is performed... the custom namespace is preserved
|
// no update is performed... the custom namespace is preserved
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -539,7 +539,7 @@ func TestTokenCreation(t *testing.T) {
|
|||||||
|
|
||||||
UpdatedSecret: serviceAccountTokenSecretWithNamespaceData([]byte("custom")),
|
UpdatedSecret: serviceAccountTokenSecretWithNamespaceData([]byte("custom")),
|
||||||
ExpectedActions: []core.Action{
|
ExpectedActions: []core.Action{
|
||||||
// no update is performed... the custom namespace is preserved
|
// no update is performed... the custom namespace is preserved
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -142,7 +142,7 @@ func TestCreateAuthInfoOptions(t *testing.T) {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
flags: []string{
|
flags: []string{
|
||||||
// No name for authinfo provided.
|
// No name for authinfo provided.
|
||||||
},
|
},
|
||||||
wantCompleteErr: true,
|
wantCompleteErr: true,
|
||||||
},
|
},
|
||||||
|
@ -1017,7 +1017,7 @@ func defaultPod() *api.Pod {
|
|||||||
},
|
},
|
||||||
Spec: api.PodSpec{
|
Spec: api.PodSpec{
|
||||||
SecurityContext: &api.PodSecurityContext{
|
SecurityContext: &api.PodSecurityContext{
|
||||||
// fill in for test cases
|
// fill in for test cases
|
||||||
},
|
},
|
||||||
Containers: []api.Container{
|
Containers: []api.Container{
|
||||||
{
|
{
|
||||||
@ -1041,7 +1041,7 @@ func defaultV1Pod() *v1.Pod {
|
|||||||
},
|
},
|
||||||
Spec: v1.PodSpec{
|
Spec: v1.PodSpec{
|
||||||
SecurityContext: &v1.PodSecurityContext{
|
SecurityContext: &v1.PodSecurityContext{
|
||||||
// fill in for test cases
|
// fill in for test cases
|
||||||
},
|
},
|
||||||
Containers: []v1.Container{
|
Containers: []v1.Container{
|
||||||
{
|
{
|
||||||
|
@ -44,10 +44,10 @@ func NameSystems() namer.NameSystems {
|
|||||||
|
|
||||||
publicNamer := &ExceptionNamer{
|
publicNamer := &ExceptionNamer{
|
||||||
Exceptions: map[string]string{
|
Exceptions: map[string]string{
|
||||||
// these exceptions are used to deconflict the generated code
|
// these exceptions are used to deconflict the generated code
|
||||||
// you can put your fully qualified package like
|
// you can put your fully qualified package like
|
||||||
// to generate a name that doesn't conflict with your group.
|
// to generate a name that doesn't conflict with your group.
|
||||||
// "k8s.io/apis/events/v1beta1.Event": "EventResource"
|
// "k8s.io/apis/events/v1beta1.Event": "EventResource"
|
||||||
},
|
},
|
||||||
KeyFunc: func(t *types.Type) string {
|
KeyFunc: func(t *types.Type) string {
|
||||||
return t.Name.Package + "." + t.Name.Name
|
return t.Name.Package + "." + t.Name.Name
|
||||||
@ -56,10 +56,10 @@ func NameSystems() namer.NameSystems {
|
|||||||
}
|
}
|
||||||
privateNamer := &ExceptionNamer{
|
privateNamer := &ExceptionNamer{
|
||||||
Exceptions: map[string]string{
|
Exceptions: map[string]string{
|
||||||
// these exceptions are used to deconflict the generated code
|
// these exceptions are used to deconflict the generated code
|
||||||
// you can put your fully qualified package like
|
// you can put your fully qualified package like
|
||||||
// to generate a name that doesn't conflict with your group.
|
// to generate a name that doesn't conflict with your group.
|
||||||
// "k8s.io/apis/events/v1beta1.Event": "eventResource"
|
// "k8s.io/apis/events/v1beta1.Event": "eventResource"
|
||||||
},
|
},
|
||||||
KeyFunc: func(t *types.Type) string {
|
KeyFunc: func(t *types.Type) string {
|
||||||
return t.Name.Package + "." + t.Name.Name
|
return t.Name.Package + "." + t.Name.Name
|
||||||
@ -68,10 +68,10 @@ func NameSystems() namer.NameSystems {
|
|||||||
}
|
}
|
||||||
publicPluralNamer := &ExceptionNamer{
|
publicPluralNamer := &ExceptionNamer{
|
||||||
Exceptions: map[string]string{
|
Exceptions: map[string]string{
|
||||||
// these exceptions are used to deconflict the generated code
|
// these exceptions are used to deconflict the generated code
|
||||||
// you can put your fully qualified package like
|
// you can put your fully qualified package like
|
||||||
// to generate a name that doesn't conflict with your group.
|
// to generate a name that doesn't conflict with your group.
|
||||||
// "k8s.io/apis/events/v1beta1.Event": "EventResource"
|
// "k8s.io/apis/events/v1beta1.Event": "EventResource"
|
||||||
},
|
},
|
||||||
KeyFunc: func(t *types.Type) string {
|
KeyFunc: func(t *types.Type) string {
|
||||||
return t.Name.Package + "." + t.Name.Name
|
return t.Name.Package + "." + t.Name.Name
|
||||||
|
@ -199,7 +199,7 @@ func SetupNVIDIAGPUNode(f *framework.Framework, setupResourceGatherer bool) *fra
|
|||||||
var rsgather *framework.ContainerResourceGatherer
|
var rsgather *framework.ContainerResourceGatherer
|
||||||
if setupResourceGatherer {
|
if setupResourceGatherer {
|
||||||
framework.Logf("Starting ResourceUsageGather for the created DaemonSet pods.")
|
framework.Logf("Starting ResourceUsageGather for the created DaemonSet pods.")
|
||||||
rsgather, err = framework.NewResourceUsageGatherer(f.ClientSet, framework.ResourceGathererOptions{false, false, 2 * time.Second, 2 * time.Second, true}, pods)
|
rsgather, err = framework.NewResourceUsageGatherer(f.ClientSet, framework.ResourceGathererOptions{InKubemark: false, MasterOnly: false, ResourceDataGatheringPeriod: 2 * time.Second, ProbeDuration: 2 * time.Second, PrintVerboseLogs: true}, pods)
|
||||||
framework.ExpectNoError(err, "creating ResourceUsageGather for the daemonset pods")
|
framework.ExpectNoError(err, "creating ResourceUsageGather for the daemonset pods")
|
||||||
go rsgather.StartGatheringData()
|
go rsgather.StartGatheringData()
|
||||||
}
|
}
|
||||||
|
@ -134,7 +134,7 @@ type ImageConfig struct {
|
|||||||
|
|
||||||
type Accelerator struct {
|
type Accelerator struct {
|
||||||
Type string `json:"type,omitempty"`
|
Type string `json:"type,omitempty"`
|
||||||
Count int64 `json:"count, omitempty"`
|
Count int64 `json:"count,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type Resources struct {
|
type Resources struct {
|
||||||
@ -142,19 +142,19 @@ type Resources struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
type GCEImage struct {
|
type GCEImage struct {
|
||||||
Image string `json:"image, omitempty"`
|
Image string `json:"image,omitempty"`
|
||||||
ImageDesc string `json:"image_description, omitempty"`
|
ImageDesc string `json:"image_description,omitempty"`
|
||||||
Project string `json:"project"`
|
Project string `json:"project"`
|
||||||
Metadata string `json:"metadata"`
|
Metadata string `json:"metadata"`
|
||||||
ImageRegex string `json:"image_regex, omitempty"`
|
ImageRegex string `json:"image_regex,omitempty"`
|
||||||
// Defaults to using only the latest image. Acceptable values are [0, # of images that match the regex).
|
// Defaults to using only the latest image. Acceptable values are [0, # of images that match the regex).
|
||||||
// If the number of existing previous images is lesser than what is desired, the test will use that is available.
|
// If the number of existing previous images is lesser than what is desired, the test will use that is available.
|
||||||
PreviousImages int `json:"previous_images, omitempty"`
|
PreviousImages int `json:"previous_images,omitempty"`
|
||||||
|
|
||||||
Machine string `json:"machine, omitempty"`
|
Machine string `json:"machine,omitempty"`
|
||||||
Resources Resources `json:"resources, omitempty"`
|
Resources Resources `json:"resources,omitempty"`
|
||||||
// This test is for benchmark (no limit verification, more result log, node name has format 'machine-image-uuid') if 'Tests' is non-empty.
|
// This test is for benchmark (no limit verification, more result log, node name has format 'machine-image-uuid') if 'Tests' is non-empty.
|
||||||
Tests []string `json:"tests, omitempty"`
|
Tests []string `json:"tests,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type internalImageConfig struct {
|
type internalImageConfig struct {
|
||||||
|
@ -666,7 +666,7 @@ func TestUpdateNodeObjects(t *testing.T) {
|
|||||||
go func(lister int) {
|
go func(lister int) {
|
||||||
w, err := c.Nodes().Watch(metav1.ListOptions{})
|
w, err := c.Nodes().Watch(metav1.ListOptions{})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
fmt.Printf("[watch:%d] error: %v", k, err)
|
fmt.Printf("[watch:%d] error: %v", lister, err)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
i := 0
|
i := 0
|
||||||
|
Loading…
Reference in New Issue
Block a user