Remove clients tests because they are already running on every commit on builders.

This commit is contained in:
Sean Cribbs 2014-06-03 11:44:07 -05:00
parent b14d093ce5
commit 3ffab65863
3 changed files with 0 additions and 211 deletions

View File

@ -1,52 +0,0 @@
-module(client_java_verify).
-behavior(riak_test).
-export([confirm/0]).
-include_lib("eunit/include/eunit.hrl").
%% Change when a new release comes out.
-define(JAVA_FAT_BE_URL, rt_config:get('java.fat_be_url')).
-define(JAVA_TESTS_URL, rt_config:get('java.tests_url')).
-prereq("java").
-prereq("curl").
confirm() ->
lager:info("+P ~p", [erlang:system_info(process_limit)]),
prereqs(),
Nodes = rt:deploy_nodes(1),
[Node1] = Nodes,
?assertEqual(ok, rt:wait_until_nodes_ready([Node1])),
rpc:call(Node1, application, set_env, [erlang_js, script_timeout, 10000]),
[{Node1, ConnectionInfo}] = rt:connection_info([Node1]),
{HTTP_Host, HTTP_Port} = orddict:fetch(http, ConnectionInfo),
{PB_Host, PB_Port} = orddict:fetch(pb, ConnectionInfo),
lager:info("Connection Info: http: ~p:~p pb: ~p:~p", [HTTP_Host, HTTP_Port, PB_Host, PB_Port]),
java_unit_tests(HTTP_Host, HTTP_Port, PB_Host, PB_Port),
pass.
prereqs() ->
%% Does you have the java client available?
rt_local:download(?JAVA_FAT_BE_URL),
rt_local:download(?JAVA_TESTS_URL),
ok.
java_unit_tests(HTTP_Host, HTTP_Port, _PB_Host, PB_Port) ->
lager:info("Run the Java unit tests from somewhere on the local machine."),
%% run the following:
Cmd = io_lib:format(
"java -Dcom.basho.riak.host=~s -Dcom.basho.riak.http.port=~p -Dcom.basho.riak.pbc.port=~p -cp ~s:~s org.junit.runner.JUnitCore com.basho.riak.client.AllTests",
[HTTP_Host, HTTP_Port, PB_Port,
rt_config:get(rt_scratch_dir) ++ "/" ++ rt_local:url_to_filename(?JAVA_FAT_BE_URL),
rt_config:get(rt_scratch_dir) ++ "/" ++ rt_local:url_to_filename(?JAVA_TESTS_URL)]),
lager:info("Cmd: ~s", [Cmd]),
{ExitCode, JavaLog} = rt_local:stream_cmd(Cmd, [{cd, rt_config:get(rt_scratch_dir)}]),
?assertEqual(0, ExitCode),
lager:info(JavaLog),
?assertNot(rt:str(JavaLog, "FAILURES!!!")),
ok.

View File

@ -1,84 +0,0 @@
-module(client_python_verify).
-behavior(riak_test).
-export([confirm/0]).
-include_lib("eunit/include/eunit.hrl").
-define(PYTHON_CLIENT_TAG, "1.5.2").
-define(PYTHON_CHECKOUT, filename:join([rt_config:get(rt_scratch_dir), "riak-python-client"])).
-define(PYTHON_GIT_URL, "git://github.com/basho/riak-python-client.git").
%% Need python, yo
-prereq("python").
%% Virtualenv will isolate this so we don't have permissions issues.
-prereq("virtualenv").
confirm() ->
%% test requires allow_mult=false b/c of rt:systest_read
rt:set_conf(all, [{"buckets.default.allow_mult", "false"}]),
{ok, TestCommand} = prereqs(),
Config = [{riak_kv, [{secondary_index_sort_default, true}]},
{riak_search, [{enabled, true}]}],
[Node] = rt:deploy_nodes(1, Config),
rt:wait_for_service(Node, riak_search),
[{Node, ConnectionInfo}] = rt:connection_info([Node]),
{HTTP_Host, HTTP_Port} = orddict:fetch(http, ConnectionInfo),
{PB_Host, PB_Port} = orddict:fetch(pb, ConnectionInfo),
lager:info("Connection Info: http: ~p:~p pb: ~p:~p", [HTTP_Host, HTTP_Port, PB_Host, PB_Port]),
lager:info("Enabling search hook on 'searchbucket'"),
rt:enable_search_hook(Node, <<"searchbucket">>),
{ExitCode, PythonLog} = rt_local:stream_cmd(TestCommand,
[{cd, ?PYTHON_CHECKOUT},
{env,[{"RIAK_TEST_PB_HOST", PB_Host},
{"RIAK_TEST_PB_PORT", integer_to_list(PB_Port)},
{"RIAK_TEST_HTTP_HOST", HTTP_Host},
{"RIAK_TEST_HTTP_PORT", integer_to_list(HTTP_Port)},
{"SKIP_LUWAK", "1"}]}]),
?assertEqual(0, ExitCode),
lager:info(PythonLog),
?assertNot(rt:str(PythonLog, "FAIL")),
pass.
prereqs() ->
%% Cleanup from previous test runs as it causes a
%% virtualenv caremad explosion if it already exists
lager:info("[PREREQ] Cleaning up python scratch directory"),
CleanupCMD = io_lib:format("rm -rf ~s", [?PYTHON_CHECKOUT]),
os:cmd(CleanupCMD),
%% Python should be at least 2.6, but not 3.x
lager:info("[PREREQ] Checking for python version >= 2.6, < 3.0"),
"Python 2." ++ [Minor|_] = Version = os:cmd("python -V"),
lager:info("[PREREQ] Got python version: ~s", [Version]),
?assert(Minor =:= $6 orelse Minor =:= $7),
%% Need setuptools too
lager:info("[PREREQ] Checking for presence of setuptools"),
?assertCmd("python -c 'import setuptools'"),
%% Checkout the project and a specific tag.
lager:info("[PREREQ] Cloning riak-python-client from ~s", [?PYTHON_GIT_URL]),
Cmd = io_lib:format("git clone ~s ~s", [?PYTHON_GIT_URL, ?PYTHON_CHECKOUT]),
rt_local:stream_cmd(Cmd),
lager:info("[PREREQ] Resetting python client to tag '~s'", [?PYTHON_CLIENT_TAG]),
TagCmd = io_lib:format("git checkout ~s", [?PYTHON_CLIENT_TAG]),
rt_local:stream_cmd(TagCmd, [{cd, ?PYTHON_CHECKOUT}]),
lager:info("[PREREQ] Installing an isolated environment with virtualenv in ~s", [?PYTHON_CHECKOUT]),
rt_local:stream_cmd("virtualenv --clear --no-site-packages .", [{cd, ?PYTHON_CHECKOUT}]),
lager:info("[PREREQ] Installing dependencies"),
rt_local:stream_cmd("bin/python setup.py develop", [{cd, ?PYTHON_CHECKOUT}]),
case Minor of
$6 ->
lager:info("[PREREQ] Installing unittest2 for python 2.6"),
rt_local:stream_cmd("bin/easy_install unittest2", [{cd, ?PYTHON_CHECKOUT}]),
{ok, "bin/unit2 riak.tests.test_all"};
_ ->
{ok, "bin/python setup.py test"}
end.

