Browse files

Modify root_dir handling in support of integration tests

  • Loading branch information...
1 parent 747b48e commit 8c49bbe7ff25f1273b9e54463bba9146c880c746 Lee Kirchhoff committed Dec 6, 2012
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
2 .gitignore
@@ -8,3 +8,5 @@ tags
.loadpath
nbproject/
pkg/
+*.cert
+*.key
View
12 bin/enroll
@@ -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
View
3 lib/instance/cook/cook.rb
@@ -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'

3 comments on commit 8c49bbe

@rightscale-ci

RS-COMPLIANCE: COMPLIANCE-COMMITMESSAGE-FAIL Build: #15135(2013-04-01_06-20-45), repo: right_link, branch/tag: aqua_acu78536_productize, sha: 8c49bbe, status: FAIL, reason: Commit message does not contain acu<4-6 digit TaskID> string.

Please sign in to comment.