diff --git a/test/support/integration/teams_server.ex b/test/support/integration/teams_server.ex index 0ee5930a8..fb3214ecb 100644 --- a/test/support/integration/teams_server.ex +++ b/test/support/integration/teams_server.ex @@ -12,6 +12,12 @@ defmodule Livebook.TeamsServer do System.get_env("TEAMS_PATH") != nil or File.exists?(@default_teams_dir) end + def setup do + if available?() do + mix(%{"MIX_ENV" => "livebook"}, ["compile"]) + end + end + def start(opts \\ []) do GenServer.start(__MODULE__, opts, name: @name) end @@ -32,13 +38,6 @@ defmodule Livebook.TeamsServer do GenServer.call(@name, :fetch_node, @timeout) end - def drop_database() do - app_port = GenServer.call(@name, :fetch_port) - state_env = GenServer.call(@name, :fetch_env) - - app_port |> env(state_env) |> mix(["ecto.drop", "--quiet"]) - end - # GenServer Callbacks @impl true diff --git a/test/test_helper.exs b/test/test_helper.exs index 068a3d709..bc0ad40a9 100644 --- a/test/test_helper.exs +++ b/test/test_helper.exs @@ -50,6 +50,9 @@ Livebook.Hubs.Personal.update_hub(personal_hub, %{secret_key: secret_key}) # Always set the same offline team hub in tests Livebook.HubHelpers.set_offline_hub() +# Compile anything pending on TeamsServer +Livebook.TeamsServer.setup() + erl_docs_available? = Code.fetch_docs(:gen_server) != {:error, :chunk_not_found} windows? = match?({:win32, _}, :os.type())