cem_acpt 0.2.0 → 0.2.1

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: a7ce3a10380b032387479fc85590e5a9ca59c2dc5cec33d71cb9d79eaf6938a7
4
- data.tar.gz: d3d12c621ee070af7cab276e6887c45343519c51e9260a1c6e6fd0fc4ca64e80
3
+ metadata.gz: d2313771f18f69c69e46f669fb17f42ead2cff90cd460075bab231df62cb2e07
4
+ data.tar.gz: dcc3955e5efbf03a347e73e577959df0290091b1f0b8556878dee7f4275e2ff2
5
5
  SHA512:
6
- metadata.gz: d394053e259fb6d502a44d219b8dd056e1777d61a67a1a3da34360288ee6b623eadb842381900fe1d56d4944f0b9823c10c59f136f6ac486a8c0c47722dbfddf
7
- data.tar.gz: c73ede8616dc75ab9da65573f5ad3a77c4ec604089183ede90e2a97a9fa2f5699ae012ba157935c0f7bdec9e2744f996d154958b40fde9271c545900f884de77
6
+ metadata.gz: 13f7edce58eb395c1f441e94ef9d1fef96b610547ccddc4096e2f78329f8dac1d7ee2a2cccbea982d079da1f25daa50379b3e8d3b4e64685b3fef50784d1f3a6
7
+ data.tar.gz: 723f4a38d9a89e50882b0c66577b8c760a5dc26c45357b7bc830073492fdf01976aacbba28eeb3ef382ec59fe7cae28d95a2da9b9eb77602cd02918bb829c29a
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- cem_acpt (0.2.0)
4
+ cem_acpt (0.2.1)
5
5
  concurrent-ruby (~> 1.1.9)
6
6
  deep_merge (~> 1.2.2)
7
7
  net-ssh (~> 7.0.0.beta1)
@@ -94,17 +94,10 @@ module CemAcpt::Platform::Gcp
94
94
  begin
95
95
  ::JSON.parse(stdout)
96
96
  rescue ::JSON::ParserError
97
- <<<<<<< HEAD
98
- stdout
99
- end
100
- else
101
- stdout
102
- =======
103
97
  stdout.chomp
104
98
  end
105
99
  else
106
100
  stdout.chomp
107
- >>>>>>> 489757f (Fixes for race conditions)
108
101
  end
109
102
  end
110
103
 
@@ -239,20 +232,12 @@ module CemAcpt::Platform::Gcp
239
232
  end
240
233
 
241
234
  def apply_manifest(instance_name, manifest, opts = {})
242
- <<<<<<< HEAD
243
- keep_manifest_file = opts[:apply][:keep_manifest_file] || false
244
- with_temp_manifest_file(manifest, keep_manifest_file: keep_manifest_file) do |tf|
245
- upload_temp_manifest(instance_name, tf.path, opts: opts)
246
- end
247
- apply_cmd = ["#{opts[:puppet_path]} apply /tmp/acpt_manifest.pp"]
248
- =======
249
235
  unless opts[:apply][:no_upload]
250
236
  with_temp_manifest_file(manifest) do |tf|
251
237
  upload_temp_manifest(instance_name, tf.path, remote_path: '/tmp/acpt_manifest.pp', opts: opts)
252
238
  end
253
239
  end
254
240
  apply_cmd = [opts[:puppet_path], 'apply', '/tmp/acpt_manifest.pp']
255
- >>>>>>> 489757f (Fixes for race conditions)
256
241
  apply_cmd << '--trace' if opts[:apply][:trace]
257
242
  apply_cmd << "--hiera_config=#{opts[:apply][:hiera_config]}" if opts[:apply][:hiera_config]
258
243
  apply_cmd << '--debug' if opts[:apply][:debug]
@@ -276,11 +261,7 @@ module CemAcpt::Platform::Gcp
276
261
  cmd_parts.join(' ')
277
262
  end
278
263
 
279
- <<<<<<< HEAD
280
- def with_temp_manifest_file(manifest, file_name: 'acpt_manifest', keep_manifest_file: false)
281
- =======
282
264
  def with_temp_manifest_file(manifest, file_name: 'acpt_manifest')
283
- >>>>>>> 489757f (Fixes for race conditions)
284
265
  require 'tempfile'
285
266
  tf = Tempfile.new(file_name)
286
267
  tf.write(manifest)
