Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fix up functional tests

  • Loading branch information...
commit 1627fd495711c46dfc94d82df3ca60b4f731fddb 1 parent f613294
@evanmiller evanmiller authored
View
7 priv/rebar/boss_rebar.erl
@@ -108,7 +108,7 @@ test_functional(RebarConf, BossConf, AppFile) ->
%% Compile, load all boss ebin dir and start boss
boss_rebar:compile(RebarConf, BossConf, AppFile),
boss_rebar:boss_load(BossConf, AppFile),
- boss_rebar:boss_start(BossConf),
+ % boss_rebar:boss_start(BossConf),
AppName = app_name(AppFile),
boss_web_test:start([atom_to_list(AppName)]).
@@ -295,7 +295,8 @@ boss_load(BossConf, AppFile) ->
%% Fix starting mimetypes app in boss.erl->ensure_started(mimetypes)
%% mimetyps.app not found, adding deps/*/ebin don't work
BossPath = boss_config_value(BossConf, boss, path),
- code:add_path(BossPath++"/deps/mimetypes/ebin").
+ code:add_path(BossPath++"/deps/mimetypes/ebin"),
+ code:add_path(BossPath++"/deps/lager/ebin").
%%--------------------------------------------------------------------
%% @doc Start the boss app
@@ -303,7 +304,7 @@ boss_load(BossConf, AppFile) ->
%% @end
%%--------------------------------------------------------------------
boss_start(_BossConf) ->
- io:format("Starting boss and waiting all apps to initilize...~n"),
+ io:format("Starting boss and waiting for all apps to initialize...~n"),
ok = boss:start(),
BossApps = boss_env:get_env(applications, []),
timer:sleep(50),
View
2  skel/src/project.app.src
@@ -3,6 +3,6 @@
{vsn, "0.0.1"},
{modules, []},
{registered, []},
- {applications, [kernel, stdlib, crypto, boss]},
+ {applications, [kernel, stdlib, crypto]},
{env, []}
]}.
View
9 src/boss/boss_web_test.erl
@@ -18,9 +18,10 @@ bootstrap_test_env(Application, Adapter) ->
_ -> Acc
end
end, [], [db_port, db_host, db_username, db_password, db_database]),
- %ok = application:start(Application),
+ ok = application:start(Application),
+ ControllerList = boss_files:web_controller_list(Application),
{ok, RouterSupPid} = boss_router:start([{application, Application},
- {controllers, boss_files:web_controller_list(Application)}]),
+ {controllers, ControllerList}]),
boss_db:start([{adapter, Adapter}|DBOptions]),
boss_session:start(),
boss_mq:start(),
@@ -46,7 +47,7 @@ run_tests([Application, Adapter|TestList]) ->
AppInfo = bootstrap_test_env(list_to_atom(Application), list_to_atom(Adapter)),
Pid = erlang:spawn(fun() -> app_info_loop(AppInfo) end),
register(app_info, Pid),
- io:format("~p~n", [TestList]),
+ io:format("Found tests: ~p~n", [TestList]),
lists:map(fun(TestModule) ->
TestModuleAtom = list_to_atom(TestModule),
io:format("~nRunning: ~p~n", [TestModule]),
@@ -384,7 +385,7 @@ receive_response(RequesterPid, Assertions, Continuations) ->
end.
parse([], Body) ->
- mochiweb_html:parse(Body);
+ mochiweb_html:parse([<<"<html>">>, Body, <<"</html>">>]);
parse([Head|Tail], Body) ->
case Head of
{"Content-Type", "application/json"} -> mochijson2:decode(Body);
Please sign in to comment.
Something went wrong with that request. Please try again.