testbeat 0.6.0.pr5 → 0.6.0.pr6

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.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/vagrant/noderunner.rb +11 -4
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 1c4cb916fcd70443a5c039e2ac825361ec40bda5
4
- data.tar.gz: 063cdc94d635898c6432449ce66b1e7fa3869442
3
+ metadata.gz: 83c5ad91523f3d71d7738de046c83a9c0007ade2
4
+ data.tar.gz: bf6819da7a200057550eac76902263a06ef9dada
5
5
  SHA512:
6
- metadata.gz: 60fd118265277b0c8cfbecc9adedd7ff55981ba4e8c2ac8abf1497e2cbe32f05eb2764eeb5a2f9ddf6ff03405e0c219ad7ac965ea3624b5b8611803157c8f703
7
- data.tar.gz: 8748f890402061da90bcc0d6fed766d45b6e45537ec591d9e45fda10298f2e0d74535fa98db84652c49d88e97d1cdbb1459d5a52482429eab25bbc5086f77409
6
+ metadata.gz: 8c5c0b5467636b0a1bb1cc1d86f4e8c5a6b9d6d5c767566da10ee5391c6c0e4f4aa596478df1f07f31f62fe39252721b51a70a5995e8b9da8ab1fa955f542274
7
+ data.tar.gz: 388f6f2e3efd804f14b59cf9d6b2ee2eedb6d47891a4bdbb1c1ae21cb07532fdf361142928fc1ec44701762c4c9d30f2c42136e1d194327b9f1ab8be97e1d81a
@@ -11,8 +11,9 @@ require 'open3'
11
11
 
12
12
  def get_hostname(node: $node, vagrant_dir: $vagrant_dir)
13
13
  [node, vagrant_dir]
14
- cmd_hostname = "cat /etc/hostname"
15
- hostname = Open3.popen3("cd #{ vagrant_dir + node }; vagrant ssh -c \"#{cmd_hostname}\"") { |stdin, stdout, stderr, wait_thr| stdout.read }
14
+ cmd_hostname = "vagrant ssh-config | grep HostName | sed 's/ *HostName *//'"
15
+ hostname = Open3.popen3("cd #{ vagrant_dir + node }; #{cmd_hostname}") { |stdin, stdout, stderr, wait_thr| stdout.read }
16
+ hostname = hostname.chomp
16
17
  puts "Vagrant node hostname: #{hostname}"
17
18
  return hostname
18
19
  end
@@ -206,7 +207,10 @@ def main(node: "labs01", provider: "virtualbox", retest: false, guestint: true,
206
207
  vagrant_cmd = cwd_to_node + "vagrant up --provider=#{provider}"
207
208
  elsif /running/.match(v_status)
208
209
  # Add "if runlist file older than 1 h, assume force_long"
209
- hostname = get_hostname()
210
+ hostname = $node
211
+ if provider == "aws"
212
+ hostname = get_hostname()
213
+ end
210
214
  if retest and File.exists?(runlist_file)
211
215
  old_run = File.read(runlist_file)
212
216
  #run_match = /Run List expands to \[(.*?)\]/.match(old_run)
@@ -272,7 +276,10 @@ def main(node: "labs01", provider: "virtualbox", retest: false, guestint: true,
272
276
  exit 1
273
277
  else
274
278
  puts "Vagrant provision completed."
275
- hostname = get_hostname()
279
+ hostname = $node
280
+ if provider == "aws"
281
+ hostname = get_hostname()
282
+ end
276
283
 
277
284
  # Run List expands to [repos-channel::haproxy, cms-base::folderstructure, repos-apache2, repos-subversion, repos-rweb, repos-trac, repos-liveserver, repos-indexing, repos-snapshot, repos-vagrant-labs]
278
285
  run_match = /Run List expands to \[(.*?)\]/.match(vagrant_run_output)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: testbeat
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.0.pr5
4
+ version: 0.6.0.pr6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Staffan Olsson