@@ -288,25 +269,12 @@ module CemAcpt::Platform::Gcp
288
269
  begin
289
270
  yield tf
290
271
  ensure
291
- <<<<<<< HEAD
292
- if keep_manifest_file
293
- @manifest_file_exists = true
294
- else
295
- tf.unlink
296
- @manifest_file_exists = false
297
- end
298
- =======
299
272
  tf.unlink
300
- >>>>>>> 489757f (Fixes for race conditions)
301
273
  end
302
274
  end
303
275
 
304
276
  def upload_temp_manifest(instance_name, local_path, remote_path: '/tmp/acpt_manifest.pp', opts: {})
305
- <<<<<<< HEAD
306
- scp_upload(instance_name, local_path, remote_path, opts: opts[:ssh_opts]) unless @manifest_file_exists
307
- =======
308
277
  scp_upload(instance_name, local_path, remote_path, opts: opts[:ssh_opts]) unless opts[:apply][:no_upload]
309
- >>>>>>> 489757f (Fixes for race conditions)
310
278
  end
311
279
 
312
280
  def gcloud_ssh(instance_name, command, ignore_command_errors: false)
@@ -322,15 +290,7 @@ module CemAcpt::Platform::Gcp
322
290
  # Default options for Net::SSH
323
291
  def default_ssh_opts
324
292
  {
325
- <<<<<<< HEAD
326
- verify_host_key: :never,
327
- keys: [ssh_key],
328
- kex: ['diffie-hellman-group-exchange-sha256'], # ecdh algos cause jruby to shit the bed
329
- keys_only: true,
330
- config: false,
331
- =======
332
293
  auth_methods: ['publickey'],
333
- >>>>>>> 489757f (Fixes for race conditions)
334
294
  check_host_ip: false,
335
295
  compression: true,
336
296
  config: false,
@@ -341,10 +301,7 @@ module CemAcpt::Platform::Gcp
341
301
  port: 22,
342
302
  user: user_name,
343
303
  user_known_hosts_file: File.join(ENV['HOME'], '.ssh', 'acpt_test_known_hosts'),
344
- <<<<<<< HEAD
345
- =======
346
304
  verify_host_key: :never,
347
- >>>>>>> 489757f (Fixes for race conditions)
348
305
  }
349
306
  end
350
307
 
@@ -42,11 +42,6 @@ module CemAcpt
42
42
  @module_pkg_path = @context.module_package_path
43
43
  @node_exists = false
44
44
  @run_result = CemAcpt::TestRunner::RunnerResult.new(@node, debug: @debug_mode)
45
- <<<<<<< HEAD
46
- validate!
47
- end
48
-
49
- =======
50
45
  @completed_steps = []
51
46
  validate!
52
47
  end
@@ -61,7 +56,6 @@ module CemAcpt
61
56
  destroy unless step_sym == :destroy
62
57
  end
63
58
 
64
- >>>>>>> 489757f (Fixes for race conditions)
65
59
  # Executes test suite steps
66
60
  def start
67
61
  async_info("Starting test suite for #{@node.node_name}", log_prefix('RUNNER'))
@@ -85,23 +79,11 @@ module CemAcpt
85
79
 
86
80
  private
87
81
 
88
- <<<<<<< HEAD
89
- def run_step(step_sym)
90
- send(step_sym)
91
- rescue StandardError => e
92
- raise CemAcpt::TestRunner::RunnerStepError.new(step_sym, e)
93
- end
94
-
95
- =======
96
- >>>>>>> 489757f (Fixes for race conditions)
97
82
  def step_error_logging(err)
98
83
  prefix = err.respond_to?(:step) ? log_prefix(err.step.capitalize) : log_prefix('RUNNER')
99
84
  fatal_msg = ["runner failed: #{err.message}"]
100
85
  async_fatal(fatal_msg, prefix)
101
- <<<<<<< HEAD
102
- =======
103
86
  async_debug("Completed steps: #{@completed_steps}", prefix)
104
- >>>>>>> 489757f (Fixes for race conditions)
105
87
  async_debug("Failed runner backtrace:\n#{err.backtrace.join("\n")}", prefix)
106
88
  async_debug("Failed runner test data: #{@node.test_data}", prefix)
107
89
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module CemAcpt
4
- VERSION = '0.2.0'
4
+ VERSION = '0.2.1'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cem_acpt
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Heston Snodgrass