Skip to content

Commit ba1574b

Browse files
committed
api/nfd: fix broken unit test
It was broken in 719c518 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.
1 parent af706a8 commit ba1574b

File tree

2 files changed

+1
-1
lines changed

2 files changed

+1
-1
lines changed

Makefile

+1
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,7 @@ helm-lint:
191191

192192
test:
193193
$(GO_CMD) test -covermode=atomic -coverprofile=coverage.out ./cmd/... ./pkg/... ./source/...
194+
cd api/nfd && $(GO_CMD) test -covermode=atomic -coverprofile=coverage.out ./...
194195

195196
e2e-test:
196197
@if [ -z ${KUBECONFIG} ]; then echo "[ERR] KUBECONFIG missing, must be defined"; exit 1; fi

api/nfd/v1alpha1/feature_test.go

-1
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,6 @@ func TestInstanceFeatureSet(t *testing.T) {
8585
assert.Equal(t, expectedElems, f1.Elements)
8686

8787
f2 = NewInstanceFeatures()
88-
expectedElems = []InstanceFeature{}
8988
f2.MergeInto(&f1)
9089
assert.Equal(t, expectedElems, f1.Elements)
9190

0 commit comments

Comments
 (0)