pdqtest 1.9.9beta9 → 1.9.9beta10

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: 438426faf365d5ee59ac7b075dec4bef83048a08e4d231bf9e069f8b70374194
4
- data.tar.gz: b8d07f4d78e6e4f4721fcbe6a9e34e7e5ca51bd59e11c4f55fd1765b548b571f
3
+ metadata.gz: f787c7d95a40dd0243e1a79bf35c50c6f35156114fa400d969e1482847918934
4
+ data.tar.gz: 45a75d89287e99c6c4ba900ba535e14898cb3c1ba28575dbc5d19199e86bda95
5
5
  SHA512:
6
- metadata.gz: 66d94c1d45b76ab56e30dc7ab1aa26b0f32727f12232b04b83b308d65cc25328bae044ca1e4941c927b08d9680b6d91a335bed6e8213306aff073ff7ba66e811
7
- data.tar.gz: cd0acb639f47015da1c6d23e1431ac512a07585c429fbf8ad5a9336d23f90f72a45808921337c584b938f924f917b46523f6438f4129624b1822f08c906afc98
6
+ metadata.gz: 46f4d91ffbed0f0e856bee1960a1f54044b956102b91136445941c36d51231e815794233e6d267ba3637a0ae32279c6155e5ac5991148b09e7ac71af8456dca8
7
+ data.tar.gz: 534779666962526e7dbc29bf28eb39e22a4d8490bba9001da36a5aa156c36f6711db2c2db26603cf3239a5f982532cd09a024df0836421fb9470b5fcc56f0af4
data/README.md CHANGED
@@ -52,4 +52,5 @@ PDQTest 2.0 new features:
52
52
  1. [Troubleshooting](doc/troubleshooting.md)
53
53
  1. [Examples](doc/examples.md)
54
54
  1. [Development](doc/development.md)
55
+ 1 [Inplace execution](doc/inplace.md)
55
56
  1. [PDQTest 1.x -> 2.x Upgrade guide](doc/upgrade_1_2.md)
data/doc/inplace.md ADDED
@@ -0,0 +1,28 @@
1
+ # Inplace execution
2
+ Sometimes you _must_ run PDQTest inplace, on the computer your running from.
3
+
4
+ This is mostly useful for CI systems where running Docker-In-Docker is too
5
+ slow/heavy.
6
+
7
+ ## Warning
8
+ **Do not run PDQTest inplace on a system you care about**
9
+
10
+ It will run puppet against it and likely destroy the system depending what your
11
+ tests look like
12
+
13
+ ## Requirements
14
+ The current system must have available in `PATH`:
15
+ * Puppet
16
+ * BATS (Linux) or PATS (Windows)
17
+ * PDK
18
+
19
+ ## Activation
20
+ You have to run PDQTest with the options `--inplace --inplace-enable` to
21
+ activate inplace alteration. This is normally done from CI integration files.
22
+
23
+ ## Problems in-place execution solves
24
+ * Acceptance testing on Bitbucket Pipelines.
25
+ * Acceptance testing Windows on Appveyor
26
+
27
+ ## Example project
28
+ https://bitbucket.org/geoffwilliams_pp/test
data/doc/pdk.md CHANGED
@@ -138,6 +138,7 @@ or supported.
138
138
  * ⚡ - File updated/replaced when you run `pdqtest upgrade`:
139
139
 
140
140
  ```
141
+ ├── appveyor.yml ⚡
141
142
  ├── bitbucket-pipelines.yml ⚡
142
143
  ├── Gemfile 🛠
143
144
  ├── Gemfile.local
@@ -163,6 +164,7 @@ or supported.
163
164
  ```
164
165
 
165
166
  Notes:
167
+ * `appveyor.yml` - Complete test suite for Windows modules
166
168
  * `.travis.yml` - Complete test suite for Linux modules
167
169
  * `bitbucket-pipelines.yaml` - logical testing only (unit/RSpec)
168
170
  * `.puppet-lint.rc` - Make lint errors test failures, ignore double quotes, etc
@@ -27,12 +27,16 @@ module PDQTest
27
27
  $logger.debug("exec_real: running inplace command: #{real_c}")
28
28
  if @@enable
29
29
  # must splat to avoid "wrong first argument"
