aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrian Cully <bjc@kublai.com>2012-02-09 23:18:15 -0500
committerBrian Cully <bjc@kublai.com>2012-02-09 23:18:15 -0500
commitbf05c0332848fa0598be132a5151cfb151288958 (patch)
tree1aa617eae53bee002a36838040d4abb05ec9295a
parentc21f79c9415c91946c83f5372907e6441d085986 (diff)
downloadmysqlerl-bf05c0332848fa0598be132a5151cfb151288958.tar.gz
mysqlerl-bf05c0332848fa0598be132a5151cfb151288958.zip
Return ok from db/table creation routines, even though it's bogus, just so we can compare it.
-rw-r--r--test/mysqlerl_connect_SUITE.erl4
-rw-r--r--test/mysqlerl_readquery_SUITE.erl6
-rw-r--r--test/mysqlerl_test_lib.erl9
3 files changed, 11 insertions, 8 deletions
diff --git a/test/mysqlerl_connect_SUITE.erl b/test/mysqlerl_connect_SUITE.erl
index 03baa13..e6d5107 100644
--- a/test/mysqlerl_connect_SUITE.erl
+++ b/test/mysqlerl_connect_SUITE.erl
@@ -28,7 +28,7 @@ suite() ->
%% @end
%%--------------------------------------------------------------------
init_per_suite(Config) ->
- mysqlerl_test_lib:create_db(Config),
+ ok = mysqlerl_test_lib:create_db(Config),
ok = application:start(mysqlerl),
Config.
@@ -39,7 +39,7 @@ init_per_suite(Config) ->
%%--------------------------------------------------------------------
end_per_suite(Config) ->
ok = application:stop(mysqlerl),
- mysqlerl_test_lib:drop_db(Config).
+ ok = mysqlerl_test_lib:drop_db(Config).
%%--------------------------------------------------------------------
%% @spec init_per_group(GroupName, Config0) ->
diff --git a/test/mysqlerl_readquery_SUITE.erl b/test/mysqlerl_readquery_SUITE.erl
index 1276a71..cf57a0c 100644
--- a/test/mysqlerl_readquery_SUITE.erl
+++ b/test/mysqlerl_readquery_SUITE.erl
@@ -32,8 +32,8 @@ suite() ->
%% @end
%%--------------------------------------------------------------------
init_per_suite(Config) ->
- mysqlerl_test_lib:create_db(Config),
- mysqlerl_test_lib:create_table(Config),
+ ok = mysqlerl_test_lib:create_db(Config),
+ ok = mysqlerl_test_lib:create_table(Config),
ok = application:start(mysqlerl),
Config.
@@ -44,7 +44,7 @@ init_per_suite(Config) ->
%%--------------------------------------------------------------------
end_per_suite(Config) ->
ok = application:stop(mysqlerl),
- mysqlerl_test_lib:drop_db(Config).
+ ok = mysqlerl_test_lib:drop_db(Config).
%%--------------------------------------------------------------------
%% @spec init_per_group(GroupName, Config0) ->
diff --git a/test/mysqlerl_test_lib.erl b/test/mysqlerl_test_lib.erl
index 7a98c09..79a4ee5 100644
--- a/test/mysqlerl_test_lib.erl
+++ b/test/mysqlerl_test_lib.erl
@@ -32,7 +32,8 @@ create_db(User, Pass, Name) ->
drop_db(User, Pass, Name),
SQL = io_lib:format("CREATE DATABASE ~s", [Name]),
CMD = mysql_cmd(User, Pass),
- os:cmd(io_lib:format("echo '~s' | ~s", [SQL, CMD])).
+ os:cmd(io_lib:format("echo '~s' | ~s", [SQL, CMD])),
+ ok.
drop_db(_Config) ->
DBInfo = ct:get_config(db_info),
@@ -44,7 +45,8 @@ drop_db(_Config) ->
drop_db(User, Pass, Name) ->
SQL = io_lib:format("DROP DATABASE IF EXISTS ~s", [Name]),
CMD = mysql_cmd(User, Pass),
- os:cmd(io_lib:format("echo '~s' | ~s", [SQL, CMD])).
+ os:cmd(io_lib:format("echo '~s' | ~s", [SQL, CMD])),
+ ok.
create_table(Config) ->
DBInfo = ct:get_config(db_info),
@@ -56,4 +58,5 @@ create_table(Config) ->
create_table(User, Pass, Name, DataDir) ->
CMD = mysql_cmd(User, Pass),
- os:cmd(io_lib:format("~s ~s < ~s/table-data.sql", [CMD, Name, DataDir])).
+ os:cmd(io_lib:format("~s ~s < ~s/table-data.sql", [CMD, Name, DataDir])),
+ ok.