Preserva drain/offline su home e genera slate offline nel cloud-init.
Evita che ensure_home_from_env! annulli il drain a ogni allocate, e prepara /slates/offline.mp4 sul nodo Cloud per create_path MediaMTX. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -39,6 +39,16 @@ RSpec.describe Streams::NodeRegistry do
|
||||
end
|
||||
end
|
||||
|
||||
it "does not reset home drain/offline/error status on ensure" do
|
||||
with_env(home_env) do
|
||||
home = described_class.ensure_home_from_env!
|
||||
home.update!(status: "draining")
|
||||
|
||||
expect(described_class.ensure_home_from_env!.status).to eq("draining")
|
||||
expect { described_class.allocate! }.to raise_error(Streams::NodeRegistry::NoCapacityError)
|
||||
end
|
||||
end
|
||||
|
||||
it "allocates the least loaded ready node" do
|
||||
with_env(home_env) do
|
||||
home = described_class.ensure_home_from_env!
|
||||
|
||||
Reference in New Issue
Block a user