30
- Open3.popen3(*real_c) do |stdin, stdout, stderr, wait_thr|
31
- res[:OUT] = stdout.read.split("\n")
32
- res[:ERR] = stderr.read.split("\n")
33
- # Process::Status object returned from `.value`
34
- res[:STATUS] = wait_thr.value.exitstatus
35
- end
30
+ # Open3.popen3(*real_c) do |stdin, stdout, stderr, wait_thr|
31
+ # res[:OUT] = stdout.read.split("\n")
32
+ # res[:ERR] = stderr.read.split("\n")
33
+ # # Process::Status object returned from `.value`
34
+ # res[:STATUS] = wait_thr.value.exitstatus
35
+ # end
36
+ stdout, stderr, status = Open3.capture3(*real_c)
37
+ res[:OUT] = stdout.split("\n")
38
+ res[:ERR] = stderr.split("\n")
39
+ res[:STATUS] = status.exitstatus
36
40
  else
37
41
  $logger.info "didn't run command, reason: DISABLED"
38
42
  end
@@ -46,13 +50,13 @@ module PDQTest
46
50
  end
47
51
 
48
52
  def self.new_container(image_name, privileged)
49
- FileUtils.rm_f Docker.test_dir if Dir.exist? Docker.test_dir
53
+ FileUtils.rm_rf Docker.test_dir if Dir.exist? Docker.test_dir
50
54
 
51
55
  FileUtils.cp_r(File.join(Dir.pwd, "."), Docker.test_dir)
52
56
  end
53
57
 
54
58
  def self.cleanup_container(container)
55
- FileUtils.rm_f Docker.test_dir
59
+ FileUtils.rm_rf Docker.test_dir
56
60
  end
57
61
  end
58
62
  end
@@ -42,6 +42,9 @@ module PDQTest
42
42
  "bitbucket-pipelines.yml" => {
43
43
  "unmanaged" => true,
44
44
  },
45
+ "appveyor.yml" => {
46
+ "unmanaged" => true,
47
+ },
45
48
  ".gitignore" => {
46
49
  "paths" => [
47
50
  ".Puppetfile.pdqtest",
@@ -135,6 +138,7 @@ module PDQTest
135
138
  install_skeleton('make.ps1', 'make.ps1')
136
139
  install_skeleton('bitbucket-pipelines.yml', 'bitbucket-pipelines.yml')
137
140
  install_skeleton('.travis.yml', '.travis.yml')
141
+ install_skeleton('appveyor.yml', 'appveyor.yml')
138
142
  Pdk.amend_sync_yml(SYNC_YML_CONTENT)
139
143
  end
140
144
 
@@ -1,3 +1,3 @@
1
1
  module PDQTest
2
- VERSION = "1.9.9beta9"
2
+ VERSION = "1.9.9beta10"
3
3
  end
@@ -0,0 +1,19 @@
1
+ # appveyor.yml
2
+ ---
3
+ image: "Visual Studio 2017"
4
+
5
+ install:
6
+ - "cinst ruby --version 2.4.3.1"
7
+ - "cinst pdk"
8
+ - set PATH=C:\tools\ruby24\bin;c:\pats\;%PATH%
9
+ - "gem install bundler"
10
+ - "ruby --version"
11
+ - "gem --version"
12
+ - git clone https://github.com/GeoffWilliams/pats c:\pats
13
+
14
+ build_script:
15
+ - "gem install bundler"
16
+
17
+ test_script:
18
+ - ps: ./make.ps1 pdqtestbundle
19
+ - cd .pdqtest && bundle exec pdqtest --inplace --inplace-enable all
@@ -18,7 +18,7 @@ pipelines:
18
18
  - apt install -y pdk
19
19
  - sh .ci_custom.sh
20
20
  - make pdqtestbundle
21
- - cd .pdqtest && bundle exec pdqtest --inplace --inplace enable all
21
+ - cd .pdqtest && bundle exec pdqtest --inplace --inplace-enable all
22
22
 
23
23
  definitions:
24
24
  caches:
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pdqtest
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.9.9beta9
4
+ version: 1.9.9beta10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Geoff Williams
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-10-01 00:00:00.000000000 Z
11
+ date: 2018-10-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -189,6 +189,7 @@ files:
189
189
  - doc/enabling_testing.md
190
190
  - doc/examples.md
191
191
  - doc/hiera.md
192
+ - doc/inplace.md
192
193
  - doc/installation.md
193
194
  - doc/pdk.md
194
195
  - doc/puppet_facts.md
@@ -231,6 +232,7 @@ files:
231
232
  - res/skeleton/.puppet-lint.rc
232
233
  - res/skeleton/.travis.yml
233
234
  - res/skeleton/Makefile
235
+ - res/skeleton/appveyor.yml
234
236
  - res/skeleton/bitbucket-pipelines.yml
235
237
  - res/skeleton/make.ps1
236
238
  - res/skeleton/spec/fixtures/hiera.yaml