taste_tester 0.0.18 → 0.0.19

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e8206a39afa26db4e27600fa362c26d33d16fcefe6a5e79a4869fe339b9e1e18
4
- data.tar.gz: 2eb1a8bdfd58d5713dc1f5197da4b10cd0167542fefa641bfe3d6863c252fc58
3
+ metadata.gz: a2fa17de1672814a680aa44b592bc649f3b3ec80b057a0199aed9b3ce13e1fe5
4
+ data.tar.gz: e9150bc89798e17651102239224763468ca8a65affb7706c4080a409577bf108
5
5
  SHA512:
6
- metadata.gz: 40e15c8cf0858f82e65e0b94e4bdcfa44223b0c891ef9242aa0cbb264c36c6931e033b9b10cf70fcc68b74be4ff4628042872d78466f761bfc367de69f116897
7
- data.tar.gz: 28dbed4002b508d4eb7222b3007bc6580dd4c881d4894e456a849bc882339d6b97ccec6858682c5bc71b0dbf8aa03d377de47eefa85e1c5cff09601884ca19bf
6
+ metadata.gz: 12bf2e2e631987187b455b294bae9db28bd1f50c7aba35bbe9d04b3cbceabec3f65fd665f5ef5c70424bb296438742ebd0a918a5545480ec058ff760ac6f81fa
7
+ data.tar.gz: 4b6781fe213f7e9447077d6f629c3facc4f2fa596212b8a8f1f8cde40e1f1aba4c66542f1b939b587c87d4e05878320e410e2bd8b9bbec98a40ff97ac52c4806
@@ -172,8 +172,9 @@ module TasteTester
172
172
  }
173
173
  }" #{config_file}
174
174
  ENDOFSHELLCODE
175
+ shellcode.chomp!
175
176
  end
176
- shellcode.chomp
177
+ shellcode
177
178
  end
178
179
 
179
180
  def keeptesting
@@ -253,7 +254,7 @@ module TasteTester
253
254
  '$b64 | Out-File -Encoding ASCII $tmp64 -Force',
254
255
 
255
256
  # Remove our tmp file before we write to it or certutil crashes...
256
- 'if (Test-Path $tmp) { rm $tmp }',
257
+ "#{win_rm_f} $tmp",
257
258
  'certutil -decode $tmp64 $tmp',
258
259
  'mv $tmp $ttconfig -Force',
259
260
 
@@ -291,17 +292,20 @@ module TasteTester
291
292
  # Remote untesting commands for Windows
292
293
  def add_windows_untest_cmds(transport)
293
294
  config_prod = TasteTester::Config.chef_config.split('.').join('-prod.')
295
+ tt_config =
296
+ "#{TasteTester::Config.chef_config_path}/#{TASTE_TESTER_CONFIG}"
297
+ pem_file = "#{TasteTester::Config.chef_config_path}/client-prod.pem"
298
+ pem_link = "#{TasteTester::Config.chef_config_path}/client.pem"
299
+
294
300
  [
295
301
  'New-Item -ItemType SymbolicLink -Force -Value ' +
296
302
  "#{TasteTester::Config.chef_config_path}/#{config_prod} " +
297
303
  "#{TasteTester::Config.chef_config_path}/" +
298
304
  TasteTester::Config.chef_config,
299
305
  'New-Item -ItemType SymbolicLink -Force -Value ' +
300
- "#{TasteTester::Config.chef_config_path}/client-prod.pem " +
301
- "#{TasteTester::Config.chef_config_path}/client.pem",
302
- 'rm -Force ' +
303
- "#{TasteTester::Config.chef_config_path}/#{TASTE_TESTER_CONFIG}",
304
- "rm -Force #{TasteTester::Config.timestamp_file}",
306
+ "#{pem_file} #{pem_link}",
307
+ "#{win_rm_f} #{tt_config}",
308
+ "#{win_rm_f} #{TasteTester::Config.timestamp_file}",
305
309
  create_eventlog_if_needed_cmd,
306
310
  'Write-EventLog -LogName "Application" -Source "taste-tester" ' +
307
311
  '-EventID 4 -EntryType Information -Message "Returning server ' +
@@ -328,6 +332,10 @@ module TasteTester
328
332
  end
329
333
  end
330
334
 
335
+ def win_rm_f
336
+ 'Remove-Item -Force -ErrorAction SilentlyContinue'
337
+ end
338
+
331
339
  def config
332
340
  scheme = TasteTester::Config.use_ssl ? 'https' : 'http'
333
341
  if TasteTester::Config.use_ssh_tunnels
@@ -111,12 +111,18 @@ module TasteTester
111
111
  # TODO: pull this from Host.touchcmd
112
112
  (Get-Item "$ts").LastWriteTime=("#{TasteTester::Config.testing_end_time}")
113
113
 
114
- while (1 -eq 1) {
114
+ while ($true) {
115
115
  if (-Not (Test-Path $ts)) {
116
116
  # if we are here, we know we've created our source
117
- Write-EventLog -LogName "Application" -Source "taste-tester" `
118
- -EventID 5 -EntryType Information `
119
- -Message "Ending tunnel: timestamp file disappeared"
117
+ $splat = @{
118
+ LogName = "Application"
119
+ Source = "taste-tester"
120
+ EventID = 5
121
+ EntryType = "Information"
122
+ Message = "Ending tunnel: timestamp file disappeared"
123
+ }
124
+ Write-EventLog @splat
125
+ break
120
126
  }
121
127
  sleep 60
122
128
  }
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: taste_tester
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.18
4
+ version: 0.0.19
5
5
  platform: ruby
6
6
  authors:
7
7
  - Phil Dibowitz
@@ -10,7 +10,7 @@ autorequire:
10
10
  bindir:
11
11
  - bin
12
12
  cert_chain: []
13
- date: 2020-08-24 00:00:00.000000000 Z
13
+ date: 2020-08-25 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: between_meals