Skip to content

Commit

Permalink
Use unique node name
Browse files Browse the repository at this point in the history
  • Loading branch information
zacksiri committed Sep 12, 2024
1 parent c55c9ef commit be65347
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions test/uplink/packages/instance/placement_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,9 @@ defmodule Uplink.Packages.Instance.PlacementTest do
test "fallback to auto when no availability", %{
bypass: bypass,
existing_instances: existing_instances,
cluster_members: cluster_members,
node_name: node_name
cluster_members: cluster_members
} do
placement_name = Placement.name(node_name)

Uplink.Cache.delete({:available_nodes, placement_name})
placement_name = Placement.name("instellar-0e89ea876-02")

Bypass.expect_once(bypass, "GET", "/1.0/instances", fn conn ->
assert %{"recursion" => "1", "all-projects" => _} = conn.query_params
Expand All @@ -61,7 +58,7 @@ defmodule Uplink.Packages.Instance.PlacementTest do
|> Plug.Conn.resp(200, existing_instances)
end)

Bypass.stub(bypass, "GET", "/1.0/cluster/members", fn conn ->
Bypass.expect_once(bypass, "GET", "/1.0/cluster/members", fn conn ->
conn
|> Plug.Conn.put_resp_header("content-type", "application/json")
|> Plug.Conn.resp(200, cluster_members)
Expand Down

0 comments on commit be65347

Please sign in to comment.