Skip to content

Commit

Permalink
feat: vec-443 add node role field to AboutResponse
Browse files Browse the repository at this point in the history
  • Loading branch information
dwelch-spike committed Dec 2, 2024
1 parent 4553b2b commit d93b0f5
Show file tree
Hide file tree
Showing 4 changed files with 211 additions and 113 deletions.
2 changes: 1 addition & 1 deletion docker/.env
Original file line number Diff line number Diff line change
@@ -1 +1 @@
AVS_IMAGE=aerospike/aerospike-vector-search:0.11.1
AVS_IMAGE=aerospike/aerospike-vector-search:1.0.0
14 changes: 11 additions & 3 deletions integration_single_node_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -489,6 +489,7 @@ func (suite *SingleNodeTestSuite) TestIndexUpdate() {
MaxEntries: ptr(uint64(10_007)),
Expiry: ptr(int64(10_008)),
},
EnableVectorIntegrityCheck: ptr(true),
},
},
},
Expand Down Expand Up @@ -1326,11 +1327,17 @@ func (suite *SingleNodeTestSuite) TestAbout() {
nodeId *protos.NodeId
expectedVersion string
expectedErrMsg *string
expectedRoles []protos.NodeRole
}{
{
name: "nil-node",
nodeId: nil,
expectedVersion: "0.11.1",
expectedVersion: "1.0.0",
// by default the node has all roles
expectedRoles: []protos.NodeRole{
protos.NodeRole_INDEX_QUERY,
protos.NodeRole_INDEX_UPDATE,
},
},
{
name: "node id DNE",
Expand All @@ -1344,7 +1351,7 @@ func (suite *SingleNodeTestSuite) TestAbout() {
for _, tc := range testCases {
suite.T().Run(tc.name, func(t *testing.T) {
ctx := context.Background()
actualVersion, err := suite.AvsClient.About(ctx, tc.nodeId)
aboutRes, err := suite.AvsClient.About(ctx, tc.nodeId)

if tc.expectedErrMsg != nil {
suite.Error(err)
Expand All @@ -1354,7 +1361,8 @@ func (suite *SingleNodeTestSuite) TestAbout() {
suite.NoError(err)
}

suite.Equal(actualVersion.GetVersion(), tc.expectedVersion)
suite.Equal(tc.expectedVersion, aboutRes.GetVersion())
suite.Equal(tc.expectedRoles, aboutRes.GetRoles())
})
}
}
Loading

0 comments on commit d93b0f5

Please sign in to comment.