Skip to content

Commit

Permalink
Don't run tests for 'tables' endpoints against Riak KV
Browse files Browse the repository at this point in the history
  • Loading branch information
Travis B. Hartwell committed Dec 20, 2016
1 parent 49a6d7e commit f2c00ba
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions test/integration/re_wm_explore_test.erl
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ assert_paths(Method, Base, [Path|Paths], RiakType, Accum) ->
ExpectedCode = path_code(Method, Path),
assert_paths(Method, Base, Paths, RiakType, [?_assertEqual({ExpectedCode, Method, Url, Content}, {Code, Method, Url, Content})|Accum]);
false ->
?debugFmt("Skipping ~p because we are on Riak OSS.~n", [Path]),
assert_paths(Method, Base, Paths, RiakType, Accum)
end.

Expand Down Expand Up @@ -127,8 +126,17 @@ riak_type() ->
end.

%% The '*repl*' paths are not testable when Riak OSS is being used
is_testable_path(_, {_, ee}) -> true;
is_testable_path([Path|_], {_, oss}) ->
not lists:prefix("repl", Path).
is_testable_path([Path|_], RiakType) ->
case {lists:prefix("repl", Path),
lists:prefix("tables", Path),
RiakType} of
{true, _, {_, oss}} ->
?debugFmt("Skipping ~p because we are on Riak OSS.~n", [Path]),
false;
{_, true, {kv, _}} ->
?debugFmt("Skipping ~p because we are on Riak KV.~n", [Path]),
false;
_ -> true
end.

-endif.

0 comments on commit f2c00ba

Please sign in to comment.