aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorLoïc Hoguin <[email protected]>2020-02-10 11:22:58 +0100
committerLoïc Hoguin <[email protected]>2020-02-10 13:59:43 +0100
commit4ffe0c99114ab7049aa19a3a2c33d662e7cf311d (patch)
treeb1065ebcf8ff140c1d82f3ff92aafaf26e0fc033 /test
parent864f84253886fb62072e0da64565f99b32a49bce (diff)
downloadranch-4ffe0c99114ab7049aa19a3a2c33d662e7cf311d.tar.gz
ranch-4ffe0c99114ab7049aa19a3a2c33d662e7cf311d.tar.bz2
ranch-4ffe0c99114ab7049aa19a3a2c33d662e7cf311d.zip
Properly update supervisors in the appup
Also fix the downgrade in the test suite.
Diffstat (limited to 'test')
-rw-r--r--test/upgrade_SUITE.erl15
1 files changed, 11 insertions, 4 deletions
diff --git a/test/upgrade_SUITE.erl b/test/upgrade_SUITE.erl
index 71b1000..a278aa7 100644
--- a/test/upgrade_SUITE.erl
+++ b/test/upgrade_SUITE.erl
@@ -60,13 +60,20 @@ do_get_paths(Example0) ->
Log = Dir ++ "/_rel/" ++ Example ++ "_example/log/erlang.log.1",
{Dir, Rel, Log}.
-do_compile_and_start(Example, Config) ->
+do_compile_and_start(Example) ->
Make = do_find_make_cmd(),
{Dir, Rel, _} = do_get_paths(Example),
ct:log("~s~n", [os:cmd(Make ++ " -C " ++ Dir ++ " distclean")]),
%% TERM=dumb disables relx coloring.
ct:log("~s~n", [os:cmd(Make ++ " -C " ++ Dir ++ " TERM=dumb")]),
- %% @todo Should move the "1" tarball in the correct directory to avoid a warning on downgrade?
+ %% For some reason the release has ExampleStr.boot
+ %% while the downgrade expects start.boot?
+ ExampleStr = atom_to_list(Example),
+ ct:log("~s~n", [os:cmd("cp "
+ ++ Dir ++ "/_rel/" ++ ExampleStr
+ ++ "_example/releases/1/" ++ ExampleStr ++ "_example.boot "
+ ++ Dir ++ "/_rel/" ++ ExampleStr
+ ++ "_example/releases/1/start.boot")]),
ct:log("~s~n", [os:cmd(Rel ++ " stop")]),
ct:log("~s~n", [os:cmd(Rel ++ " start")]),
timer:sleep(2000),
@@ -156,13 +163,13 @@ do_downgrade(Example) ->
%% Tests.
-upgrade_ranch_one_conn(Config) ->
+upgrade_ranch_one_conn(_) ->
Example = tcp_echo,
Port = 5555,
try
%% Build and start the example release using the previous Ranch version.
CommitOrTag = do_use_ranch_previous(Example),
- do_compile_and_start(Example, Config),
+ do_compile_and_start(Example),
%% Establish a connection and check that it works.
{ok, S} = gen_tcp:connect("localhost", Port, [{active, false}, binary]),
ok = gen_tcp:send(S, "Hello!"),