Commit Graph

38 Commits

Author SHA1 Message Date
Kelvin Clement Mwinuka
b48ee54228 Updated test suites to retry connection to tcp server. Use concurrency to setup cluster in Test_Cluster suite. 2024-05-31 18:17:36 +08:00
Kelvin Clement Mwinuka
c7560ce9dd Updated all test suites to include connection and server shutdown on cleanup. 2024-05-31 01:30:18 +08:00
Kelvin Clement Mwinuka
6f8511632e Close client connection on quit command 2024-05-30 20:01:24 +08:00
Kelvin Clement Mwinuka
502e804459 Removed logic to get unexported methods from the echovault package in all tests. 2024-05-30 19:33:01 +08:00
Kelvin Clement Mwinuka
e1d5e8203f Disabled cluster test until a more efficient method is found. 2024-05-29 23:15:27 +08:00
Kelvin Clement Mwinuka
7691ec432d Added test coverave for sorted set api methods 2024-05-28 16:49:40 +08:00
Kelvin Clement Mwinuka
bb667cf7f7 Added test coverave + fixed some bugs with pubsub api methods. 2024-05-27 18:48:08 +08:00
Kelvin Clement Mwinuka
0108444d69 Replaced fmt.Println statements with log.Println.
Return "empty command" error from handleCommand method if an empty command is passed to the server.
Wait until connection is no longer nil in acl package tests.
2024-05-27 11:45:48 +08:00
Kelvin Clement Mwinuka
93a616c5c1 Updated RAFT layer to use new keyspace methods. Fixed API methods for HSET and SINTERCARD to match new key overwriting behaviour. 2024-05-26 15:49:51 +08:00
Kelvin Clement Mwinuka
e3ecc42454 Updated string commands package to use new keyspace methods and resp connection for tests 2024-05-26 15:04:57 +08:00
Kelvin Clement Mwinuka
edf82886bd Updated sorted_set commands package to use new keyspace methods and its tests to use resp connection instead of calling handler directly 2024-05-26 14:48:13 +08:00
Kelvin Clement Mwinuka
15191dccee Implemented new param methods and testing through resp connection in set commands package 2024-05-26 08:41:29 +08:00
Kelvin Clement Mwinuka
9f371caa4b Deleted debug fmt.Println statements 2024-05-26 02:01:06 +08:00
Kelvin Clement Mwinuka
af8a002ba5 Updated list command tests to use resp connection instead of directly invoking internal method 2024-05-26 01:59:44 +08:00
Kelvin Clement Mwinuka
926a008c23 Updated generic and hash package tests to use tcp connection instead of calling the handler directly 2024-05-24 13:40:40 +08:00
Kelvin Clement Mwinuka
f894a531b0 Added happy path test case for data replication 2024-05-22 16:11:00 +08:00
Kelvin Clement Mwinuka
a9c11adcd6 Fixed users unlock in ACL LOAD command handler 2024-05-19 04:28:06 +08:00
Kelvin Clement Mwinuka
c634b1b20e Return ok boolean instead of OK string in embedded api methods that return ok status. Updated tests to match new return types 2024-05-18 22:49:21 +08:00
Kelvin Clement Mwinuka
7fb236e631 Added HGet to embedded API 2024-05-14 03:30:51 +08:00
Kelvin Clement Mwinuka
aa7b5fa8cc Added ZRemRangeByLex and ZRemRangeByRank to embedded API. 2024-05-14 02:11:10 +08:00
Kelvin Clement Mwinuka
1981fe9d1d Added unit tests for COMMAND COUNT and COMMAND LIST commands in admin module 2024-05-09 02:06:31 +08:00
Kelvin Clement Mwinuka
270c5ef002 Use make scripts to run tests in build workflow 2024-05-09 00:11:07 +08:00
Kelvin Clement Mwinuka
cf38d17221 Disabled MODULE LIST command test 2024-05-09 00:07:51 +08:00
Kelvin Clement Mwinuka
cfa8e35997 Use path.Join instead of hardcoded path to load mdules in admin tests. 2024-05-09 00:05:01 +08:00
Kelvin Clement Mwinuka
ba48a517e4 Re-enabled cleanup of testdata folder after completing Test_AdminCommand suite 2024-05-08 23:54:31 +08:00
Kelvin Clement Mwinuka
c5c1487799 Fixed race condition in admin module commands tests by passing --race flag to build command for modules 2024-05-08 23:53:12 +08:00
Kelvin Clement Mwinuka
b3ceecf80f Removed unnecessary fmt.Println statement 2024-05-08 23:21:35 +08:00
Kelvin Clement Mwinuka
63524c0996 Fixed type in admin module test file 2024-05-08 23:20:23 +08:00
Kelvin Clement Mwinuka
d28bda98bb Added makefile command to build modules for admins module tests.
Implemented more sensible logic for testing the COMMANDS command instead of just printing each returned command.
Implemented tests for MODULE LOAD, MODULE UNLOAD, and MODULE LIST commands.
Implemented testdata folder cleanup after finishing admin command tests.
2024-05-08 23:17:45 +08:00
Kelvin Clement Mwinuka
193871ec72 Removed test folder and moved all commands tests to their respective internal modules. Moved api tests into echovault package. This change has been made because the speratate test folder is not idiomatic and caused test coverage report to not be generated. 2024-05-04 17:45:10 +08:00
Kelvin Clement Mwinuka
0f6ae1c8ac Implemented LoadModules method to load external modules at runtime.
Implemented UnloadModules method to remove modules at runtime.
Implemented ListModules method to list the current loaded modules.
Implemented "MODULE LOAD", "MODULE UNLOAD", and "MODULE LIST" commands.
2024-05-03 11:57:21 +08:00
Kelvin Clement Mwinuka
281c4f27a7 Added godoc commends for embedded methods and types to extend commands. Moved constants to internal directory 2024-04-29 15:20:10 +08:00
Kelvin Clement Mwinuka
1d56e9839b Implemented tests for AddCommand, ExecuteCommand and RemoveCommand methods 2024-04-28 10:43:46 +08:00
Kelvin Clement Mwinuka
c241cc07b1 Renamed *AccessKey type to better represent the response on *KeyExtractionFunc types 2024-04-28 07:34:34 +08:00
Kelvin Clement Mwinuka
972cbe0a4f Renamed command API methods to use CamelCase 2024-04-28 07:22:39 +08:00
Kelvin Clement Mwinuka
97f4617d86 Moved all packages from /pkg directory to the root directory. Deleted /pkg directory. Pass keyspace functions to raft package instead of an EchoVault instance. This removes dependency on the echovault pakage from the raft package. 2024-04-28 00:37:45 +08:00
Kelvin Clement Mwinuka
6ad3b7baab Exported EchoVault interface now onlu contains the keyspace methods. All other methods are private. Private methods are accessed using the reflect package in the test folder 2024-04-26 02:33:35 +08:00
Kelvin Clement Mwinuka
b6ddb43a49 Removed duplicate imports for set, sorted_set, pubsub and acl modules. Moved /modules from /pkg to /internal. Delted commands package: Commands will now be automatically loaded when an EchoVault instance is initialised. 2024-04-24 22:37:16 +08:00