kitchen-salt 0.2.5 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/kitchen-salt/version.rb +1 -1
- data/lib/kitchen/verifier/runtests.rb +8 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 98e5f85a0f6b0ef285eea5ed462d8eec5cbc4c1e0db93504a10173c8057e1bcd
|
4
|
+
data.tar.gz: 9bb26ffea232183ae190378d62f9e4fab695cf06a12de3c0d991312dcfc53054
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d97bc767c493b113070ee56d184c97821341d5102971e470befb2feb9eed66ef08a4dcf0bb5cbb98bea83209338d6461c42472abfe74d3036ad4b3df3e038390
|
7
|
+
data.tar.gz: 736e3441b408ff03818f35c3df0b081d2ddce68c1f45cecba5573bbc872e9c68fc6788451d26285c854a37e2a771d2720d80fae6b39cb465256ce49ad1041b3b
|
data/lib/kitchen-salt/version.rb
CHANGED
@@ -20,6 +20,8 @@ module Kitchen
|
|
20
20
|
default_config :transport, false
|
21
21
|
default_config :save, {}
|
22
22
|
default_config :windows, false
|
23
|
+
default_config :enable_filenames, false
|
24
|
+
default_config :from_filenames, ''
|
23
25
|
|
24
26
|
def call(state)
|
25
27
|
info("[#{name}] Verify on instance #{instance.name} with state=#{state}")
|
@@ -27,6 +29,11 @@ module Kitchen
|
|
27
29
|
if ENV['KITCHEN_TESTS']
|
28
30
|
ENV['KITCHEN_TESTS'].split(' ').each{|test| config[:tests].push(test)}
|
29
31
|
end
|
32
|
+
if ENV['CHANGE_TARGET'] and ENV['BRANCH_NAME']
|
33
|
+
require 'git'
|
34
|
+
repo = Git.open('.')
|
35
|
+
config[:from_filenames] = '--from-filenames ' + repo.diff("origin/#{ENV['CHANGE_TARGET']}", "origin/#{ENV['BRANCH_NAME']}").name_status.keys.join(',')
|
36
|
+
end
|
30
37
|
command = [
|
31
38
|
(config[:windows] ? 'python.exe' : config[:python_bin]),
|
32
39
|
File.join(root_path, config[:testingdir], '/tests/runtests.py'),
|
@@ -40,6 +47,7 @@ module Kitchen
|
|
40
47
|
(config[:xml] ? "--xml=#{config[:xml]}" : ''),
|
41
48
|
config[:types].collect{|type| "--#{type}"}.join(' '),
|
42
49
|
config[:tests].collect{|test| "-n #{test}"}.join(' '),
|
50
|
+
(config[:enable_filenames] ? config[:from_filenames] : ''),
|
43
51
|
'2>&1',
|
44
52
|
].join(' ')
|
45
53
|
if config[:windows]
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: kitchen-salt
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- SaltStack Inc
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-10-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: hashie
|