#!/usr/bin/env ruby
# frozen_string_literal: true

puts ARGV.join(" ")
require 'bundler/setup'

$LOAD_PATH.unshift(File.expand_path('../lib', __dir__))
require_relative '../cluster/test/support/orchestrator'

urls = ARGV.map { |host_port| "redis://#{host_port}" }
orchestrator = ClusterOrchestrator.new(urls, timeout: 3.0)
orchestrator.rebuild
orchestrator.close
