Skip to content

Commit

Permalink
Rename InstanceOnDemand to OnDemandInstance
Browse files Browse the repository at this point in the history
  • Loading branch information
sarahloui committed Jan 13, 2024
1 parent 4f41cde commit b5d1c7b
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/cove/invocation/service_run.rb
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def initialize(registry:, service:, custom_cmd:, role:, host:)
def invoke
Cove.output.puts "service: #{service.name}, role: #{role.name}, host: #{host.name}, commands: #{custom_cmd}."
deployment = Cove::Deployment.new(role)
instance_on_demand = Cove::InstanceOnDemand.new(deployment, custom_cmd)
instance_on_demand = Cove::OnDemandInstance.new(deployment, custom_cmd)
desired_container = Cove::DesiredContainer.from(instance_on_demand)

create_cmd = create_cmd(desired_container)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module Cove
class InstanceOnDemand
class OnDemandInstance
# @return [Cove::Deployment]
attr_reader :deployment
# @return [Integer]
Expand Down
2 changes: 1 addition & 1 deletion spec/cove/invocation/service_run_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
custom_cmd = ["echo", "hello"]
registry, service, role, host = setup_environment(service_name: "test", role_name: "web", image: "app:latest", command: ["ping", "8.8.8.8"], ports: [{"type" => "port", "source" => 8080, "target" => 80}], mounts: [{"type" => "volume", "source" => "my-volume", "target" => "/data"}])
deployment = Cove::Deployment.new(role)
instance_on_demand = Cove::InstanceOnDemand.new(deployment, custom_cmd)
instance_on_demand = Cove::OnDemandInstance.new(deployment, custom_cmd)
allow(SecureRandom).to receive(:hex).with(3).and_return("abc123")

stubs = []
Expand Down

0 comments on commit b5d1c7b

Please sign in to comment.