mirror of
https://github.com/kubernetes-sigs/node-feature-discovery.git
synced 2024-12-15 17:50:49 +00:00
nfd-master: correct a mistake in unit tests
Annotations were not correctly checked when testing mockServer.updateNodeFeatures().
This commit is contained in:
parent
7f43a3db4e
commit
470cf8dff2
1 changed files with 3 additions and 2 deletions
|
@ -56,6 +56,7 @@ func TestUpdateNodeFeatures(t *testing.T) {
|
|||
for k, _ := range fakeFeatureLabels {
|
||||
fakeFeatureLabelNames = append(fakeFeatureLabelNames, k)
|
||||
}
|
||||
sort.Strings(fakeFeatureLabelNames)
|
||||
fakeAnnotations["feature-labels"] = strings.Join(fakeFeatureLabelNames, ",")
|
||||
|
||||
mockAPIHelper := new(apihelper.MockAPIHelpers)
|
||||
|
@ -80,8 +81,8 @@ func TestUpdateNodeFeatures(t *testing.T) {
|
|||
So(mockNode.Labels[labelNs+k], ShouldEqual, v)
|
||||
}
|
||||
So(len(mockNode.Annotations), ShouldEqual, len(fakeAnnotations))
|
||||
for k, v := range fakeFeatureLabels {
|
||||
So(mockNode.Labels[labelNs+k], ShouldEqual, v)
|
||||
for k, v := range fakeAnnotations {
|
||||
So(mockNode.Annotations[annotationNs+k], ShouldEqual, v)
|
||||
}
|
||||
})
|
||||
})
|
||||
|
|
Loading…
Reference in a new issue