View File

@ -1,75 +0,0 @@
-module(client_ruby_verify).
-behavior(riak_test).
-export([confirm/0]).
-include_lib("eunit/include/eunit.hrl").
-prereq("ruby").
-prereq("gem").
%% @todo Only Memory backend is supported
confirm() ->
prereqs(),
GemDir = dat_gem(),
Nodes = rt:deploy_nodes([{current,
[{riak_kv, [{test, true},
{add_paths, [filename:join([GemDir, "erl_src"])]}]},
{riak_search, [{enabled, true},
{search_backend, riak_search_test_backend}]}]}],
[riak_search]),
[Node1] = Nodes,
[{Node1, ConnectionInfo}] = rt:connection_info([Node1]),
{_HTTP_Host, HTTP_Port} = orddict:fetch(http, ConnectionInfo),
{_PB_Host, PB_Port} = orddict:fetch(pb, ConnectionInfo),
%% Ruby Client Tests require a path to riak, to grab the PIPE_DIR
%% from riak && riak-admin. Work will need to be done on the
%% ruby-client side to enable this test to work with remote nodes.
%% Fortunately for us, riak_test does not support remote nodes, so
%% all is fine in ruby land... for now.
%% That's why I'm calling rtdev directly, violating a cardinal rule
%% of riak_test.
RiakRootDir = rtdev:node_path(Node1),
Cmd = "bin/rspec --profile --tag integration --tag \~nodegen --no-color",
lager:info("Cmd: ~s", [Cmd]),
{Code, RubyLog} = rt_local:stream_cmd(Cmd, [{cd, GemDir}, {env, [
{"RIAK_NODE_NAME", atom_to_list(Node1)},
{"RIAK_ROOT_DIR", RiakRootDir},
{"HTTP_PORT", integer_to_list(HTTP_Port)},
{"PB_PORT", integer_to_list(PB_Port)},
{"RIAK_VERSION", binary_to_list(rt:get_version())}
]}]),
?assert(rt:str(RubyLog, " 0 failures")),
?assert(Code =:= 0),
pass.
prereqs() ->
lager:info("Checking ruby version is 1.9.3 or 2.0.0"),
RubyVersion = os:cmd("ruby -v"),
?assert(rt:str(RubyVersion, "1.9.3") orelse rt:str(RubyVersion, "2.0.0")),
rt_local:install_on_absence("bundle", "gem install bundler --no-rdoc --no-ri"),
ok.
% Download the ruby-client gem, unpack it and build it locally
dat_gem() ->
lager:info("Fetching riak-client gem"),
GemInstalled = os:cmd("cd " ++ rt_config:get(rt_scratch_dir) ++ " ; gem fetch riak-client"),
GemFile = string:substr(GemInstalled, 12, length(GemInstalled) - 12),
%GemFile = "riak-client",
lager:info("Downloaded gem: ~s", [GemFile]),
rt_local:stream_cmd(io_lib:format("gem unpack ~s.gem", [GemFile]), [{cd, rt_config:get(rt_scratch_dir)}]),
Cmd = "bundle install --without=guard --binstubs --no-color --path=vendor/bundle",
lager:info(Cmd),
GemDir = filename:join([rt_config:get(rt_scratch_dir), GemFile]),
{_Exit, _Log} = rt_local:stream_cmd(Cmd, [{cd, GemDir}, {env, [{"BUNDLE_PATH", "vendor/bundle"}]}]),
GemDir.