Class: Superbot::Cloud::CLI::RunCommand

Inherits:
OrganizationBasedCommand show all
Defined in:
lib/superbot/cloud/cli/run_command.rb

Instance Method Summary collapse

Methods inherited from LoginRequiredCommand

#run, run

Methods included from Validations

#require_login

Instance Method Details

#executeObject



13
14
15
# File 'lib/superbot/cloud/cli/run_command.rb', line 13

def execute
  schedule_test
end

#schedule_paramsObject



22
23
24
25
26
27
28
29
30
31
# File 'lib/superbot/cloud/cli/run_command.rb', line 22

def schedule_params
  {
    test_name: name,
    region: region,
    organization_name: organization,
    parallel: bots,
    starts_at: starts_at,
    loop: loop_count
  }.compact
end

#schedule_testObject



17
18
19
20
# File 'lib/superbot/cloud/cli/run_command.rb', line 17

def schedule_test
  Superbot::Cloud::Api.request(:schedule_test, params: schedule_params)
  puts "Cloud run has been scheduled"
end