From eacfcb22f6b16826a8a7050df6aee8f4078a462c Mon Sep 17 00:00:00 2001 From: "sachin.vm" Date: Fri, 25 Aug 2023 05:09:11 -0700 Subject: [PATCH 1/2] [CLIENT-2526] bumped version as its a minor release --- lib/aerospike/version.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/aerospike/version.rb b/lib/aerospike/version.rb index b955623..72d9a4f 100644 --- a/lib/aerospike/version.rb +++ b/lib/aerospike/version.rb @@ -1,4 +1,4 @@ # encoding: utf-8 module Aerospike - VERSION = "2.28.1" + VERSION = "2.29.0" end From 5d8b31b85d350cb7f0c7f2057c1c9d87c36751ed Mon Sep 17 00:00:00 2001 From: "sachin.vm" Date: Fri, 25 Aug 2023 05:48:37 -0700 Subject: [PATCH 2/2] [CLIENT-2526] added rspec for set quota --- spec/aerospike/security_spec.rb | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/spec/aerospike/security_spec.rb b/spec/aerospike/security_spec.rb index ec5bc60..6c24ddf 100644 --- a/spec/aerospike/security_spec.rb +++ b/spec/aerospike/security_spec.rb @@ -64,6 +64,7 @@ client.create_role("role-read-test-test", [Aerospike::Privilege.new(code: Aerospike::Role::READ, namespace: "test", set_name: "test")], ["192.0.0.1"], 0, 0) client.create_role("role-write-test", [Aerospike::Privilege.new(code: Aerospike::Role::READ_WRITE, namespace: "test", set_name: "test")], ["192.1.0.1"], 0, 0) + client.create_role("role-update-quota-test", [Aerospike::Privilege.new(code: Aerospike::Role::READ)], ["198.1.1.1"], 100, 10) client.grant_privileges("role-read-test-test", [Aerospike::Privilege.new(code: Aerospike::Role::READ_WRITE, namespace: "test", set_name: "bar"), Aerospike::Privilege.new(code: Aerospike::Role::READ_WRITE_UDF, namespace: "test", set_name: "test")]) client.revoke_privileges("role-read-test-test", [Aerospike::Privilege.new(code: Aerospike::Role::READ_WRITE_UDF, namespace: "test", set_name: "test")]) @@ -96,8 +97,20 @@ expect(role.read_quota).to eq 100 expect(role.write_quota).to eq 1000 + + role = client.query_role("role-update-quota-test") + expect(role.name).to eq "role-update-quota-test" + expect(role.read_quota).to eq 100 + expect(role.write_quota).to eq 10 + client.set_quotas("role-update-quota-test", 100, 1000) + role = client.query_role("role-update-quota-test") + expect(role.name).to eq "role-update-quota-test" + expect(role.read_quota).to eq 100 + expect(role.write_quota).to eq 1000 + client.drop_role("role-read-test-test") - client.drop_role("role-write-test") + client.drop_role("role-update-quota-test") + client.drop_role("dummy-role") client.drop_role("dummy-role") end