-
Notifications
You must be signed in to change notification settings - Fork 266
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update FarmbotCeleryScriptTest to use Mimic
- Loading branch information
1 parent
f3f8316
commit 2f7685c
Showing
7 changed files
with
25 additions
and
328 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,4 @@ | ||
use Mix.Config | ||
|
||
if Mix.env() == :test do | ||
config :farmbot_celery_script, FarmbotCeleryScript.SysCalls, | ||
sys_calls: Farmbot.TestSupport.CeleryScript.TestSysCalls | ||
else | ||
config :farmbot_celery_script, FarmbotCeleryScript.SysCalls, | ||
sys_calls: FarmbotCeleryScript.SysCalls.Stubs | ||
end | ||
config :farmbot_celery_script, FarmbotCeleryScript.SysCalls, | ||
sys_calls: FarmbotCeleryScript.SysCalls.Stubs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
Application.ensure_all_started(:mimic) | ||
Mimic.copy(FarmbotCeleryScript.SysCalls.Stubs) | ||
ExUnit.start() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,12 @@ | ||
timeout = System.get_env("EXUNIT_TIMEOUT") | ||
|
||
Mimic.copy(FarmbotCore.Asset.Query) | ||
Mimic.copy(FarmbotExt.API) | ||
Mimic.copy(FarmbotExt.AMQP.ConnectionWorker) | ||
Mimic.copy(FarmbotCeleryScript.SysCalls.Stubs) | ||
|
||
if timeout do | ||
ExUnit.start(assert_receive_timeout: String.to_integer(timeout)) | ||
else | ||
ExUnit.start() | ||
end | ||
|
||
Mimic.copy(FarmbotCore.Asset.Query) | ||
Mimic.copy(FarmbotExt.API) | ||
Mimic.copy(FarmbotExt.AMQP.ConnectionWorker) |
Oops, something went wrong.