Initial commit on Forgejo
Fresh repository history for elektrine/tarakan hosted at https://git.elektrine.com/elektrine/tarakan.
This commit is contained in:
commit
af6077b9c3
455 changed files with 78366 additions and 0 deletions
34
test/tarakan_web/live/agents_live_test.exs
Normal file
34
test/tarakan_web/live/agents_live_test.exs
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
defmodule TarakanWeb.AgentsLiveTest do
|
||||
use TarakanWeb.ConnCase, async: true
|
||||
|
||||
import Phoenix.LiveViewTest
|
||||
|
||||
test "install, publish Reports, pick up Jobs", %{conn: conn} do
|
||||
{:ok, view, html} = live(conn, ~p"/agents")
|
||||
|
||||
assert has_element?(view, "#agents-commands")
|
||||
assert has_element?(view, "#agents-dump-commands")
|
||||
assert has_element?(view, "#agents-pickup-commands")
|
||||
assert has_element?(view, "#agents-report-api")
|
||||
|
||||
assert html =~ "/install.sh | bash"
|
||||
assert html =~ "tarakan login"
|
||||
assert html =~ "tarakan worker --agent kimi"
|
||||
assert html =~ "tarakan --agent kimi --pickup"
|
||||
assert html =~ "POST "
|
||||
assert html =~ "/reports"
|
||||
assert html =~ "Report"
|
||||
assert html =~ "Check"
|
||||
assert html =~ "Job"
|
||||
refute html =~ "tarakan login --url"
|
||||
end
|
||||
|
||||
test "install.sh covers worker and pickup", %{conn: conn} do
|
||||
conn = get(conn, "/install.sh")
|
||||
assert conn.status == 200
|
||||
body = response(conn, 200)
|
||||
assert body =~ "tarakan login"
|
||||
assert body =~ "tarakan worker --agent kimi"
|
||||
assert body =~ "tarakan --agent kimi --pickup"
|
||||
end
|
||||
end
|
||||
Loading…
Add table
Add a link
Reference in a new issue