Skip to content

Commit 181ff36

Browse files
committed
Update integration tests to account for nonpointerstructs
1 parent 6b4c58f commit 181ff36

File tree

3 files changed

+6
-7
lines changed

3 files changed

+6
-7
lines changed

tests/integration/testdata/default_configurations/affinity.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ type WeightedPodAffinityTerm struct {
9393
// in the range 1-100.
9494
Weight int32 `json:"weight" protobuf:"varint,1,opt,name=weight"` // want "optionalorrequired: field WeightedPodAffinityTerm.Weight must be marked as optional or required"
9595
// Required. A pod affinity term, associated with the corresponding weight. // want "commentstart: godoc for field WeightedPodAffinityTerm.PodAffinityTerm should start with 'podAffinityTerm ...'"
96-
PodAffinityTerm PodAffinityTerm `json:"podAffinityTerm" protobuf:"bytes,2,opt,name=podAffinityTerm"` // want "optionalorrequired: field WeightedPodAffinityTerm.PodAffinityTerm must be marked as optional or required"
96+
PodAffinityTerm PodAffinityTerm `json:"podAffinityTerm" protobuf:"bytes,2,opt,name=podAffinityTerm"` // want "optionalorrequired: field WeightedPodAffinityTerm.PodAffinityTerm must be marked as optional or required" "nonpointerstructs: field WeightedPodAffinityTerm.PodAffinityTerm is a non-pointer struct with no required fields. It must be marked as optional."
9797
}
9898

9999
// Defines a set of pods (namely those matching the labelSelector
@@ -193,7 +193,7 @@ type PreferredSchedulingTerm struct {
193193
// Weight associated with matching the corresponding nodeSelectorTerm, in the range 1-100. // want "commentstart: godoc for field PreferredSchedulingTerm.Weight should start with 'weight ...'"
194194
Weight int32 `json:"weight" protobuf:"varint,1,opt,name=weight"` // want "optionalorrequired: field PreferredSchedulingTerm.Weight must be marked as optional or required"
195195
// A node selector term, associated with the corresponding weight. // want "commentstart: godoc for field PreferredSchedulingTerm.Preference should start with 'preference ...'"
196-
Preference NodeSelectorTerm `json:"preference" protobuf:"bytes,2,opt,name=preference"` // want "optionalorrequired: field PreferredSchedulingTerm.Preference must be marked as optional or required"
196+
Preference NodeSelectorTerm `json:"preference" protobuf:"bytes,2,opt,name=preference"` // want "optionalorrequired: field PreferredSchedulingTerm.Preference must be marked as optional or required" "nonpointerstructs: field PreferredSchedulingTerm.Preference is a non-pointer struct with no required fields. It must be marked as optional."
197197
}
198198

199199
// The node this Taint is attached to has the "effect" on

tests/integration/testdata/default_configurations/object_references.go

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
package defaultconfigurations
22

3-
import "k8s.io/apimachinery/pkg/types"
4-
53
// ObjectReference contains enough information to let you inspect or modify the referred object.
64
// ---
75
// New uses of this type are discouraged because of difficulty describing its usage when embedded in APIs.
@@ -33,10 +31,11 @@ type ObjectReference struct {
3331
// More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
3432
// +optional
3533
Name string `json:"name,omitempty" protobuf:"bytes,3,opt,name=name"` // want "optionalfields: field ObjectReference.Name should be a pointer."
36-
// UID of the referent. // want "commentstart: godoc for field ObjectReference.UID should start with 'uid ...'"
34+
// UID of the referent.
3735
// More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids
3836
// +optional
39-
UID types.UID `json:"uid,omitempty" protobuf:"bytes,4,opt,name=uid,casttype=k8s.io/apimachinery/pkg/types.UID"` // want "optionalfields: field ObjectReference.UID should be a pointer."
37+
// UID types.UID `json:"uid,omitempty" protobuf:"bytes,4,opt,name=uid,casttype=k8s.io/apimachinery/pkg/types.UID"`
38+
4039
// API version of the referent. // want "commentstart: godoc for field ObjectReference.APIVersion should start with 'apiVersion ...'"
4140
// +optional
4241
APIVersion string `json:"apiVersion,omitempty" protobuf:"bytes,5,opt,name=apiVersion"` // want "optionalfields: field ObjectReference.APIVersion should be a pointer."

tests/integration/testdata/default_configurations/volume.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1634,7 +1634,7 @@ type PersistentVolumeClaimTemplate struct {
16341634
// copied unchanged into the PVC that gets created from this
16351635
// template. The same fields as in a PersistentVolumeClaim
16361636
// are also valid here.
1637-
Spec PersistentVolumeClaimSpec `json:"spec" protobuf:"bytes,2,name=spec"` // want "optionalorrequired: field PersistentVolumeClaimTemplate.Spec must be marked as optional or required"
1637+
Spec PersistentVolumeClaimSpec `json:"spec" protobuf:"bytes,2,name=spec"` // want "optionalorrequired: field PersistentVolumeClaimTemplate.Spec must be marked as optional or required" "nonpointerstructs: field PersistentVolumeClaimTemplate.Spec is a non-pointer struct with no required fields. It must be marked as optional."
16381638
}
16391639

16401640
// Adapts a ConfigMap into a projected volume.

0 commit comments

Comments
 (0)