Permalink
Browse files

forgot to clean up the file, this one looks better

  • Loading branch information...
1 parent fe8b82b commit e8277094b48de6db2aabea50591588065e766f45 Joachim committed Mar 15, 2013
Showing with 7 additions and 30 deletions.
  1. +7 −30 test/keys_SUITE.erl
View
@@ -1,14 +1,12 @@
-%% @hidden
+%% Author: Joachim Nilsson joachim@inakanetworks.com
%% SCOPE:
%% OBJECT subtypes "refcount" and "encoding" are not tested, only "idletime"
%% SORT has not been covered, very complicated
-module(keys_SUITE).
-
-compile(export_all).
-
-include_lib("common_test/include/ct.hrl").
all() ->
@@ -45,13 +43,17 @@ generate_random(Amount, Acc, Client) ->
+
+%%%%%%%%%%%
+%% TESTS %%
+%%%%%%%%%%%
+
exists_del(Config)->
{client,Client} = lists:keyfind(client, 1, Config),
ok = erldis_client:sr_scall(Client,[<<"set">>,<<"key1">>,<<"hello">>]),
ok = erldis_client:sr_scall(Client,[<<"set">>,<<"key2">>,<<"world">>]),
true = erldis_client:sr_scall(Client,[<<"exists">>,<<"key1">>]),
-
2 = erldis_client:sr_scall(Client,[<<"del">>,<<"key1">>, <<"key2">>]),
false = erldis_client:sr_scall(Client,[<<"exists">>,<<"key1">>]).
@@ -69,13 +71,9 @@ expire_ttl(Config)->
ok = erldis_client:sr_scall(Client,[<<"set">>,<<"key1">>,<<"hello">>]),
true = erldis_client:sr_scall(Client,[<<"del">>,<<"key1">>,<<"hello">>]),
-
- %% For redis the following should be -2?
-1 = erldis_client:sr_scall(Client,[<<"ttl">>,<<"key1">>]),
-
ok = erldis_client:sr_scall(Client,[<<"set">>,<<"key1">>,<<"hello">>]),
-1 = erldis_client:sr_scall(Client,[<<"ttl">>,<<"key1">>]),
-
true = erldis_client:sr_scall(Client,[<<"expire">>,<<"key1">>,<<"3">>]),
timer:sleep(1000),
2 = erldis_client:sr_scall(Client,[<<"ttl">>,<<"key1">>]),
@@ -191,28 +189,7 @@ randomkey(Config)->
Randoms = generate_random(200,Client),
- %true = erldis_client:sr_scall(Client,[<<"randomkey">>]),
true = lists:member(<<"foo">>, Randoms),
true = lists:member(<<"food">>, Randoms),
true = lists:member(<<"fool">>, Randoms),
- true = lists:member(<<"foot">>, Randoms).
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- %ct:pal(Value, "this is the returnvalue") - This sometimes prints Value when doing a make test.
+ true = lists:member(<<"foot">>, Randoms).

0 comments on commit e827709

Please sign in to comment.