1
0
Fork 0
mirror of https://github.com/kubernetes-sigs/node-feature-discovery.git synced 2025-03-31 04:04:51 +00:00

api/nfd: fix broken unit test

It was broken in 719c5186f6 but never
caught as the unit tests were not run (after the api was moved to a
separate module).

This patch also modifies the makefile to run the unit tests from api/
directory.
This commit is contained in:
Markus Lehtonen 2025-03-27 16:29:07 +02:00
parent af706a819e
commit ba1574b52e
2 changed files with 1 additions and 1 deletions

View file

@ -191,6 +191,7 @@ helm-lint:
test:
$(GO_CMD) test -covermode=atomic -coverprofile=coverage.out ./cmd/... ./pkg/... ./source/...
cd api/nfd && $(GO_CMD) test -covermode=atomic -coverprofile=coverage.out ./...
e2e-test:
@if [ -z ${KUBECONFIG} ]; then echo "[ERR] KUBECONFIG missing, must be defined"; exit 1; fi

View file

@ -85,7 +85,6 @@ func TestInstanceFeatureSet(t *testing.T) {
assert.Equal(t, expectedElems, f1.Elements)
f2 = NewInstanceFeatures()
expectedElems = []InstanceFeature{}
f2.MergeInto(&f1)
assert.Equal(t, expectedElems, f1.Elements)