mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-03 17:30:00 +00:00
Correct func name WithBuildMetadata
This commit is contained in:
parent
533daf6624
commit
8efa1c2a8f
@ -196,9 +196,9 @@ func TestEnforceVersionPolicies(t *testing.T) {
|
|||||||
vg: &fakeVersionGetter{
|
vg: &fakeVersionGetter{
|
||||||
clusterVersion: constants.MinimumControlPlaneVersion.String(),
|
clusterVersion: constants.MinimumControlPlaneVersion.String(),
|
||||||
kubeletVersion: constants.MinimumControlPlaneVersion.String(),
|
kubeletVersion: constants.MinimumControlPlaneVersion.String(),
|
||||||
kubeadmVersion: constants.MinimumControlPlaneVersion.WithBuildeMetadata("build").String(),
|
kubeadmVersion: constants.MinimumControlPlaneVersion.WithBuildMetadata("build").String(),
|
||||||
},
|
},
|
||||||
newK8sVersion: constants.MinimumControlPlaneVersion.WithBuildeMetadata("build").String(),
|
newK8sVersion: constants.MinimumControlPlaneVersion.WithBuildMetadata("build").String(),
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -183,8 +183,8 @@ func (v *Version) WithPreRelease(preRelease string) *Version {
|
|||||||
return &result
|
return &result
|
||||||
}
|
}
|
||||||
|
|
||||||
// WithBuildeMetadata returns copy of the version object with requested buildMetadata
|
// WithBuildMetadata returns copy of the version object with requested buildMetadata
|
||||||
func (v *Version) WithBuildeMetadata(buildMetadata string) *Version {
|
func (v *Version) WithBuildMetadata(buildMetadata string) *Version {
|
||||||
result := *v
|
result := *v
|
||||||
result.components = []uint{v.Major(), v.Minor(), v.Patch()}
|
result.components = []uint{v.Major(), v.Minor(), v.Patch()}
|
||||||
result.buildMetadata = buildMetadata
|
result.buildMetadata = buildMetadata
|
||||||
|
Loading…
Reference in New Issue
Block a user