Skip to content

Commit

Permalink
use Wt version
Browse files Browse the repository at this point in the history
  • Loading branch information
bcmmbaga committed Jan 15, 2024
1 parent 7009743 commit 92c09e2
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion management/server/posture/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down
14 changes: 7 additions & 7 deletions management/server/posture/version_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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{
Expand All @@ -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{
Expand All @@ -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{
Expand All @@ -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{
Expand All @@ -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{
Expand All @@ -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{
Expand All @@ -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{
Expand Down

0 comments on commit 92c09e2

Please sign in to comment.