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 Oct 12, 2023
1 parent 40e09b8 commit c8d83b6
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion lib/cove.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
require_relative "cove/role"
require_relative "cove/deployment"
require_relative "cove/instance"
require_relative "cove/instance_on_demand"
require_relative "cove/on_demand_instance"
require_relative "cove/entity_labels"
require_relative "cove/environment_file"
require_relative "cove/configuration"
Expand Down
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 c8d83b6

Please sign in to comment.