livebook/test/support/teams_integration_case.ex

35 lines
680 B
Elixir
Raw Normal View History

2023-05-17 00:21:49 +08:00
defmodule Livebook.TeamsIntegrationCase do
use ExUnit.CaseTemplate
alias Livebook.TeamsServer
using do
quote do
use Livebook.DataCase
use LivebookWeb.ConnCase
@moduletag :teams_integration
alias Livebook.TeamsServer
import Livebook.HubHelpers
2023-05-17 00:21:49 +08:00
end
end
setup_all do
case TeamsServer.start() do
{:ok, _} -> :ok
{:error, {:already_started, _}} -> :ok
end
token = TeamsServer.token()
url = TeamsServer.url()
user = TeamsServer.user()
node = TeamsServer.get_node()
Application.put_env(:livebook, :teams_url, url, persistent: true)
{:ok, node: node, token: token, user: user}
end
end