mirror of
https://github.com/livebook-dev/livebook.git
synced 2024-09-20 10:05:57 +08:00
Skip update check in tests (#2593)
This commit is contained in:
parent
2348214f19
commit
4f7826fd77
|
@ -44,7 +44,7 @@ defmodule Livebook.UpdateCheck do
|
||||||
@impl true
|
@impl true
|
||||||
def init({}) do
|
def init({}) do
|
||||||
state = %{
|
state = %{
|
||||||
enabled: Livebook.Settings.update_check_enabled?(),
|
enabled: update_check_enabled?(),
|
||||||
new_version: nil,
|
new_version: nil,
|
||||||
timer_ref: nil,
|
timer_ref: nil,
|
||||||
request_ref: nil
|
request_ref: nil
|
||||||
|
@ -102,6 +102,12 @@ defmodule Livebook.UpdateCheck do
|
||||||
|
|
||||||
def handle_info(_msg, state), do: {:noreply, state}
|
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(%{enabled: false} = state, _time), do: state
|
||||||
|
|
||||||
defp schedule_check(state, time) do
|
defp schedule_check(state, time) do
|
||||||
|
|
Loading…
Reference in a new issue