Permalink
Browse files

Merge pull request #126 from rightscale/azure_67069_fix_integ

Modify root_dir handling in support of integration tests
  • Loading branch information...
ryanwilliamson committed Mar 4, 2013
2 parents eadef88 + 8c49bbe commit ab733048837c833e1a1f62fcd09961d5c077672f
Showing with 12 additions and 5 deletions.
  1. +2 −0 .gitignore
  2. +9 −3 bin/enroll
  3. +1 −2 lib/instance/cook/cook.rb
View
@@ -8,3 +8,5 @@ tags
.loadpath
nbproject/
pkg/
+*.cert
+*.key
View
@@ -63,7 +63,13 @@ module RightScale
parser = OptionParser.new do |cli|
cli.on('--root-dir DIR') do |d|
- options[:root_dir] = d
+ # Allow for more than one
+ if options[:root_dir]
+ options[:root_dir] = [options[:root_dir]] unless options[:root_dir].is_a?(Array)
+ options[:root_dir] << d
+ else
+ options[:root_dir] = d
+ end
end
cli.on('-u', '--url URL') do |url|
options[:url] = url
@@ -72,7 +78,7 @@ module RightScale
options[:host] = host
end
cli.on('-p', '--port PORT') do |port|
- # only used for testing
+ # Only used for testing
options[:port] = port
end
cli.on('-i', '--id ID') do |id|
@@ -189,7 +195,7 @@ module RightScale
if @result
# Create the standard RightAgent certs_dir so we can write our certs there.
- certs_dir = File.join(AgentConfig.agent_state_dir, 'certs')
+ certs_dir = AgentConfig.certs_dir
FileUtils.mkdir_p(certs_dir) unless File.directory?(certs_dir)
# Write the mapper cert, our cert, and our private kjey
@@ -40,11 +40,10 @@ class BlockingError < Exception; end
# Run bundle given in stdin
def run
- AgentConfig.root_dir = AgentConfig.right_link_root_dirs
-
# 1. Load configuration settings
options = OptionsBag.load
agent_id = options[:identity]
+ AgentConfig.root_dir = options[:root_dir]
Log.program_name = 'RightLink'
Log.facility = 'user'

1 comment on commit ab73304

Member

rightscale-ci commented on ab73304 Apr 1, 2013

RS-COMPLIANCE: COMPLIANCE-COMMITMESSAGE-PASS Build: #15135(2013-04-01_06-20-45), repo: right_link, branch/tag: aqua_acu78536_productize, sha: ab73304, status: PASS, reason: Was a merge commit

Please sign in to comment.