foreman_remote_execution 0.3.1 → 0.3.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 9b67393920eea010c57e8994ea08e08b39ac660d
4
- data.tar.gz: 5d99f91e886a5c512faced47136702fb4660977c
3
+ metadata.gz: fbd4cc854e9c31820b3dc2a1f9003613c5aa5ca1
4
+ data.tar.gz: 3f6b42cc33bac2022990315ed31d29fd537a5df9
5
5
  SHA512:
6
- metadata.gz: f72a2ec071b11e5de82585ecaf63371d267215074d1e246bf2d2b29da086d09075b243a798689b1b54a92adf748726b753c7e3c6dd0c4a2a5c2ae795a5dcae9c
7
- data.tar.gz: 7290328eb26ea95a4fb882a6f8d1258dc51052e289098105c6e261be6203cb06d8254c2eb223640ec30fa8cc6b1359b6dc99f18ab9f5468a7b642c7b209e00f3
6
+ metadata.gz: 7bdbfca1932005c1d8fe09c9a72adb2b72bedd9455a9a6bed8e53fd3fa750dbf659920a6f443503007ac529da9136a5bbee8964fa9271123227e7f501d3ff31e
7
+ data.tar.gz: 8f7d084a004c1c8b0705e2f37625801090cfb789990a14ce50613781e21e72c9be595f14e0c05a3cb915d70d68fd94966bc5ff9bea80cd13bb58c807fdba56c4
@@ -1,7 +1,7 @@
1
1
  class RemoteExecutionFeature < ActiveRecord::Base
2
2
  attr_accessible :label, :name, :provided_input_names, :description, :job_template_id
3
3
 
4
- validate :label, :name, :presence => true, :unique => true
4
+ validates :label, :name, :presence => true, :uniqueness => true
5
5
 
6
6
  belongs_to :job_template
7
7
 
@@ -1,6 +1,6 @@
1
1
  class AddJobTemplateToTemplate < ActiveRecord::Migration
2
2
  def change
3
- add_column :templates, :job_name, :string
4
- add_column :templates, :provider_type, :string
3
+ add_column :templates, :job_name, :string, :limit => 255
4
+ add_column :templates, :provider_type, :string, :limit => 255
5
5
  end
6
6
  end
@@ -1,13 +1,13 @@
1
1
  class CreateTemplateInput < ActiveRecord::Migration
2
2
  def change
3
3
  create_table :template_inputs do |t|
4
- t.string :name, :null => false
4
+ t.string :name, :null => false, :limit => 255
5
5
  t.boolean :required, :null => false, :default => false
6
- t.string :input_type, :null => false
7
- t.string :fact_name
8
- t.string :variable_name
9
- t.string :puppet_class_name
10
- t.string :puppet_parameter_name
6
+ t.string :input_type, :null => false, :limit => 255
7
+ t.string :fact_name, :limit => 255
8
+ t.string :variable_name, :limit => 255
9
+ t.string :puppet_class_name, :limit => 255
10
+ t.string :puppet_parameter_name, :limit => 255
11
11
  t.text :description
12
12
  t.integer :template_id
13
13
 
@@ -1,10 +1,10 @@
1
1
  class AddTargeting < ActiveRecord::Migration
2
2
  def change
3
3
  create_table :targetings do |t|
4
- t.string :search_query
4
+ t.string :search_query, :limit => 255
5
5
  t.references :bookmark
6
6
  t.references :user
7
- t.string :targeting_type, :null => false
7
+ t.string :targeting_type, :null => false, :limit => 255
8
8
  t.timestamps
9
9
  end
10
10
 
@@ -2,7 +2,7 @@ class AddInvocation< ActiveRecord::Migration
2
2
  def change
3
3
  create_table :job_invocations do |t|
4
4
  t.references :targeting, :null => false
5
- t.string :job_name, :null => false
5
+ t.string :job_name, :null => false, :limit => 255
6
6
  end
