Skip to content

Commit

Permalink
fix: ignore linter warnings for testing sync of deprecated fields
Browse files Browse the repository at this point in the history
we should only stop syncing fields when they're removed, and not
deprecated

Signed-off-by: Rohan CJ <[email protected]>
  • Loading branch information
rohantmp committed Oct 7, 2024
1 parent e35282d commit f29d2e6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pkg/controllers/resources/nodes/fake_syncer.go
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ func createFakeNode(
BootID: newGUID(),
ContainerRuntimeVersion: "docker://19.3.12",
KernelVersion: "4.19.76-fakelinux",
KubeProxyVersion: FakeNodesVersion,
KubeProxyVersion: FakeNodesVersion, //nolint:staticcheck //deprecated, but we should continue to use it until the api removes it
KubeletVersion: FakeNodesVersion,
MachineID: newGUID(),
SystemUUID: newGUID(),
Expand Down
4 changes: 2 additions & 2 deletions pkg/controllers/resources/nodes/fake_syncer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ func TestFakeSync(t *testing.T) {
Architecture: "amd64",
ContainerRuntimeVersion: "docker://19.3.12",
KernelVersion: "4.19.76-fakelinux",
KubeProxyVersion: "v1.16.6-beta.0",
KubeProxyVersion: "v1.16.6-beta.0", //nolint:staticcheck //deprecated, but we should continue to use it until the api removes it
KubeletVersion: "v1.16.6-beta.0",
OperatingSystem: "linux",
OSImage: "Fake Kubernetes Image",
Expand Down Expand Up @@ -169,7 +169,7 @@ func TestFakeSync(t *testing.T) {
node.Status.NodeInfo.MachineID = fakeGUID
node.Status.NodeInfo.SystemUUID = fakeGUID
node.Status.NodeInfo.KernelVersion = fakeGUID
node.Status.NodeInfo.KubeProxyVersion = fakeGUID
node.Status.NodeInfo.KubeProxyVersion = fakeGUID //nolint:staticcheck //deprecated, but we should continue to use it until the api removes it
node.Status.NodeInfo.KubeletVersion = fakeGUID
}

Expand Down

0 comments on commit f29d2e6

Please sign in to comment.