Deployment and lifecycle management for Nix
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

fix: update test assertions to match current behavior

- BuildTest: nix error changed from "No such file or directory" to "does not exist"
- PageControllerTest: Sign In is now a <.button> component, not raw CSS classes
- OrchestrationTest: process_deployment returns {ok, request_id} not a 3-tuple with task

Fixes #321, #322, #323

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

+8 -12
+1 -1
apps/nix/test/nix/build_test.exs
··· 34 34 assert build.store_path == nil 35 35 log = Enum.join(build.log, "\n") 36 36 assert String.contains?(log, "error") 37 - assert String.contains?(log, "No such file or directory") 37 + assert String.contains?(log, "does not exist") 38 38 end) 39 39 end 40 40
+5 -8
apps/sower/test/sower/orchestration_test.exs
··· 904 904 describe "handle_deployment_request/2" do 905 905 import Sower.OrchestrationFixtures 906 906 907 + @tag :capture_log 907 908 test "returns immediate request_id for valid deployment request", %{organization: _org} do 908 909 agent = agent_fixture() 909 910 _seed = seed_fixture(%{name: "testhost", seed_type: "nixos"}) ··· 922 923 "force" => false 923 924 } 924 925 925 - assert {:ok, request_id, task} = Orchestration.handle_deployment_request(payload, agent) 926 + assert {:ok, request_id} = Orchestration.handle_deployment_request(payload, agent) 926 927 assert is_binary(request_id) 927 - Task.await(task) 928 928 end 929 929 930 930 test "returns error for deployment request with unauthorized subscription", %{ ··· 952 952 assert result == {:error, :unauthorized} 953 953 end 954 954 955 + @tag :capture_log 955 956 test "process_deployment returns request_id and starts async task", %{organization: _org} do 956 957 agent = agent_fixture() 957 958 _seed = seed_fixture(%{name: "testhost", seed_type: "nixos"}) ··· 965 966 966 967 request_id = "dr_test_#{System.unique_integer([:positive])}" 967 968 968 - assert {:ok, ^request_id, task} = 969 + assert {:ok, ^request_id} = 969 970 Orchestration.process_deployment(request_id, [subscription], agent) 970 - 971 - Task.await(task) 972 971 end 973 972 974 973 @tag :capture_log ··· 985 984 986 985 request_id = "dr_test_error_#{System.unique_integer([:positive])}" 987 986 988 - assert {:ok, ^request_id, task} = 987 + assert {:ok, ^request_id} = 989 988 Orchestration.process_deployment(request_id, [subscription], agent) 990 - 991 - Task.await(task) 992 989 end 993 990 end 994 991
+2 -3
apps/sower/test/sower_web/controllers/page_controller_test.exs
··· 14 14 assert html =~ ~s(href="/deployments") 15 15 end 16 16 17 - test "home keeps sign in action on one line", %{conn: conn} do 17 + test "home renders sign in as a button", %{conn: conn} do 18 18 conn = get(conn, ~p"/") 19 19 html = html_response(conn, 200) 20 20 21 21 assert html =~ "Sign In" 22 - assert html =~ "whitespace-nowrap" 23 - assert html =~ "shrink-0" 22 + assert html =~ "<button" 24 23 end 25 24 26 25 test "mobile dropdown styles include open and closed states" do