7
7
 
8
8
  add_index :job_invocations, [:targeting_id], :name => 'job_invocations_targeting_id'
@@ -12,7 +12,7 @@ class AddTemplateInvocation < ActiveRecord::Migration
12
12
  create_table :template_invocation_input_values do |t|
13
13
  t.references :template_invocation, :null => false
14
14
  t.references :template_input, :null => false
15
- t.string :value, :null => false
15
+ t.string :value, :null => false, :limit => 255
16
16
  end
17
17
 
18
18
  add_index :template_invocation_input_values, [:template_invocation_id, :template_input_id], :name => 'template_invocation_input_values_ti_ti_ids'
@@ -1,6 +1,6 @@
1
1
  class AddLastTaskIdToJobInvocation < ActiveRecord::Migration
2
2
  def change
3
- add_column :job_invocations, :last_task_id, :string
3
+ add_column :job_invocations, :last_task_id, :string, :limit => 255
4
4
  add_index :job_invocations, [:last_task_id], :name => 'job_invocations_last_task_id'
5
5
  end
6
6
  end
@@ -3,7 +3,7 @@ class CreateTargetRemoteExecutionProxies < ActiveRecord::Migration
3
3
  create_table :target_remote_execution_proxies do |t|
4
4
  t.integer :remote_execution_proxy_id
5
5
  t.integer :target_id
6
- t.string :target_type
6
+ t.string :target_type, :limit => 255
7
7
 
8
8
  t.timestamps
9
9
  end
@@ -1,5 +1,5 @@
1
1
  class AddEffectiveUserToTemplateInvocation < ActiveRecord::Migration
2
2
  def change
3
- add_column :template_invocations, :effective_user, :string
3
+ add_column :template_invocations, :effective_user, :string, :limit => 255
4
4
  end
5
5
  end
@@ -2,7 +2,7 @@ class CreateJobTemplateEffectiveUsers < ActiveRecord::Migration
2
2
  def change
3
3
  create_table :job_template_effective_users do |t|
4
4
  t.integer :job_template_id
5
- t.string :value
5
+ t.string :value, :limit => 255
6
6
  t.boolean :overridable
7
7
  t.boolean :current_user
8
8
  end
@@ -1,7 +1,7 @@
1
1
  class AddDescriptionToJobInvocation < ActiveRecord::Migration
2
2
  def up
3
- add_column :job_invocations, :description, :string
4
- add_column :templates, :description_format, :string
3
+ add_column :job_invocations, :description, :string, :limit => 255
4
+ add_column :templates, :description_format, :string, :limit => 255
5
5
  end
6
6
 
7
7
  def down
@@ -1,9 +1,9 @@
1
1
  class MakeJobNameDefaultToSomething < ActiveRecord::Migration
2
2
  def up
3
- change_column :templates, :job_name, :string, :default => 'Miscellaneous'
3
+ change_column :templates, :job_name, :string, :default => 'Miscellaneous', :limit => 255
4
4
  end
5
5
 
6
6
  def down
7
- change_column :templates, :job_name, :string, :default => nil
7
+ change_column :templates, :job_name, :string, :default => nil, :limit => 255
8
8
  end
9
9
  end
@@ -1,6 +1,6 @@
1
1
  class AddRunHostJobTaskIdToTemplateInvocation < ActiveRecord::Migration
2
2
  def change
3
- add_column :template_invocations, :run_host_job_task_id, :string
3
+ add_column :template_invocations, :run_host_job_task_id, :string, :limit => 255
4
4
  add_index :template_invocations, [:run_host_job_task_id], :name => 'template_invocations_run_host_job_task_id'
5
5
  end
6
6
  end
@@ -1,14 +1,12 @@
1
1
  class CreateRemoteExecutionFeatures < ActiveRecord::Migration
2
2
  def change
3
3
  create_table :remote_execution_features do |t|
