File tree Expand file tree Collapse file tree 2 files changed +11
-1
lines changed Expand file tree Collapse file tree 2 files changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -35,7 +35,9 @@ def insync?(is)
35
35
return true if is == :absent
36
36
when :latest
37
37
unless is == :absent
38
- return true if provider . latest . include? provider . current
38
+ current = provider . current . split ( '/' )
39
+ latest = provider . latest . split ( '/' )
40
+ return true if current . to_set . subset? ( latest . to_set )
39
41
end
40
42
end
41
43
end
Original file line number Diff line number Diff line change 184
184
allow ( provider_var ) . to receive ( :current ) . and_return ( '66:9B:8B:23:4C:6A:9A:08:F6:4E:B6:01:23:EA:5A' )
185
185
expect ( described_class . new ( jks ) . property ( :ensure ) ) . to be_insync ( :present )
186
186
end
187
+
188
+ it 'insync? should return true if subset of sha1 fingerprints match and state is :present' do
189
+ jks = jks_resource . dup
190
+ jks [ :ensure ] = :latest
191
+ allow ( provider_var ) . to receive ( :latest ) . and_return ( '9B:8B:23:4C:6A:9A:08:F6:4E:B6:01:23:EA:5A:E7:8F:6A/66:9B:8B:23:4C:6A:9A:08:F6:4E:B6:01:23:EA:5A' )
192
+ allow ( provider_var ) . to receive ( :current ) . and_return ( '66:9B:8B:23:4C:6A:9A:08:F6:4E:B6:01:23:EA:5A' )
193
+ expect ( described_class . new ( jks ) . property ( :ensure ) ) . to be_insync ( :present )
194
+ end
187
195
end
188
196
189
197
describe 'when file resources are in the catalog' do
You can’t perform that action at this time.
0 commit comments