Skip to content

Commit cc04bb0

Browse files
Update tests with new boot script example path
1 parent 34e78fd commit cc04bb0

File tree

4 files changed

+12
-9
lines changed

4 files changed

+12
-9
lines changed

example/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@
33
```
44
mix deps.get
55
mix release
6-
_build/dev/rel/example/bin/example console_boot shoehorn
6+
_build/dev/rel/example/bin/example console_boot `pwd`/_build/dev/rel/example/bin/shoehorn
77
iex> Application.stop(:example)
88
```

example/mix.lock

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
%{
2-
"distillery": {:hex, :distillery, "1.5.2", "eec18b2d37b55b0bcb670cf2bcf64228ed38ce8b046bb30a9b636a6f5a4c0080", [:mix], [], "hexpm"},
2+
"artificery": {:hex, :artificery, "0.2.6", "f602909757263f7897130cbd006b0e40514a541b148d366ad65b89236b93497a", [:mix], [], "hexpm"},
3+
"distillery": {:hex, :distillery, "2.0.2", "58e15f6708e355b610a48356ef170e63ec7753e35e215b107e1e87ed79c65170", [:mix], [{:artificery, "~> 0.2", [hex: :artificery, repo: "hexpm", optional: false]}], "hexpm"},
34
}

lib/shoehorn.ex

+1-1
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ defmodule Shoehorn do
139139
Shell.info("""
140140
Generated Shoehorn Boot Script
141141
Run using shoehorn:
142-
Interactive: #{relative_output_dir}/bin/#{app} console_boot shoehorn
142+
Interactive: #{relative_output_dir}/bin/#{app} console_boot #{relative_output_dir}/bin/shoehorn
143143
""")
144144
end
145145

test/shoehorn_test.exs

+8-6
Original file line numberDiff line numberDiff line change
@@ -43,22 +43,23 @@ defmodule ShoehornTest do
4343
assert {:ok, _output} = r
4444

4545
app_path = Path.join([@simple_app_path, "_build/prod/rel/simple_app/bin/simple_app"])
46-
46+
boot_file = Path.join([@simple_app_path, "_build/prod/rel/simple_app/bin/shoehorn"])
4747
{:ok, _task} =
4848
Task.start(fn ->
49-
System.cmd(app_path, ["console_boot", "shoehorn"])
49+
System.cmd(app_path, ["console_boot", boot_file])
5050
end)
5151

52-
:timer.sleep(1000)
52+
:timer.sleep(2000)
5353
assert {"pong\n", 0} = System.cmd(app_path, ["ping"])
5454

5555
assert {applications, 0} =
56-
System.cmd(app_path, ["eval", "'Elixir.Application':started_applications()"])
56+
System.cmd(app_path, ["rpc", "Application.started_applications()"])
5757

5858
assert applications =~ "shoehorn"
5959
assert applications =~ "simple_app"
6060

6161
System.cmd(app_path, ["stop"])
62+
:timer.sleep(1000)
6263
end
6364
end
6465

@@ -93,13 +94,14 @@ defmodule ShoehornTest do
9394

9495
assert {app_controller_pid, 0} =
9596
System.cmd(app_path, [
96-
"eval",
97-
"'Elixir.Process':whereis('Elixir.Shoehorn.ApplicationController')"
97+
"rpc",
98+
"Process.whereis(Shoehorn.ApplicationController)"
9899
])
99100

100101
assert app_controller_pid == "nil\n"
101102

102103
System.cmd(app_path, ["stop"])
104+
:timer.sleep(1000)
103105
end
104106
end
105107
end

0 commit comments

Comments
 (0)