mirror of
https://github.com/livebook-dev/livebook.git
synced 2025-12-10 21:58:29 +08:00
Skip update check in tests (#2593)
This commit is contained in:
parent
2348214f19
commit
4f7826fd77
1 changed files with 7 additions and 1 deletions
|
|
@ -44,7 +44,7 @@ defmodule Livebook.UpdateCheck do
|
|||
@impl true
|
||||
def init({}) do
|
||||
state = %{
|
||||
enabled: Livebook.Settings.update_check_enabled?(),
|
||||
enabled: update_check_enabled?(),
|
||||
new_version: nil,
|
||||
timer_ref: nil,
|
||||
request_ref: nil
|
||||
|
|
@ -102,6 +102,12 @@ defmodule Livebook.UpdateCheck do
|
|||
|
||||
def handle_info(_msg, state), do: {:noreply, state}
|
||||
|
||||
if Mix.env() == :test do
|
||||
defp update_check_enabled?(), do: false
|
||||
else
|
||||
defp update_check_enabled?(), do: Livebook.Settings.update_check_enabled?()
|
||||
end
|
||||
|
||||
defp schedule_check(%{enabled: false} = state, _time), do: state
|
||||
|
||||
defp schedule_check(state, time) do
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue