mirror of
https://github.com/kubernetes-sigs/node-feature-discovery.git
synced 2025-03-17 05:48:21 +00:00
make gofmt happy by running gofmt -s
Signed-off-by: Carlos Eduardo Arango Gutierrez <carangog@redhat.com>
This commit is contained in:
parent
bd97f9e803
commit
894b7901ff
2 changed files with 6 additions and 6 deletions
|
@ -365,7 +365,7 @@ func TestSetLabels(t *testing.T) {
|
||||||
apihelper.NewJsonPatch("add", "/metadata/labels", "valid.ns/feature-2", mockLabels["valid.ns/feature-2"]),
|
apihelper.NewJsonPatch("add", "/metadata/labels", "valid.ns/feature-2", mockLabels["valid.ns/feature-2"]),
|
||||||
}
|
}
|
||||||
|
|
||||||
mockMaster.args.ExtraLabelNs = map[string]struct{}{"valid.ns": struct{}{}}
|
mockMaster.args.ExtraLabelNs = map[string]struct{}{"valid.ns": {}}
|
||||||
mockMaster.annotationNs = instance + "." + AnnotationNsBase
|
mockMaster.annotationNs = instance + "." + AnnotationNsBase
|
||||||
mockHelper.On("GetClient").Return(mockClient, nil)
|
mockHelper.On("GetClient").Return(mockClient, nil)
|
||||||
mockHelper.On("GetNode", mockClient, workerName).Return(mockNode, nil)
|
mockHelper.On("GetNode", mockClient, workerName).Return(mockNode, nil)
|
||||||
|
@ -391,7 +391,7 @@ func TestSetLabels(t *testing.T) {
|
||||||
apihelper.NewJsonPatch("add", "/status/capacity", LabelNs+"/feature-3", mockLabels["feature-3"]),
|
apihelper.NewJsonPatch("add", "/status/capacity", LabelNs+"/feature-3", mockLabels["feature-3"]),
|
||||||
}
|
}
|
||||||
|
|
||||||
mockMaster.args.ResourceLabels = map[string]struct{}{"feature-3": struct{}{}, "feature-1": struct{}{}}
|
mockMaster.args.ResourceLabels = map[string]struct{}{"feature-3": {}, "feature-1": {}}
|
||||||
mockHelper.On("GetClient").Return(mockClient, nil)
|
mockHelper.On("GetClient").Return(mockClient, nil)
|
||||||
mockHelper.On("GetNode", mockClient, workerName).Return(mockNode, nil)
|
mockHelper.On("GetNode", mockClient, workerName).Return(mockNode, nil)
|
||||||
mockHelper.On("PatchNode", mockClient, mockNodeName, mock.MatchedBy(jsonPatchMatcher(expectedPatches))).Return(nil)
|
mockHelper.On("PatchNode", mockClient, mockNodeName, mock.MatchedBy(jsonPatchMatcher(expectedPatches))).Return(nil)
|
||||||
|
|
|
@ -24,20 +24,20 @@ import (
|
||||||
// e.g RMDA related features. NFD configuration file may extend these custom features by adding rules.
|
// e.g RMDA related features. NFD configuration file may extend these custom features by adding rules.
|
||||||
func getStaticFeatureConfig() []FeatureSpec {
|
func getStaticFeatureConfig() []FeatureSpec {
|
||||||
return []FeatureSpec{
|
return []FeatureSpec{
|
||||||
FeatureSpec{
|
{
|
||||||
Name: "rdma.capable",
|
Name: "rdma.capable",
|
||||||
MatchOn: []MatchRule{
|
MatchOn: []MatchRule{
|
||||||
MatchRule{
|
{
|
||||||
PciID: &rules.PciIDRule{
|
PciID: &rules.PciIDRule{
|
||||||
PciIDRuleInput: rules.PciIDRuleInput{Vendor: []string{"15b3"}},
|
PciIDRuleInput: rules.PciIDRuleInput{Vendor: []string{"15b3"}},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
FeatureSpec{
|
{
|
||||||
Name: "rdma.available",
|
Name: "rdma.available",
|
||||||
MatchOn: []MatchRule{
|
MatchOn: []MatchRule{
|
||||||
MatchRule{
|
{
|
||||||
LoadedKMod: &rules.LoadedKModRule{"ib_uverbs", "rdma_ucm"},
|
LoadedKMod: &rules.LoadedKModRule{"ib_uverbs", "rdma_ucm"},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
Loading…
Add table
Reference in a new issue