From 92c09e2d3fd4de2faf7da9a9c1e2771fe2d15ed4 Mon Sep 17 00:00:00 2001 From: bcmmbaga Date: Wed, 10 Jan 2024 20:18:19 +0300 Subject: [PATCH] use Wt version --- management/server/posture/version.go | 2 +- management/server/posture/version_test.go | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/management/server/posture/version.go b/management/server/posture/version.go index ba314a82899..71b15c82925 100644 --- a/management/server/posture/version.go +++ b/management/server/posture/version.go @@ -20,7 +20,7 @@ func (n *NBVersionCheck) Check(peer nbpeer.Peer) error { return nil } - peerNBVersion, err := version.NewVersion(peer.Meta.UIVersion) + peerNBVersion, err := version.NewVersion(peer.Meta.WtVersion) if err != nil { return err } diff --git a/management/server/posture/version_test.go b/management/server/posture/version_test.go index a3c8204a55d..ffe1873929d 100644 --- a/management/server/posture/version_test.go +++ b/management/server/posture/version_test.go @@ -19,7 +19,7 @@ func TestNBVersionCheck_Check(t *testing.T) { name: "Valid Peer NB version", input: peer.Peer{ Meta: peer.PeerSystemMeta{ - UIVersion: "1.0.1", + WtVersion: "1.0.1", }, }, check: NBVersionCheck{ @@ -32,7 +32,7 @@ func TestNBVersionCheck_Check(t *testing.T) { name: "Valid Peer NB version With No Patch Version 1", input: peer.Peer{ Meta: peer.PeerSystemMeta{ - UIVersion: "2.0.9", + WtVersion: "2.0.9", }, }, check: NBVersionCheck{ @@ -45,7 +45,7 @@ func TestNBVersionCheck_Check(t *testing.T) { name: "Valid Peer NB version With No Patch Version 2", input: peer.Peer{ Meta: peer.PeerSystemMeta{ - UIVersion: "2.0.0", + WtVersion: "2.0.0", }, }, check: NBVersionCheck{ @@ -58,7 +58,7 @@ func TestNBVersionCheck_Check(t *testing.T) { name: "Older Peer NB version", input: peer.Peer{ Meta: peer.PeerSystemMeta{ - UIVersion: "0.9.9", + WtVersion: "0.9.9", }, }, check: NBVersionCheck{ @@ -71,7 +71,7 @@ func TestNBVersionCheck_Check(t *testing.T) { name: "Older Peer NB version With Patch Version", input: peer.Peer{ Meta: peer.PeerSystemMeta{ - UIVersion: "0.1.0", + WtVersion: "0.1.0", }, }, check: NBVersionCheck{ @@ -84,7 +84,7 @@ func TestNBVersionCheck_Check(t *testing.T) { name: "Older Peer NB version With Check Disabled", input: peer.Peer{ Meta: peer.PeerSystemMeta{ - UIVersion: "0.0.9", + WtVersion: "0.0.9", }, }, check: NBVersionCheck{ @@ -97,7 +97,7 @@ func TestNBVersionCheck_Check(t *testing.T) { name: "Invalid Peer NB version", input: peer.Peer{ Meta: peer.PeerSystemMeta{ - UIVersion: "x.y.z", + WtVersion: "x.y.z", }, }, check: NBVersionCheck{