Permalink
Browse files

fix mysql unit tests for new bind_mount way

Change-Id: Ie26ce32bfc1fd53fcbb530a45cbc0bd60916fdca
  • Loading branch information...
EagleChen committed Dec 10, 2012
1 parent 421b082 commit 95d43ebdfdb2bbc7e2609a5d9b39fdfa94a20c85
Showing with 9 additions and 4 deletions.
  1. +4 −4 ng/mysql/config/mysql_node.yml
  2. +2 −0 ng/mysql/spec/mysql_node_spec.rb
  3. +3 −0 ng/mysql/spec/spec_helper.rb
@@ -39,10 +39,10 @@ warden:
last: 45000
service_log_dir: /var/vcap/services/mysql/log
service_bin_dir:
- '5.1': /usr/bin
- '5.5': /usr/bin
- service_script_dir: /usr/bin
- service_conf_dir: /etc
+ '5.1': /var/vcap/packages/mysql
+ '5.5': /var/vcap/packages/mysql55
+ service_script_dir: /var/vcap/jobs/mysql_node_ng/bin
+ service_conf_dir: /var/vcap/jobs/mysql_node_ng/config
image_dir: /var/vcap/services/mysql/image
service_start_timeout: 3
filesystem_quota: false
@@ -626,6 +626,8 @@ class << @node
@test_dbs[db] = []
@node.dump_instance(db, nil , '/tmp')
@node.unprovision(db['name'], [])
+ # give base code some time to remove the instance directories
+ sleep 1 if @node.use_warden
@node.import_instance(db, {}, '/tmp', @default_plan).should == true
conn = connect_to_mysql(db)
expect { conn.query('SELECT 1')}.should_not raise_error
@@ -114,6 +114,9 @@ def getNodeTestConfig()
if options[:use_warden]
warden_config = parse_property(config, "warden", Hash, :optional => true)
options[:service_log_dir] = parse_property(warden_config, "service_log_dir", String)
+ options[:service_script_dir] = parse_property(warden_config, "service_script_dir", String, :optional => true, :default => "/var/vcap/jobs")
+ options[:service_conf_dir] = parse_property(warden_config, "service_conf_dir", String, :optional => true, :default => "/var/vcap/jobs")
+ options[:service_bin_dir] = parse_property(warden_config, "service_bin_dir", Hash, :optional => true)
options[:image_dir] = parse_property(warden_config, "image_dir", String)
options[:port_range] = parse_property(warden_config, "port_range", Range)
options[:service_start_timeout] = parse_property(warden_config, "service_start_timeout", Integer, :optional => true, :default => 3)

0 comments on commit 95d43eb

Please sign in to comment.