simp-beaker-helpers 1.0.5 → 1.0.7

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 (4) hide show
  1. checksums.yaml +8 -8
  2. data/README.md +9 -1
  3. data/lib/simp/beaker_helpers.rb +13 -1
  4. metadata +2 -2
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- MGIyZGI3MjJhZmJlZDQwM2RmMjZlMDcxYzAxZGVjNzI3ZWJlOGVmNg==
4
+ Y2MyOTg3YzFjZjAxM2JjY2YxYmRkZjkxYzNiNTc5MGFmYTEwMTQ4OA==
5
5
  data.tar.gz: !binary |-
6
- ZDE1NjMzYjFkNTk5NjVjMmRlZDA1NTI3ZmU0N2VlMTA5ZWQ2MDAwZQ==
6
+ ZmIwYjI4ODJlMmE2Y2FmM2VlMWU4ZTMwOGIzMDFmZTI0MGJlNjBjMA==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- MTUwZTZlMzE5NDE3Mjc0YjUwYjRmOGNlOTAwZTA5MmFmYmYyZDQ1MzVjNmQ4
10
- MTY0NWJhZTM2OTlhMDZmMmNkMGYwNGU3ZmYyZWI0NjA3Y2M5OGI4M2JmYzBk
11
- NTA4YmFlMDYyMWNjODFiOTg0MGU5MDE3NzE2NDYxZWE5YjhmM2U=
9
+ ZTZhY2UzMmFiZmVhOTUxNjZjYzA5NGM1N2YyNGExMmY5YjBkOTFiM2E5MmY5
10
+ MjlhODA1NDFkNWVlYzBlYTBmNjNhMjc3YTA0YmM2YTE1MDUwZTMyZTZiMDdm
11
+ ZGFmZGJkMTNhNDQyNjFmOGI0ZTMwNTVhOTA4NDFjOGI0NzM2NjU=
12
12
  data.tar.gz: !binary |-
13
- ZmQ2ZTE3MDdjZmZlMzA0NTIxMTkwYzNmNWI5YTA2ZDA5ZTBjMDIxNTYyMTdl
14
- YTM5NjZhNTFjNWI5OTY4ZTRhZDQ3N2I3MmNkODU5NmZlZTU5YjhhNmI2YTY4
15
- ZjNlMjIxOGNlMzIxYjQwZDJlZTAzNzg0MGI2NGQ2Y2QzOThhOGY=
13
+ ODBkODY1Y2M3YmQ3MTFmODdjNzcyZGNkNTlmZWE4ZjMxYjZiNTM1ZDIwZWVk
14
+ MWZiY2JhZTZhOTU3MjlhNTRmYzJiMDBhMDA5ZWI4ZDVmN2NhZmU4NWY4M2Ey
15
+ YTU2ZmE2YzY2ZTU4MGRmMWUyOWNhNWE3NjNiYTM4MzE0YTExYWI=
data/README.md CHANGED
@@ -12,6 +12,7 @@ Methods to assist beaker acceptance tests for SIMP.
12
12
  * [`run_fake_pki_ca_on`](#run_fake_pki_ca_on)
13
13
  * [`copy_pki_to`](#copy_pki_to)
14
14
  * [`copy_keydist_to`](#copy_keydist_to)
15
+ * [`pluginsync_on`](#pluginsync_on)
15
16
  * [`set_hieradata_on`](#set_hieradata_on)
16
17
  * [`clear_temp_hieradata`](#clear_temp_hieradata)
17
18
  4. [Environment variables](#environment-variables)
@@ -94,7 +95,14 @@ Copy a CA keydist/ directory of CA+host certs into an SUT
94
95
 
95
96
  This simulates the output of FakeCA's `gencerts_nopass.sh` into `keydist/` and is useful for constructing a Puppet master SUT that will distribute PKI keys via agent runs.
96
97
 
97
- `def copy_keydist_to( ca_sut = master )`
98
+ `copy_keydist_to( ca_sut = master )`
99
+
100
+
101
+ #### `pluginsync_on`
102
+
103
+ Simulates a custom fact pluginsync on given SUTs
104
+
105
+ `pluginsync_on( suts = hosts )`
98
106
 
99
107
 
100
108
  #### `set_hieradata_on`
@@ -1,7 +1,7 @@
1
1
  module Simp; end
2
2
 
3
3
  module Simp::BeakerHelpers
4
- VERSION = '1.0.5'
4
+ VERSION = '1.0.7'
5
5
 
6
6
  # Locates .fixture.yml in or above this directory.
7
7
  def fixtures_yml_path
@@ -279,4 +279,16 @@ DEFAULT_KERNEL_TITLE=`/sbin/grubby --info=\\\${DEFAULT_KERNEL_INFO} | grep -m1 t
279
279
  end
280
280
  end
281
281
  end
282
+
283
+ # pluginsync custom facts for all modules
284
+ def pluginsync_on( suts = hosts )
285
+ suts.each do |sut|
286
+ fact_path = on(sut, %q(puppet config print factpath)).output.strip.split(':').first
287
+ on(sut, %q(puppet config print modulepath)).output.strip.split(':').each do |mod_path|
288
+ on(sut, %Q(mkdir -p #{fact_path}))
289
+ next if on(sut, "ls #{mod_path}/*/lib/facter 2>/dev/null ", :accept_all_exit_codes => true).exit_code != 0
290
+ on(sut, %Q(find #{mod_path}/*/lib/facter -type f -name '*.rb' -exec cp -a {} '#{fact_path}/' \\; ))
291
+ end
292
+ end
293
+ end
282
294
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: simp-beaker-helpers
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.5
4
+ version: 1.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chris Tessmer
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-09-29 00:00:00.000000000 Z
11
+ date: 2015-10-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: beaker