Fix patches for noop tests and use new path to spec
This commit is contained in:
parent
a0379206e9
commit
975258374b
10
f2s/f2s.py
10
f2s/f2s.py
@ -80,9 +80,11 @@ class Task(object):
|
|||||||
after_naily)
|
after_naily)
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def manifest_name(self):
|
def spec_name(self):
|
||||||
name = self.data['parameters']['puppet_manifest'].split('/')[-1]
|
splitted = self.data['parameters']['puppet_manifest'].split('/')
|
||||||
return name.split('.')[0]
|
directory = splitted[-2]
|
||||||
|
name = splitted[-1].split('.')[0]
|
||||||
|
return "{}_{}_spec.rb'".format(directory, name)
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def dst_path(self):
|
def dst_path(self):
|
||||||
@ -122,7 +124,7 @@ class Task(object):
|
|||||||
"""
|
"""
|
||||||
print self.manifest_name
|
print self.manifest_name
|
||||||
lookup_stack_path = os.path.join(
|
lookup_stack_path = os.path.join(
|
||||||
INPUTS_LOCATION, self.manifest_name+"_spec.rb'")
|
INPUTS_LOCATION, self.spec_name)
|
||||||
if not os.path.exists(lookup_stack_path):
|
if not os.path.exists(lookup_stack_path):
|
||||||
return {}
|
return {}
|
||||||
|
|
||||||
|
@ -4,8 +4,9 @@
|
|||||||
# @return [Array<TrueClass,FalseClass,NilClass>] success and empty report array
|
# @return [Array<TrueClass,FalseClass,NilClass>] success and empty report array
|
||||||
def self.rspec(spec)
|
def self.rspec(spec)
|
||||||
inside_noop_tests_directory do
|
inside_noop_tests_directory do
|
||||||
+ identity = spec.split('/')[-1]
|
+ splitted = spec.split('/')
|
||||||
+ ENV["SPEC"] = identity
|
+ dir, name = splitted[-2], splitted[-1]
|
||||||
|
+ ENV["SPEC"] = "#{dir}_#{name}"
|
||||||
command = "rspec #{RSPEC_OPTIONS} #{spec}"
|
command = "rspec #{RSPEC_OPTIONS} #{spec}"
|
||||||
- command = 'bundle exec ' + command if options[:bundle]
|
- command = 'bundle exec ' + command if options[:bundle]
|
||||||
+ command = "bundle exec " + command if options[:bundle]
|
+ command = "bundle exec " + command if options[:bundle]
|
||||||
|
@ -13,6 +13,9 @@ input:
|
|||||||
uid:
|
uid:
|
||||||
type: str!
|
type: str!
|
||||||
value:
|
value:
|
||||||
|
env:
|
||||||
|
type: str!
|
||||||
|
value:
|
||||||
access:
|
access:
|
||||||
value: null
|
value: null
|
||||||
access_hash:
|
access_hash:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user