summaryrefslogtreecommitdiffstats
path: root/nserver/tests
Commit message (Collapse)AuthorAgeFilesLines
* nserver: ncmd.h: Add NS_STORE.rsiddharth2020-04-171-0/+44
| | | | | | | | | * nserver/src/ncmd.c (find_function): Add handling to find NS_STORE. (call_function): Add handling for NS_STORE. * nserver/src/ncmd.h (FUNCTIONS): Add NS_STORE * nserver/tests/ncmd_tests.c (test_find_function) (test_call_function, test_process): Update tests to check the correctness of NS_STORE.
* nserver: Add ssload.rsiddharth2020-04-171-0/+12
| | | | | | * nserver/src/protocol.c (ssload): New function definition. * nserver/src/protocol.h (ssload): New function declaration. * nserver/tests/protocol_tests.c (test_ssload): New test.
* nserver: Update test_ssdelete.rsiddharth2020-04-171-1/+1
| | | | * nserver/tests/protocol_tests.c (test_ssdelete): Fix test.
* nserver: Add ssstore.rsiddharth2020-04-171-0/+13
| | | | | | * nserver/src/protocol.c (ssstore): New function definition. * nserver/src/protocol.h (ssstore): New function declaration. * nserver/tests/protocol_tests.c (test_ssstore): New test.
* nserver: Add db_load.rsiddharth2020-04-171-0/+17
| | | | | | * nserver/src/db.c (db_load): New function definition. * nserver/src/db.h (db_load): New function declaration. * nserver/tests/db_tests.c (test_db_load): New test.
* nserver: Add db_store.rsiddharth2020-04-171-0/+12
| | | | | | * nserver/src/db.c (db_store): New function definition. * nserver/src/db.h (db_store): New function declaration. * nserver/tests/db_tests.c (test_db_store): New test.
* nserver: Add Stats_unstringify.rsiddharth2020-04-171-2/+24
| | | | | | | | | | * nserver/src/stats.c (Stats_unstringify): New function definition. * nserver/src/stats.h (Stats_unstringify): New function declaration. * nserver/tests/stats_tests.c (tests_stats_unstringify): Test for Stats_unstringify. (tests_stats_unstringify): st_str is now a static variable. Don't free it; it's done in tests_stats_unstringify. (st_str): New static variable.
* nserver: Update Stats_stringify.rsiddharth2020-04-171-1/+1
| | | | | * nserver/src/stats.c (Stats_stringify): Change format of stringified Stats. * nserver/tests/stats_tests.c (test_stats_stringify): Update test.
* nserver: Add Stats_stringify.rsiddharth2020-04-171-0/+45
| | | | | | | * nserver/src/stats.c (Stats_stringify): New function definition. * nserver/src/stats.h (Stats_stringify): New function declaration. * nserver/tests/stats_tests.c (test_tests_stringify): Test for Stats_stringify.
* nserver: Add db.hrsiddharth2020-04-171-0/+21
| | | | | | | | | | * nserver/.gitignore: Add nserver.db * nserver/Makefile ($(PROGRAMS)) (tests): Link gdbm. (clean): Remove nserver.db * nserver/src/db.c (db_init): New function. * nserver/src/db.h (db_init): New function declaration. * nserver/tests/db_tests.c: Tests for db.h
* nserver/tests: Update protocol_tests.c.rsiddharth2020-04-171-6/+36
| | | | | * nserver/tests/protocol_tests.c (test_sscreate) (test_sssample, test_ssmean, test_ssdump): Add delete flag test.
* nserver/src/protocol.c: Updat ssdelete.rsiddharth2020-04-171-1/+1
| | | | | | * nserver/src/protocol.c (ssdelete): Refactor to use TSTree. (hash): Remove static variable. No longer used. * nserver/tests/protocol_tests.c (all_tests): Uncomment test_ssdelete.
* nserver: Refactor sslist.rsiddharth2020-04-171-4/+4
| | | | | * nserver/src/protocol.c (sslist): Refactor sslist to use TSTree. * nserver/tests/protocol_tests.c (test_sslist): Update test.
* nserver/src/protocol.c: Refactor ssdump.rsiddharth2020-04-171-3/+3
| | | | | * nserver/src/protocol.c (ssdump): Refactor function to use TSTree. * server/tests/protocol_tests.c (test_ssdump): Updat test.
* nserver: Update ssmean.rsiddharth2020-04-171-2/+2
| | | | | | * nserver/src/protocol.c (ssmean): Rewrite to use TSTree instead of Hashmap. * nserver/tests/protocol_tests.c (test_ssmean): Update test.
* nserver/src/protocol.c: Update sssample.rsiddharth2020-04-171-0/+9
| | | | | | * nserver/src/protocol.c (sssample): Call ssample_parent on key. * nserver/tests/protocol_tests.c (test_sscreate, test_sssample): Update tests to test ssample_parent.
* nserver/tests/protocol_tests.c;: Updat test_sscreate.rsiddharth2020-04-171-1/+4
| | | | * nserver/tests/protocol_tests.c (test_sscreate): Update test.
* nserver/src/protocol.c: Update ssample.rsiddharth2020-04-171-3/+3
| | | | | * nserver/src/protocol.c (ssample): Refactor to use TSTree. * nserver/tests/protocol_tests.c (test_ssample): Update test.
* nserver: ncmd.c: Update call_function.rsiddharth2020-04-171-4/+4
| | | | | | | * nserver/src/ncmd.c (call_function): Update sssample handling; now returns mean on success. * nserver/tests/ncmd_tests.c (test_call_function) (test_process): Update tests.
* nserver: protocol.h: Update sssample.rsiddharth2020-04-171-15/+15
| | | | | | | * nserver/src/protocol.c (sssample): Return mean on success. * nserver/src/protocol.h (sssample): Change return data type to double. * nserver/tests/protocol_tests.c (test_sssample): Update test.
* nserver: Update check_cmd.rsiddharth2020-04-171-12/+14
| | | | | | * nserver/src/ncmd.c (check_cmd): Add argument err. * nserver/src/ncmd.h (check_cmd): Update function declaration. * nserver/tests/ncmd_tests.c (test_check_cmd): Update test.
* nserver: Flesh out process.rsiddharth2020-04-171-0/+56
| | | | | | | * nserver/src/ncmd.c (process): Initial version. * nserver/src/ncmd.h (process): Update declaration. * nserver/tests/ncmd_tests.c (test_process): Test for process. (all_tests): Add test_process.
* nserver: ncmd_tests.c: Update test_call_function.rsiddharth2020-04-171-0/+15
| | | | | * nserver/tests/ncmd_tests.c (test_call_function): Delete ham and beef too.
* nserver: Update call_function.rsiddharth2020-04-171-19/+21
| | | | | | | | | * nserver/src/ncmd.c (call_function): Add arg out. Return integer. (process): Skeleton commented out. * nserver/src/ncmd.h (call_function): Update function declaration. (process): New function declaration. * nserver/tests/ncmd_tests.c (test_call_function): Update test.
* nserver: Update call_function.rsiddharth2020-04-171-0/+9
| | | | | | * nserver/src/ncmd.c (call_function): Dynmically allocate space for msg. * nserver/tests/ncmd_tests.c (test_call_function): Updat test.
* nserver: Add call_function.rsiddharth2020-04-171-0/+65
| | | | | | | | | * nserver/src/ncmd.c (call_function): New function definition. Initial version. * nserver/src/ncmd.h (call_function): New function declaration. * nserver/tests/ncmd_tests.c (test_call_function): Test for call_function. (all_tests): Add test_call_function.
* nserver: ncmd_tests.c: Update test_find_function.rsiddharth2020-04-171-0/+24
| | | | * nserver/tests/ncmd_tests.c (test_find_function): Add new checks.
* nserver: ncmd.h: Add find_function.rsiddharth2020-04-171-0/+51
| | | | | | | | | * nserver/src/ncmd.c (test_find_function): New function. (all_tests): Add test_find_function. * nserver/src/ncmd.h (FUNCTIONS): New enum. (find_function): New function declaration. * nserver/tests/ncmd_tests.c (find_function): New function definition.
* nserver: ncmd_tests.c: Update test_check_cmd.rsiddharth2020-04-171-1/+0
| | | | | * nserver/tests/ncmd_tests.c (test_check_cmd): Remove printf statement.
* nserver: ncmd.h : Add cmd_parts.rsiddharth2020-04-171-0/+32
| | | | | | | * nserver/src/ncmd.c (cmd_parts): New function definition. * nserver/src/ncmd.h (cmd_parts): New function declaration. * nserver/tests/ncmd_tests.c (test_cmd_parts): Test cmd_parts. (all_tests): Add test_cmd_parts
* nserver: ncmd_tests.c: Add test_check_cmdrsiddharth2020-04-171-0/+53
| | | | | * nserver/tests/ncmd_tests.c (test_check_cmd): Test for check_cmd. (all_tests): Add test_check_cmd.
* nserver: ncmd_tests.c: Update test_sanitize.rsiddharth2020-04-171-0/+4
| | | | * nserver/tests/ncmd_tests.c (test_sanitize): Cleanup cmd.
* nserver: Add ncmd_tests.crsiddharth2020-04-171-0/+61
| | | | | * nserver/tests/ncmd_tests.c (test_sanitize): Test for sanitize. (all_tests): New function.
* nserver: protocol.h: Add sslist.rsiddharth2020-04-171-0/+12
| | | | | | | * nserver/src/protocol.c (sslist): New function. * nserver/src/protocol.h (sslist): New function declaration. * nserver/tests/protocol_tests.c (test_sslist): Test fr sslist. (all_tests): Add test_sslist.
* nserver: protocol: Define ssdump.rsiddharth2020-04-171-0/+29
| | | | | | * nserver/src/protocol.c (ssdump): New function. * nserver/tests/protocol_tests.c (test_ssdump): New test. (all_tests): Add test_ssdump.
* nserver: protocol: Define ssdelete.rsiddharth2020-04-171-0/+17
| | | | | | * nserver/src/protocol.c (ssdelete): New function. * nserver/tests/protocol_tests.c (test_ssdelete): New test. (all_tests): Add test_ssdelete.
* nserver: protocol: Define ssmean.rsiddharth2020-04-171-0/+17
| | | | | | * nserver/src/protocol.c (ssmean): New function. * nserver/tests/protocol_tests.c (test_ssmean): New test. (all_tests): ADd test_ssmean.
* nserver: protocol: Define sssample.rsiddharth2020-04-171-0/+29
| | | | | | * nserver/src/protocol.c (sssample): New function. * nserver/tests/protocol_tests.c (test_sssample): New test. (all_tests): Add test_sssample.
* nserver/tests: Update test_sscreate.rsiddharth2020-04-171-2/+2
| | | | Change key names.
* nserver/tests: Update test_sscreate.rsiddharth2020-04-171-1/+4
|
* nserver: Add protocol_tests.crsiddharth2020-04-171-0/+23
|
* Add nserver.rsiddharth2020-04-172-0/+52
For now it contains only "statserve".