4
- t.string :label, :index => true, :null => false
5
- t.string :name, :null => false
6
- t.string :description
4
+ t.string :label, :index => true, :null => false, :limit => 255
5
+ t.string :name, :null => false, :limit => 255
6
+ t.string :description, :limit => 255
7
7
  t.text :provided_inputs
8
- t.integer :job_template_id
8
+ t.integer :job_template_id, :index => true
9
9
  end
10
- add_index :remote_execution_features, :label
11
- add_index :remote_execution_features, :job_template_id
12
10
  add_foreign_key :remote_execution_features, :templates, :column => :job_template_id
13
11
  end
14
12
  end
@@ -1,3 +1,3 @@
1
1
  module ForemanRemoteExecution
2
- VERSION = '0.3.1'
2
+ VERSION = '0.3.2'
3
3
  end
@@ -36,14 +36,9 @@ namespace :foreman_remote_execution do
36
36
  end
37
37
  end
38
38
 
39
- Rake::Task[:test].enhance do
40
- Rake::Task['test:foreman_remote_execution'].invoke
41
- end
39
+ Rake::Task[:test].enhance ['test:foreman_remote_execution']
42
40
 
43
41
  load 'tasks/jenkins.rake'
44
42
  if Rake::Task.task_defined?(:'jenkins:unit')
45
- Rake::Task['jenkins:unit'].enhance do
46
- Rake::Task['test:foreman_remote_execution'].invoke
47
- Rake::Task['foreman_remote_execution:rubocop'].invoke
48
- end
43
+ Rake::Task['jenkins:unit'].enhance ['test:foreman_remote_execution', 'foreman_remote_execution:rubocop']
49
44
  end
@@ -66,6 +66,7 @@ FactoryGirl.modify do
66
66
  factory :smart_proxy do
67
67
  trait :ssh do
68
68
  features { [FactoryGirl.build(:feature, :ssh)] }
69
+ pubkey 'ssh-rsa AAAAB3N...'
69
70
  end
70
71
  end
71
72
 
@@ -1,6 +1,6 @@
1
1
  # This calls the main test_helper in Foreman-core
2
2
  require 'test_helper'
3
-
3
+ require 'database_cleaner'
4
4
  require 'dynflow/testing'
5
5
 
6
6
  # Add plugin to FactoryGirl's paths
@@ -3,7 +3,7 @@ require 'test_plugin_helper'
3
3
  describe HostStatus::ExecutionStatus::ExecutionTaskStatusMapper do
4
4
 
5
5
  describe '.sql_conditions_for(status)' do
6
- subject { HostStatus::ExecutionStatus::ExecutionTaskStatusMapper }
6
+ let(:subject) { HostStatus::ExecutionStatus::ExecutionTaskStatusMapper }
7
7
 
8
8
  it 'accepts status number as well as string representation' do
9
9
  subject.sql_conditions_for(HostStatus::ExecutionStatus::ERROR).must_equal subject.sql_conditions_for('failed')
@@ -18,7 +18,7 @@ describe HostStatus::ExecutionStatus::ExecutionTaskStatusMapper do
18
18
  let(:mapper) { HostStatus::ExecutionStatus::ExecutionTaskStatusMapper.new(task) }
19
19
 
20
20
  describe '#status' do
21
- subject { mapper }
21
+ let(:subject) { mapper }
22
22
 
23
23
  describe 'is queued' do
24
24
  context 'when there is no task' do
@@ -65,7 +65,7 @@ describe HostStatus::ExecutionStatus::ExecutionTaskStatusMapper do
65
65
  end
66
66
 
67
67
  describe '#status_label' do
68
- subject { mapper.status_label }
68
+ let(:subject) { mapper.status_label }
69
69
 
70
70
  context 'status is OK' do
71
71
  before do
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: foreman_remote_execution
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.1
4
+ version: 0.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Foreman Remote Execution team
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-04-27 00:00:00.000000000 Z
11
+ date: 2016-04-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: deface