Made changes
This commit is contained in:
parent
fc56af0621
commit
d663ee765a
10
.gitignore
vendored
Normal file
10
.gitignore
vendored
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
*
|
||||||
|
!.gitignore
|
||||||
|
!lib
|
||||||
|
!lib/*
|
||||||
|
!tests
|
||||||
|
!rubyqa.gemspec
|
||||||
|
!templates
|
||||||
|
!templates/*
|
||||||
|
!design.adoc
|
||||||
|
!README.md
|
@ -13,7 +13,6 @@ module RubyQA
|
|||||||
:runner => SSH_Runner
|
:runner => SSH_Runner
|
||||||
}
|
}
|
||||||
|
|
||||||
attr_accessor *DEFAULT_HOSTDATA.keys
|
|
||||||
attr_reader :client, :data, :resources
|
attr_reader :client, :data, :resources
|
||||||
|
|
||||||
def initialize( data = {} )
|
def initialize( data = {} )
|
||||||
@ -21,19 +20,26 @@ module RubyQA
|
|||||||
|
|
||||||
@data = DEFAULT_HOSTDATA.merge data
|
@data = DEFAULT_HOSTDATA.merge data
|
||||||
|
|
||||||
|
if not @data[:hostname].empty? and @data[:site].empty?
|
||||||
|
data[:site]=@data[:hostname][0,3]
|
||||||
|
end
|
||||||
|
|
||||||
## initialize client for usage tests
|
## initialize client for usage tests
|
||||||
@client = @data[:runner].new(@data)
|
@client = @data[:runner].new(@data)
|
||||||
end
|
end
|
||||||
|
|
||||||
def exec (command)
|
def exec (command)
|
||||||
|
## Send a command from the host
|
||||||
@client.exec(command)
|
@client.exec(command)
|
||||||
end
|
end
|
||||||
|
|
||||||
def exec_sudo (command)
|
def exec_sudo (command)
|
||||||
|
## Send a sudo command from the host
|
||||||
@client.exec_sudo(command)
|
@client.exec_sudo(command)
|
||||||
end
|
end
|
||||||
|
|
||||||
def [](key)
|
def [](key)
|
||||||
|
## Provide Access to data (:ip, etc)
|
||||||
@data[key]
|
@data[key]
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -29,7 +29,11 @@ module RubyQA
|
|||||||
end
|
end
|
||||||
|
|
||||||
def self.new_test(name, options={}, &test_proc)
|
def self.new_test(name, options={}, &test_proc)
|
||||||
@@tests << Test.new(name, **options, &test_proc)
|
if not options.has_key? :disabled
|
||||||
|
@@tests << Test.new(name, **options, &test_proc)
|
||||||
|
elsif options[:disabled] != true
|
||||||
|
@@tests << Test.new(name, **options, &test_proc)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def self.run_tests
|
def self.run_tests
|
||||||
|
@ -3,5 +3,6 @@
|
|||||||
$LOAD_PATH << __dir__
|
$LOAD_PATH << __dir__
|
||||||
require 'manager'
|
require 'manager'
|
||||||
require 'resource'
|
require 'resource'
|
||||||
|
require 'runner'
|
||||||
require 'host'
|
require 'host'
|
||||||
require 'test'
|
require 'test'
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
Gem::Specification.new do |s|
|
Gem::Specification.new do |s|
|
||||||
s.name = "RubyQA"
|
s.name = "RubyQA"
|
||||||
s.version = '0.1.0'
|
s.version = '0.1.0'
|
||||||
s.summary = 'A Ruby framework for QA *NIX system builds'
|
s.summary = 'A Ruby framework for QA-ing *NIX system builds'
|
||||||
s.description = 'A Ruby based framework defining & orchestrating tests against a host or hosts'
|
s.description = 'A Ruby based framework defining & orchestrating tests against a host or hosts'
|
||||||
s.authors = ['Tristan Ancelet']
|
s.authors = ['Tristan Ancelet']
|
||||||
s.email = 'tristanancelet@yahoo.com'
|
s.email = 'tristanancelet@yahoo.com'
|
||||||
|
Loading…
Reference in New Issue
Block a user