Permalink
Browse files

Quick cleanup of a couple things from eqc week.

  • Loading branch information...
1 parent d10f9cc commit a1e4651d18522622454402c6203d4acd10baea12 @massung massung committed Jan 25, 2012
Showing with 9 additions and 4 deletions.
  1. +9 −4 test/eqc_routes.erl
View
@@ -136,9 +136,11 @@ filter_validate_n (Size,Pages,_Page,Contents,Filter) ->
%% ---------------------------------------------------------------------------
%% eqc generators
+%% valid authorization modes for app.config
g_auth () ->
oneof([userlist,none]).
+%% username and password pairs (none = don't pass user/pass)
g_userpass () ->
oneof([{user,pass},
{user,bad_password},
@@ -147,28 +149,31 @@ g_userpass () ->
none % not passing auth data
]).
+%% query string generator
g_qs () ->
?LET(Filter,g_filter(),
?LET(Page,g_page(),
Filter ++ Page)).
+%% valid and invalid query string filters for ring page
g_filter () ->
- oneof([oneof([[{filter,node}],
- [{filter,node},{q,g_node()}],
- [{q,g_node()}]
- ]),
+ oneof([[{filter,node}],
+ [{filter,node},{q,g_node()}],
+ [{q,g_node()}],
[{filter,handoffs}],
[{filter,fallbacks}],
[]
]).
+%% pagination data for ring page
g_page () ->
oneof([[{n,int()},{p,int()}],
[{n,int()}],
[{p,int()}],
[]
]).
+%% this node or a dummy node
g_node () ->
oneof([node(),'dummy@nohost']).

0 comments on commit a1e4651

Please sign in to comment.