chef 17.6.18-universal-mingw32 → 17.9.18-universal-mingw32

Sign up to get free protection for your applications and to get access to all the features.
Files changed (338) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +5 -0
  3. data/chef.gemspec +1 -0
  4. data/distro/ruby_bin_folder/AMD64/Chef.PowerShell.Wrapper.dll +0 -0
  5. data/distro/ruby_bin_folder/AMD64/Chef.PowerShell.dll +0 -0
  6. data/distro/ruby_bin_folder/AMD64/Ijwhost.dll +0 -0
  7. data/distro/ruby_bin_folder/AMD64/concrt140.dll +0 -0
  8. data/distro/ruby_bin_folder/AMD64/host/fxr/5.0.0/hostfxr.dll +0 -0
  9. data/distro/ruby_bin_folder/AMD64/msvcp140.dll +0 -0
  10. data/distro/ruby_bin_folder/AMD64/msvcp140_1.dll +0 -0
  11. data/distro/ruby_bin_folder/AMD64/msvcp140_2.dll +0 -0
  12. data/distro/ruby_bin_folder/AMD64/msvcp140_atomic_wait.dll +0 -0
  13. data/distro/ruby_bin_folder/AMD64/msvcp140_codecvt_ids.dll +0 -0
  14. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/Chef.PowerShell.Wrapper.Core.dll +0 -0
  15. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/Chef.Powershell.Core.dll +0 -0
  16. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/Chef.Powershell.Core.pdb +0 -0
  17. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/Ijwhost.dll +0 -0
  18. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/Microsoft.CSharp.dll +0 -0
  19. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/Microsoft.NETCore.App.deps.json +180 -180
  20. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/Microsoft.VisualBasic.Core.dll +0 -0
  21. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/Microsoft.VisualBasic.dll +0 -0
  22. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/Microsoft.Win32.Primitives.dll +0 -0
  23. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/Microsoft.Win32.Registry.dll +0 -0
  24. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.AppContext.dll +0 -0
  25. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Buffers.dll +0 -0
  26. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Collections.Concurrent.dll +0 -0
  27. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Collections.Immutable.dll +0 -0
  28. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Collections.NonGeneric.dll +0 -0
  29. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Collections.Specialized.dll +0 -0
  30. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Collections.dll +0 -0
  31. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.ComponentModel.Annotations.dll +0 -0
  32. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.ComponentModel.DataAnnotations.dll +0 -0
  33. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.ComponentModel.EventBasedAsync.dll +0 -0
  34. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.ComponentModel.Primitives.dll +0 -0
  35. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.ComponentModel.TypeConverter.dll +0 -0
  36. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.ComponentModel.dll +0 -0
  37. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Configuration.dll +0 -0
  38. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Console.dll +0 -0
  39. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Core.dll +0 -0
  40. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Data.Common.dll +0 -0
  41. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Data.DataSetExtensions.dll +0 -0
  42. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Data.dll +0 -0
  43. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Diagnostics.Contracts.dll +0 -0
  44. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Diagnostics.Debug.dll +0 -0
  45. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Diagnostics.DiagnosticSource.dll +0 -0
  46. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Diagnostics.FileVersionInfo.dll +0 -0
  47. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Diagnostics.Process.dll +0 -0
  48. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Diagnostics.StackTrace.dll +0 -0
  49. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Diagnostics.TextWriterTraceListener.dll +0 -0
  50. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Diagnostics.Tools.dll +0 -0
  51. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Diagnostics.TraceSource.dll +0 -0
  52. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Diagnostics.Tracing.dll +0 -0
  53. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Drawing.Primitives.dll +0 -0
  54. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Drawing.dll +0 -0
  55. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Dynamic.Runtime.dll +0 -0
  56. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Formats.Asn1.dll +0 -0
  57. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Globalization.Calendars.dll +0 -0
  58. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Globalization.Extensions.dll +0 -0
  59. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Globalization.dll +0 -0
  60. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.IO.Compression.Brotli.dll +0 -0
  61. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.IO.Compression.FileSystem.dll +0 -0
  62. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.IO.Compression.ZipFile.dll +0 -0
  63. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.IO.Compression.dll +0 -0
  64. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.IO.FileSystem.AccessControl.dll +0 -0
  65. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.IO.FileSystem.DriveInfo.dll +0 -0
  66. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.IO.FileSystem.Primitives.dll +0 -0
  67. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.IO.FileSystem.Watcher.dll +0 -0
  68. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.IO.FileSystem.dll +0 -0
  69. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.IO.IsolatedStorage.dll +0 -0
  70. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.IO.MemoryMappedFiles.dll +0 -0
  71. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.IO.Pipes.AccessControl.dll +0 -0
  72. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.IO.Pipes.dll +0 -0
  73. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.IO.UnmanagedMemoryStream.dll +0 -0
  74. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.IO.dll +0 -0
  75. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Linq.Expressions.dll +0 -0
  76. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Linq.Parallel.dll +0 -0
  77. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Linq.Queryable.dll +0 -0
  78. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Linq.dll +0 -0
  79. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Memory.dll +0 -0
  80. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Net.Http.Json.dll +0 -0
  81. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Net.Http.dll +0 -0
  82. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Net.HttpListener.dll +0 -0
  83. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Net.Mail.dll +0 -0
  84. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Net.NameResolution.dll +0 -0
  85. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Net.NetworkInformation.dll +0 -0
  86. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Net.Ping.dll +0 -0
  87. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Net.Primitives.dll +0 -0
  88. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Net.Requests.dll +0 -0
  89. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Net.Security.dll +0 -0
  90. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Net.ServicePoint.dll +0 -0
  91. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Net.Sockets.dll +0 -0
  92. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Net.WebClient.dll +0 -0
  93. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Net.WebHeaderCollection.dll +0 -0
  94. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Net.WebProxy.dll +0 -0
  95. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Net.WebSockets.Client.dll +0 -0
  96. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Net.WebSockets.dll +0 -0
  97. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Net.dll +0 -0
  98. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Numerics.Vectors.dll +0 -0
  99. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Numerics.dll +0 -0
  100. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.ObjectModel.dll +0 -0
  101. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Private.CoreLib.dll +0 -0
  102. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Private.DataContractSerialization.dll +0 -0
  103. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Private.Uri.dll +0 -0
  104. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Private.Xml.Linq.dll +0 -0
  105. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Private.Xml.dll +0 -0
  106. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Reflection.DispatchProxy.dll +0 -0
  107. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Reflection.Emit.ILGeneration.dll +0 -0
  108. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Reflection.Emit.Lightweight.dll +0 -0
  109. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Reflection.Emit.dll +0 -0
  110. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Reflection.Extensions.dll +0 -0
  111. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Reflection.Metadata.dll +0 -0
  112. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Reflection.Primitives.dll +0 -0
  113. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Reflection.TypeExtensions.dll +0 -0
  114. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Reflection.dll +0 -0
  115. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Resources.Reader.dll +0 -0
  116. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Resources.ResourceManager.dll +0 -0
  117. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Resources.Writer.dll +0 -0
  118. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Runtime.CompilerServices.Unsafe.dll +0 -0
  119. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Runtime.CompilerServices.VisualC.dll +0 -0
  120. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Runtime.Extensions.dll +0 -0
  121. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Runtime.Handles.dll +0 -0
  122. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Runtime.InteropServices.RuntimeInformation.dll +0 -0
  123. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Runtime.InteropServices.dll +0 -0
  124. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Runtime.Intrinsics.dll +0 -0
  125. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Runtime.Loader.dll +0 -0
  126. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Runtime.Numerics.dll +0 -0
  127. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Runtime.Serialization.Formatters.dll +0 -0
  128. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Runtime.Serialization.Json.dll +0 -0
  129. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Runtime.Serialization.Primitives.dll +0 -0
  130. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Runtime.Serialization.Xml.dll +0 -0
  131. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Runtime.Serialization.dll +0 -0
  132. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Runtime.dll +0 -0
  133. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Security.AccessControl.dll +0 -0
  134. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Security.Claims.dll +0 -0
  135. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Security.Cryptography.Algorithms.dll +0 -0
  136. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Security.Cryptography.Cng.dll +0 -0
  137. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Security.Cryptography.Csp.dll +0 -0
  138. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Security.Cryptography.Encoding.dll +0 -0
  139. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Security.Cryptography.OpenSsl.dll +0 -0
  140. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Security.Cryptography.Primitives.dll +0 -0
  141. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Security.Cryptography.X509Certificates.dll +0 -0
  142. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Security.Principal.Windows.dll +0 -0
  143. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Security.Principal.dll +0 -0
  144. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Security.SecureString.dll +0 -0
  145. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Security.dll +0 -0
  146. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.ServiceModel.Web.dll +0 -0
  147. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.ServiceProcess.dll +0 -0
  148. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Text.Encoding.CodePages.dll +0 -0
  149. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Text.Encoding.Extensions.dll +0 -0
  150. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Text.Encoding.dll +0 -0
  151. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Text.Encodings.Web.dll +0 -0
  152. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Text.Json.dll +0 -0
  153. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Text.RegularExpressions.dll +0 -0
  154. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Threading.Channels.dll +0 -0
  155. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Threading.Overlapped.dll +0 -0
  156. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Threading.Tasks.Dataflow.dll +0 -0
  157. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Threading.Tasks.Extensions.dll +0 -0
  158. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Threading.Tasks.Parallel.dll +0 -0
  159. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Threading.Tasks.dll +0 -0
  160. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Threading.Thread.dll +0 -0
  161. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Threading.ThreadPool.dll +0 -0
  162. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Threading.Timer.dll +0 -0
  163. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Threading.dll +0 -0
  164. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Transactions.Local.dll +0 -0
  165. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Transactions.dll +0 -0
  166. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.ValueTuple.dll +0 -0
  167. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Web.HttpUtility.dll +0 -0
  168. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Web.dll +0 -0
  169. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Windows.dll +0 -0
  170. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Xml.Linq.dll +0 -0
  171. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Xml.ReaderWriter.dll +0 -0
  172. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Xml.Serialization.dll +0 -0
  173. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Xml.XDocument.dll +0 -0
  174. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Xml.XPath.XDocument.dll +0 -0
  175. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Xml.XPath.dll +0 -0
  176. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Xml.XmlDocument.dll +0 -0
  177. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Xml.XmlSerializer.dll +0 -0
  178. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Xml.dll +0 -0
  179. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.dll +0 -0
  180. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/WindowsBase.dll +0 -0
  181. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/clrcompression.dll +0 -0
  182. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/clretwrc.dll +0 -0
  183. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/clrjit.dll +0 -0
  184. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/coreclr.dll +0 -0
  185. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/createdump.exe +0 -0
  186. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/dbgshim.dll +0 -0
  187. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/hostfxr.dll +0 -0
  188. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/hostpolicy.dll +0 -0
  189. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/mscordaccore.dll +0 -0
  190. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/mscordaccore_amd64_amd64_5.0.521.16609.dll +0 -0
  191. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/mscordbi.dll +0 -0
  192. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/mscorlib.dll +0 -0
  193. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/mscorrc.dll +0 -0
  194. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/netstandard.dll +0 -0
  195. data/distro/ruby_bin_folder/AMD64/vccorlib140.dll +0 -0
  196. data/distro/ruby_bin_folder/AMD64/vcruntime140.dll +0 -0
  197. data/distro/ruby_bin_folder/AMD64/vcruntime140_1.dll +0 -0
  198. data/distro/ruby_bin_folder/x86/Chef.PowerShell.dll +0 -0
  199. data/distro/ruby_bin_folder/x86/Chef.Powershell.Wrapper.dll +0 -0
  200. data/distro/ruby_bin_folder/x86/concrt140.dll +0 -0
  201. data/distro/ruby_bin_folder/x86/msvcp140.dll +0 -0
  202. data/distro/ruby_bin_folder/x86/msvcp140_1.dll +0 -0
  203. data/distro/ruby_bin_folder/x86/msvcp140_2.dll +0 -0
  204. data/distro/ruby_bin_folder/x86/msvcp140_atomic_wait.dll +0 -0
  205. data/distro/ruby_bin_folder/x86/msvcp140_codecvt_ids.dll +0 -0
  206. data/distro/ruby_bin_folder/x86/shared/Microsoft.NETCore.App/5.0.0/Chef.PowerShell.Wrapper.Core.dll +0 -0
  207. data/distro/ruby_bin_folder/x86/shared/Microsoft.NETCore.App/5.0.0/Chef.Powershell.Core.dll +0 -0
  208. data/distro/ruby_bin_folder/x86/shared/Microsoft.NETCore.App/5.0.0/Chef.Powershell.Core.pdb +0 -0
  209. data/distro/ruby_bin_folder/x86/vccorlib140.dll +0 -0
  210. data/distro/ruby_bin_folder/x86/vcruntime140.dll +0 -0
  211. data/lib/chef/application/base.rb +1 -1
  212. data/lib/chef/chef_fs/file_pattern.rb +1 -1
  213. data/lib/chef/chef_fs/path_utils.rb +1 -1
  214. data/lib/chef/compliance/default_attributes.rb +12 -2
  215. data/lib/chef/compliance/runner.rb +51 -5
  216. data/lib/chef/data_collector/run_end_message.rb +1 -1
  217. data/lib/chef/dsl/reboot_pending.rb +1 -1
  218. data/lib/chef/exceptions.rb +10 -0
  219. data/lib/chef/mixin/powershell_exec.rb +6 -5
  220. data/lib/chef/mixin/why_run.rb +8 -2
  221. data/lib/chef/powershell.rb +8 -6
  222. data/lib/chef/provider/cron.rb +6 -3
  223. data/lib/chef/provider/directory.rb +2 -2
  224. data/lib/chef/provider/git.rb +1 -1
  225. data/lib/chef/provider/ifconfig/debian.rb +1 -1
  226. data/lib/chef/provider/ifconfig.rb +4 -4
  227. data/lib/chef/provider/mount/linux.rb +16 -2
  228. data/lib/chef/provider/mount/mount.rb +1 -1
  229. data/lib/chef/provider/package/dnf.rb +1 -1
  230. data/lib/chef/provider/package/habitat.rb +1 -1
  231. data/lib/chef/provider/package/powershell.rb +13 -10
  232. data/lib/chef/provider/package/yum/python_helper.rb +81 -25
  233. data/lib/chef/provider/package/yum.rb +39 -12
  234. data/lib/chef/provider/package/zypper.rb +2 -0
  235. data/lib/chef/provider/package.rb +62 -27
  236. data/lib/chef/provider/subversion.rb +5 -5
  237. data/lib/chef/provider.rb +5 -2
  238. data/lib/chef/providers.rb +0 -1
  239. data/lib/chef/pwsh.rb +3 -2
  240. data/lib/chef/resource/apt_package.rb +2 -2
  241. data/lib/chef/resource/chef_client_config.rb +21 -1
  242. data/lib/chef/resource/chef_client_launchd.rb +1 -1
  243. data/lib/chef/resource/chef_client_trusted_certificate.rb +1 -0
  244. data/lib/chef/resource/chocolatey_config.rb +1 -1
  245. data/lib/chef/resource/chocolatey_feature.rb +1 -1
  246. data/lib/chef/resource/chocolatey_package.rb +3 -3
  247. data/lib/chef/resource/chocolatey_source.rb +24 -2
  248. data/lib/chef/resource/cron/cron.rb +75 -1
  249. data/lib/chef/resource/cron/cron_d.rb +2 -1
  250. data/lib/chef/resource/directory.rb +1 -1
  251. data/lib/chef/resource/dnf_package.rb +4 -6
  252. data/lib/chef/resource/dpkg_package.rb +5 -0
  253. data/lib/chef/resource/execute.rb +1 -4
  254. data/lib/chef/resource/habitat_install.rb +5 -5
  255. data/lib/chef/resource/homebrew_tap.rb +0 -4
  256. data/lib/chef/resource/inspec_waiver.rb +1 -1
  257. data/lib/chef/resource/inspec_waiver_file_entry.rb +1 -1
  258. data/lib/chef/resource/kernel_module.rb +27 -2
  259. data/lib/chef/resource/launchd.rb +0 -3
  260. data/lib/chef/resource/macos_userdefaults.rb +41 -131
  261. data/lib/chef/resource/powershell_package_source.rb +8 -8
  262. data/lib/chef/resource/rhsm_register.rb +31 -0
  263. data/lib/chef/resource/support/client.erb +7 -0
  264. data/lib/chef/resource/windows_auto_run.rb +1 -1
  265. data/lib/chef/resource/windows_dfs_namespace.rb +2 -2
  266. data/lib/chef/resource/windows_feature_powershell.rb +8 -9
  267. data/lib/chef/resource/windows_task.rb +25 -10
  268. data/lib/chef/resource/windows_update_settings.rb +3 -3
  269. data/lib/chef/resource.rb +2 -2
  270. data/lib/chef/resource_reporter.rb +1 -1
  271. data/lib/chef/secret_fetcher/azure_key_vault.rb +64 -8
  272. data/lib/chef/secret_fetcher/hashi_vault.rb +37 -3
  273. data/lib/chef/secret_fetcher.rb +0 -1
  274. data/lib/chef/version.rb +1 -1
  275. data/spec/functional/dsl/reboot_pending_spec.rb +3 -3
  276. data/spec/functional/dsl/registry_helper_spec.rb +1 -1
  277. data/spec/functional/resource/dnf_package_spec.rb +138 -124
  278. data/spec/functional/resource/dpkg_package_spec.rb +16 -0
  279. data/spec/functional/resource/dsc_script_spec.rb +2 -2
  280. data/spec/functional/resource/macos_userdefaults_spec.rb +139 -0
  281. data/spec/functional/resource/registry_spec.rb +81 -81
  282. data/spec/functional/resource/yum_package_spec.rb +789 -129
  283. data/spec/functional/resource/zypper_package_spec.rb +7 -0
  284. data/spec/functional/win32/registry_spec.rb +8 -8
  285. data/spec/integration/client/client_spec.rb +31 -0
  286. data/spec/unit/application/base_spec.rb +40 -0
  287. data/spec/unit/compliance/runner_spec.rb +62 -1
  288. data/spec/unit/data_collector_spec.rb +24 -1
  289. data/spec/unit/dsl/reboot_pending_spec.rb +1 -1
  290. data/spec/unit/file_access_control_spec.rb +1 -1
  291. data/spec/unit/mixin/default_paths_spec.rb +1 -1
  292. data/spec/unit/mixin/securable_spec.rb +3 -3
  293. data/spec/unit/mixin/why_run_spec.rb +53 -0
  294. data/spec/unit/provider/cron_spec.rb +45 -0
  295. data/spec/unit/provider/group/groupadd_spec.rb +1 -0
  296. data/spec/unit/provider/group/usermod_spec.rb +2 -2
  297. data/spec/unit/provider/ifconfig_spec.rb +2 -0
  298. data/spec/unit/provider/mount/linux_spec.rb +16 -3
  299. data/spec/unit/provider/package/bff_spec.rb +1 -0
  300. data/spec/unit/provider/package/powershell_spec.rb +114 -114
  301. data/spec/unit/provider/package/rubygems_spec.rb +8 -5
  302. data/spec/unit/provider/package/solaris_spec.rb +1 -0
  303. data/spec/unit/provider/package/windows_spec.rb +1 -1
  304. data/spec/unit/provider/registry_key_spec.rb +4 -4
  305. data/spec/unit/provider/service/arch_service_spec.rb +2 -2
  306. data/spec/unit/provider/service/debian_service_spec.rb +1 -0
  307. data/spec/unit/provider/service/gentoo_service_spec.rb +1 -0
  308. data/spec/unit/provider/service/macosx_spec.rb +1 -0
  309. data/spec/unit/provider/service/redhat_spec.rb +4 -1
  310. data/spec/unit/provider/service/simple_service_spec.rb +6 -4
  311. data/spec/unit/provider/service/windows_spec.rb +5 -5
  312. data/spec/unit/provider/subversion_spec.rb +4 -4
  313. data/spec/unit/provider/user_spec.rb +2 -0
  314. data/spec/unit/provider/windows_env_spec.rb +1 -1
  315. data/spec/unit/provider/zypper_repository_spec.rb +1 -1
  316. data/spec/unit/resource/chef_client_trusted_certificate_spec.rb +14 -0
  317. data/spec/unit/resource/chocolatey_config_spec.rb +1 -1
  318. data/spec/unit/resource/chocolatey_feature_spec.rb +1 -1
  319. data/spec/unit/resource/chocolatey_source_spec.rb +1 -1
  320. data/spec/unit/resource/dpkg_package_spec.rb +12 -0
  321. data/spec/unit/resource/kernel_module_spec.rb +2 -1
  322. data/spec/unit/resource/macos_user_defaults_spec.rb +36 -96
  323. data/spec/unit/resource/registry_key_spec.rb +10 -10
  324. data/spec/unit/resource/rhsm_register_spec.rb +42 -0
  325. data/spec/unit/resource/windows_auto_run_spec.rb +1 -1
  326. data/spec/unit/resource/windows_feature_powershell_spec.rb +1 -1
  327. data/spec/unit/resource/windows_firewall_rule_spec.rb +2 -2
  328. data/spec/unit/resource/windows_task_spec.rb +3 -3
  329. data/spec/unit/resource_reporter_spec.rb +2 -2
  330. data/spec/unit/resource_spec.rb +5 -0
  331. data/spec/unit/secret_fetcher/azure_key_vault_spec.rb +99 -20
  332. data/spec/unit/secret_fetcher/hashi_vault_spec.rb +46 -0
  333. data/spec/unit/util/backup_spec.rb +1 -1
  334. data/spec/unit/win32/registry_spec.rb +3 -3
  335. metadata +25 -10
  336. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/mscordaccore_amd64_amd64_5.0.20.51904.dll +0 -0
  337. data/lib/chef/provider/group/suse.rb +0 -82
  338. data/spec/unit/provider/group/suse_spec.rb +0 -90
@@ -87,7 +87,7 @@ describe Chef::Resource::DnfPackage, :requires_root, external: exclude_test do
87
87
  options default_options
88
88
  action :install
89
89
  end.should_be_updated
90
- expect(shell_out("rpm -q --queryformat '%{NAME}-%{VERSION}-%{RELEASE}.%{ARCH}\n' chef_rpm").stdout.chomp).to match("^chef_rpm-1.10-1.#{pkg_arch}$")
90
+ expect_matching_installed_version("^chef_rpm-1.10-1.#{pkg_arch}$")
91
91
  end
92
92
 
93
93
  it "does not install if the package is installed" do
@@ -104,12 +104,12 @@ describe Chef::Resource::DnfPackage, :requires_root, external: exclude_test do
104
104
  options default_options
105
105
  action :install
106
106
  end.should_be_updated
107
- expect(shell_out("rpm -q --queryformat '%{NAME}-%{VERSION}-%{RELEASE}.%{ARCH}\n' chef_rpm").stdout.chomp).to match("^chef_rpm-1.10-1.#{pkg_arch}$")
107
+ expect_matching_installed_version("^chef_rpm-1.10-1.#{pkg_arch}$")
108
108
  dnf_package "chef_rpm" do
109
109
  options default_options
110
110
  action :install
111
111
  end.should_not_be_updated
112
- expect(shell_out("rpm -q --queryformat '%{NAME}-%{VERSION}-%{RELEASE}.%{ARCH}\n' chef_rpm").stdout.chomp).to match("^chef_rpm-1.10-1.#{pkg_arch}$")
112
+ expect_matching_installed_version("^chef_rpm-1.10-1.#{pkg_arch}$")
113
113
  end
114
114
 
115
115
  it "does not install if the prior version package is installed" do
@@ -118,7 +118,7 @@ describe Chef::Resource::DnfPackage, :requires_root, external: exclude_test do
118
118
  options default_options
119
119
  action :install
120
120
  end.should_not_be_updated
121
- expect(shell_out("rpm -q --queryformat '%{NAME}-%{VERSION}-%{RELEASE}.%{ARCH}\n' chef_rpm").stdout.chomp).to match("^chef_rpm-1.2-1.#{pkg_arch}$")
121
+ expect_matching_installed_version("^chef_rpm-1.2-1.#{pkg_arch}$")
122
122
  end
123
123
 
124
124
  it "does not install if the i686 package is installed", :intel_64bit do
@@ -128,7 +128,7 @@ describe Chef::Resource::DnfPackage, :requires_root, external: exclude_test do
128
128
  options default_options
129
129
  action :install
130
130
  end.should_not_be_updated
131
- expect(shell_out("rpm -q --queryformat '%{NAME}-%{VERSION}-%{RELEASE}.%{ARCH}\n' chef_rpm").stdout.chomp).to match("^chef_rpm-1.10-1.i686$")
131
+ expect_matching_installed_version("^chef_rpm-1.10-1.i686$")
132
132
  end
133
133
 
134
134
  it "does not install if the prior version i686 package is installed", :intel_64bit do
@@ -138,7 +138,7 @@ describe Chef::Resource::DnfPackage, :requires_root, external: exclude_test do
138
138
  options default_options
139
139
  action :install
140
140
  end.should_not_be_updated
141
- expect(shell_out("rpm -q --queryformat '%{NAME}-%{VERSION}-%{RELEASE}.%{ARCH}\n' chef_rpm").stdout.chomp).to match("^chef_rpm-1.2-1.i686$")
141
+ expect_matching_installed_version("^chef_rpm-1.2-1.i686$")
142
142
  end
143
143
  end
144
144
 
@@ -221,7 +221,7 @@ describe Chef::Resource::DnfPackage, :requires_root, external: exclude_test do
221
221
  version vstring
222
222
  action :install
223
223
  end.should_not_be_updated
224
- expect(shell_out("rpm -q --queryformat '%{NAME}-%{VERSION}-%{RELEASE}.%{ARCH}\n' chef_rpm").stdout.chomp).to match("^chef_rpm-1.2-1.#{pkg_arch}$")
224
+ expect_matching_installed_version("^chef_rpm-1.2-1.#{pkg_arch}$")
225
225
  end
226
226
  end
227
227
 
@@ -233,7 +233,7 @@ describe Chef::Resource::DnfPackage, :requires_root, external: exclude_test do
233
233
  version vstring
234
234
  action :upgrade
235
235
  end.should_not_be_updated
236
- expect(shell_out("rpm -q --queryformat '%{NAME}-%{VERSION}-%{RELEASE}.%{ARCH}\n' chef_rpm").stdout.chomp).to match("^chef_rpm-1.2-1.#{pkg_arch}$")
236
+ expect_matching_installed_version("^chef_rpm-1.2-1.#{pkg_arch}$")
237
237
  end
238
238
  end
239
239
 
@@ -245,7 +245,7 @@ describe Chef::Resource::DnfPackage, :requires_root, external: exclude_test do
245
245
  version vstring
246
246
  action :upgrade
247
247
  end.should_be_updated
248
- expect(shell_out("rpm -q --queryformat '%{NAME}-%{VERSION}-%{RELEASE}.%{ARCH}\n' chef_rpm").stdout.chomp).to match("^chef_rpm-1.10-1.#{pkg_arch}$")
248
+ expect_matching_installed_version("^chef_rpm-1.10-1.#{pkg_arch}$")
249
249
  dnf_package "chef_rpm" do
250
250
  options default_options
251
251
  version vstring
@@ -262,7 +262,7 @@ describe Chef::Resource::DnfPackage, :requires_root, external: exclude_test do
262
262
  options default_options
263
263
  action :install
264
264
  end.should_be_updated
265
- expect(shell_out("rpm -q --queryformat '%{NAME}-%{VERSION}-%{RELEASE}.%{ARCH}\n' chef_rpm").stdout.chomp).to match("^chef_rpm-1.10-1.#{pkg_arch}$")
265
+ expect_matching_installed_version("^chef_rpm-1.10-1.#{pkg_arch}$")
266
266
  dnf_package "chef_rpm-1.10" do
267
267
  options default_options
268
268
  action :install
@@ -275,7 +275,7 @@ describe Chef::Resource::DnfPackage, :requires_root, external: exclude_test do
275
275
  options default_options
276
276
  action :install
277
277
  end.should_be_updated
278
- expect(shell_out("rpm -q --queryformat '%{NAME}-%{VERSION}-%{RELEASE}.%{ARCH}\n' chef_rpm").stdout.chomp).to match("^chef_rpm-1.2-1.#{pkg_arch}$")
278
+ expect_matching_installed_version("^chef_rpm-1.2-1.#{pkg_arch}$")
279
279
  dnf_package "chef_rpm-1.2" do
280
280
  options default_options
281
281
  action :install
@@ -288,7 +288,7 @@ describe Chef::Resource::DnfPackage, :requires_root, external: exclude_test do
288
288
  options default_options
289
289
  action :install
290
290
  end.should_be_updated
291
- expect(shell_out("rpm -q --queryformat '%{NAME}-%{VERSION}-%{RELEASE}.%{ARCH}\n' chef_rpm").stdout.chomp).to match("^chef_rpm-1.2-1.#{pkg_arch}$")
291
+ expect_matching_installed_version("^chef_rpm-1.2-1.#{pkg_arch}$")
292
292
  dnf_package "chef_rpm-0:1.2-1.#{pkg_arch}" do
293
293
  options default_options
294
294
  action :install
@@ -301,7 +301,7 @@ describe Chef::Resource::DnfPackage, :requires_root, external: exclude_test do
301
301
  options default_options
302
302
  action :install
303
303
  end.should_be_updated
304
- expect(shell_out("rpm -q --queryformat '%{NAME}-%{VERSION}-%{RELEASE}.%{ARCH}\n' chef_rpm").stdout.chomp).to match("^chef_rpm-1.2-1.#{pkg_arch}$")
304
+ expect_matching_installed_version("^chef_rpm-1.2-1.#{pkg_arch}$")
305
305
  dnf_package "chef_rpm-1.2-1" do
306
306
  options default_options
307
307
  action :install
@@ -314,7 +314,7 @@ describe Chef::Resource::DnfPackage, :requires_root, external: exclude_test do
314
314
  options default_options
315
315
  action :install
316
316
  end.should_be_updated
317
- expect(shell_out("rpm -q --queryformat '%{NAME}-%{VERSION}-%{RELEASE}.%{ARCH}\n' chef_rpm").stdout.chomp).to match("^chef_rpm-1.10-1.#{pkg_arch}$")
317
+ expect_matching_installed_version("^chef_rpm-1.10-1.#{pkg_arch}$")
318
318
  dnf_package "chef_rpm-1*" do
319
319
  options default_options
320
320
  action :install
@@ -327,7 +327,7 @@ describe Chef::Resource::DnfPackage, :requires_root, external: exclude_test do
327
327
  options default_options
328
328
  action :install
329
329
  end.should_be_updated
330
- expect(shell_out("rpm -q --queryformat '%{NAME}-%{VERSION}-%{RELEASE}.%{ARCH}\n' chef_rpm").stdout.chomp).to match("^chef_rpm-1.10-1.#{pkg_arch}$")
330
+ expect_matching_installed_version("^chef_rpm-1.10-1.#{pkg_arch}$")
331
331
  dnf_package "chef_rp*-1*" do
332
332
  options default_options
333
333
  action :install
@@ -340,7 +340,7 @@ describe Chef::Resource::DnfPackage, :requires_root, external: exclude_test do
340
340
  options default_options
341
341
  action :install
342
342
  end.should_be_updated
343
- expect(shell_out("rpm -q --queryformat '%{NAME}-%{VERSION}-%{RELEASE}.%{ARCH}\n' chef_rpm").stdout.chomp).to match("^chef_rpm-1.10-1.#{pkg_arch}")
343
+ expect_matching_installed_version("^chef_rpm-1.10-1.#{pkg_arch}")
344
344
  dnf_package "chef_rpm-1.10" do
345
345
  options default_options
346
346
  action :install
@@ -353,7 +353,7 @@ describe Chef::Resource::DnfPackage, :requires_root, external: exclude_test do
353
353
  options default_options
354
354
  action :install
355
355
  end.should_be_updated
356
- expect(shell_out("rpm -q --queryformat '%{NAME}-%{VERSION}-%{RELEASE}.%{ARCH}\n' chef_rpm").stdout.chomp).to match("^chef_rpm-1.2-1.#{pkg_arch}$")
356
+ expect_matching_installed_version("^chef_rpm-1.2-1.#{pkg_arch}$")
357
357
  dnf_package "chef_rpm-1.2" do
358
358
  options default_options
359
359
  action :install
@@ -370,7 +370,7 @@ describe Chef::Resource::DnfPackage, :requires_root, external: exclude_test do
370
370
  version "1.10"
371
371
  action :install
372
372
  end.should_be_updated
373
- expect(shell_out("rpm -q --queryformat '%{NAME}-%{VERSION}-%{RELEASE}.%{ARCH}\n' chef_rpm").stdout.chomp).to match("^chef_rpm-1.10-1.#{pkg_arch}$")
373
+ expect_matching_installed_version("^chef_rpm-1.10-1.#{pkg_arch}$")
374
374
  dnf_package "chef_rpm" do
375
375
  options default_options
376
376
  version "1.10"
@@ -385,7 +385,7 @@ describe Chef::Resource::DnfPackage, :requires_root, external: exclude_test do
385
385
  version "1*"
386
386
  action :install
387
387
  end.should_be_updated
388
- expect(shell_out("rpm -q --queryformat '%{NAME}-%{VERSION}-%{RELEASE}.%{ARCH}\n' chef_rpm").stdout.chomp).to match("^chef_rpm-1.10-1.#{pkg_arch}$")
388
+ expect_matching_installed_version("^chef_rpm-1.10-1.#{pkg_arch}$")
389
389
  dnf_package "chef_rpm" do
390
390
  options default_options
391
391
  version "1*"
@@ -400,7 +400,7 @@ describe Chef::Resource::DnfPackage, :requires_root, external: exclude_test do
400
400
  version "1.10-1"
401
401
  action :install
402
402
  end.should_be_updated
403
- expect(shell_out("rpm -q --queryformat '%{NAME}-%{VERSION}-%{RELEASE}.%{ARCH}\n' chef_rpm").stdout.chomp).to match("^chef_rpm-1.10-1.#{pkg_arch}$")
403
+ expect_matching_installed_version("^chef_rpm-1.10-1.#{pkg_arch}$")
404
404
  dnf_package "chef_rpm" do
405
405
  options default_options
406
406
  version "1.10-1"
@@ -415,7 +415,7 @@ describe Chef::Resource::DnfPackage, :requires_root, external: exclude_test do
415
415
  version "0:1.10-1"
416
416
  action :install
417
417
  end.should_be_updated
418
- expect(shell_out("rpm -q --queryformat '%{NAME}-%{VERSION}-%{RELEASE}.%{ARCH}\n' chef_rpm").stdout.chomp).to match("^chef_rpm-1.10-1.#{pkg_arch}$")
418
+ expect_matching_installed_version("^chef_rpm-1.10-1.#{pkg_arch}$")
419
419
  dnf_package "chef_rpm" do
420
420
  options default_options
421
421
  version "0:1.10-1"
@@ -430,7 +430,7 @@ describe Chef::Resource::DnfPackage, :requires_root, external: exclude_test do
430
430
  version "1.10-1*"
431
431
  action :install
432
432
  end.should_be_updated
433
- expect(shell_out("rpm -q --queryformat '%{NAME}-%{VERSION}-%{RELEASE}.%{ARCH}\n' chef_rpm").stdout.chomp).to match("^chef_rpm-1.10-1.#{pkg_arch}$")
433
+ expect_matching_installed_version("^chef_rpm-1.10-1.#{pkg_arch}$")
434
434
  dnf_package "chef_rpm" do
435
435
  options default_options
436
436
  version "1.10-1*"
@@ -445,7 +445,7 @@ describe Chef::Resource::DnfPackage, :requires_root, external: exclude_test do
445
445
  version "0:1.10-1*"
446
446
  action :install
447
447
  end.should_be_updated
448
- expect(shell_out("rpm -q --queryformat '%{NAME}-%{VERSION}-%{RELEASE}.%{ARCH}\n' chef_rpm").stdout.chomp).to match("^chef_rpm-1.10-1.#{pkg_arch}$")
448
+ expect_matching_installed_version("^chef_rpm-1.10-1.#{pkg_arch}$")
449
449
  dnf_package "chef_rpm" do
450
450
  options default_options
451
451
  version "0:1.10-1*"
@@ -455,7 +455,7 @@ describe Chef::Resource::DnfPackage, :requires_root, external: exclude_test do
455
455
  end
456
456
 
457
457
  context "downgrades" do
458
- it "downgrades the package when allow_downgrade" do
458
+ it "downgrades the package when allow_downgrade is true" do
459
459
  flush_cache
460
460
  preinstall("chef_rpm-1.10-1.#{pkg_arch}.rpm")
461
461
  dnf_package "chef_rpm" do
@@ -463,12 +463,24 @@ describe Chef::Resource::DnfPackage, :requires_root, external: exclude_test do
463
463
  version "1.2-1"
464
464
  action :install
465
465
  end.should_be_updated
466
- expect(shell_out("rpm -q --queryformat '%{NAME}-%{VERSION}-%{RELEASE}.%{ARCH}\n' chef_rpm").stdout.chomp).to match("^chef_rpm-1.2-1.#{pkg_arch}$")
466
+ expect_matching_installed_version("^chef_rpm-1.2-1.#{pkg_arch}$")
467
+ dnf_package "chef_rpm" do
468
+ options default_options
469
+ version "1.2-1"
470
+ action :install
471
+ end.should_not_be_updated
472
+ end
473
+
474
+ it "does not downgrade the package when allow_downgrade is false" do
475
+ flush_cache
476
+ preinstall("chef_rpm-1.10-1.#{pkg_arch}.rpm")
467
477
  dnf_package "chef_rpm" do
468
478
  options default_options
479
+ allow_downgrade false
469
480
  version "1.2-1"
470
481
  action :install
471
482
  end.should_not_be_updated
483
+ expect_matching_installed_version("^chef_rpm-1.10-1.#{pkg_arch}$")
472
484
  end
473
485
  end
474
486
 
@@ -479,7 +491,7 @@ describe Chef::Resource::DnfPackage, :requires_root, external: exclude_test do
479
491
  options default_options
480
492
  action :install
481
493
  end.should_be_updated
482
- expect(shell_out("rpm -q --queryformat '%{NAME}-%{VERSION}-%{RELEASE}.%{ARCH}\n' chef_rpm").stdout.chomp).to match("^chef_rpm-1.10-1.#{pkg_arch}$")
494
+ expect_matching_installed_version("^chef_rpm-1.10-1.#{pkg_arch}$")
483
495
  dnf_package "chef_rpm.#{pkg_arch}" do
484
496
  options default_options
485
497
  action :install
@@ -492,7 +504,7 @@ describe Chef::Resource::DnfPackage, :requires_root, external: exclude_test do
492
504
  options default_options
493
505
  action :install
494
506
  end.should_be_updated
495
- expect(shell_out("rpm -q --queryformat '%{NAME}-%{VERSION}-%{RELEASE}.%{ARCH}\n' chef_rpm").stdout.chomp).to match("^chef_rpm-1.10-1.i686$")
507
+ expect_matching_installed_version("^chef_rpm-1.10-1.i686$")
496
508
  dnf_package "chef_rpm.i686" do
497
509
  options default_options
498
510
  action :install
@@ -506,7 +518,7 @@ describe Chef::Resource::DnfPackage, :requires_root, external: exclude_test do
506
518
  arch pkg_arch
507
519
  action :install
508
520
  end.should_be_updated
509
- expect(shell_out("rpm -q --queryformat '%{NAME}-%{VERSION}-%{RELEASE}.%{ARCH}\n' chef_rpm").stdout.chomp).to match("^chef_rpm-1.10-1.#{pkg_arch}$")
521
+ expect_matching_installed_version("^chef_rpm-1.10-1.#{pkg_arch}$")
510
522
  dnf_package "chef_rpm" do
511
523
  options default_options
512
524
  arch pkg_arch
@@ -521,7 +533,7 @@ describe Chef::Resource::DnfPackage, :requires_root, external: exclude_test do
521
533
  arch "i686"
522
534
  action :install
523
535
  end.should_be_updated
524
- expect(shell_out("rpm -q --queryformat '%{NAME}-%{VERSION}-%{RELEASE}.%{ARCH}\n' chef_rpm").stdout.chomp).to match("^chef_rpm-1.10-1.i686$")
536
+ expect_matching_installed_version("^chef_rpm-1.10-1.i686$")
525
537
  dnf_package "chef_rpm" do
526
538
  options default_options
527
539
  arch "i686"
@@ -536,7 +548,7 @@ describe Chef::Resource::DnfPackage, :requires_root, external: exclude_test do
536
548
  version "1.10-1"
537
549
  action :install
538
550
  end.should_be_updated
539
- expect(shell_out("rpm -q --queryformat '%{NAME}-%{VERSION}-%{RELEASE}.%{ARCH}\n' chef_rpm").stdout.chomp).to match("^chef_rpm-1.10-1.i686$")
551
+ expect_matching_installed_version("^chef_rpm-1.10-1.i686$")
540
552
  dnf_package "chef_rpm.i686" do
541
553
  options default_options
542
554
  version "1.10-1"
@@ -551,7 +563,7 @@ describe Chef::Resource::DnfPackage, :requires_root, external: exclude_test do
551
563
  version "1.10-1"
552
564
  action :install
553
565
  end.should_be_updated
554
- expect(shell_out("rpm -q --queryformat '%{NAME}-%{VERSION}-%{RELEASE}.%{ARCH}\n' chef_rpm").stdout.chomp).to match("^chef_rpm-1.10-1.#{pkg_arch}$")
566
+ expect_matching_installed_version("^chef_rpm-1.10-1.#{pkg_arch}$")
555
567
  dnf_package "chef_rpm.#{pkg_arch}" do
556
568
  options default_options
557
569
  version "1.10-1"
@@ -567,7 +579,7 @@ describe Chef::Resource::DnfPackage, :requires_root, external: exclude_test do
567
579
  options default_options
568
580
  action :install
569
581
  end.should_be_updated
570
- expect(shell_out("rpm -q --queryformat '%{NAME}-%{VERSION}-%{RELEASE}.%{ARCH}\n' chef_rpm").stdout.chomp).to match("^chef_rpm-1.10-1.#{pkg_arch}$")
582
+ expect_matching_installed_version("^chef_rpm-1.10-1.#{pkg_arch}$")
571
583
  dnf_package "chef_rpm >= 1.2" do
572
584
  options default_options
573
585
  action :install
@@ -580,7 +592,7 @@ describe Chef::Resource::DnfPackage, :requires_root, external: exclude_test do
580
592
  options default_options
581
593
  action :install
582
594
  end.should_not_be_updated
583
- expect(shell_out("rpm -q --queryformat '%{NAME}-%{VERSION}-%{RELEASE}.%{ARCH}\n' chef_rpm").stdout.chomp).to match("^chef_rpm-1.2-1.#{pkg_arch}$")
595
+ expect_matching_installed_version("^chef_rpm-1.2-1.#{pkg_arch}$")
584
596
  end
585
597
 
586
598
  it "when it is met, it does nothing" do
@@ -589,7 +601,7 @@ describe Chef::Resource::DnfPackage, :requires_root, external: exclude_test do
589
601
  options default_options
590
602
  action :install
591
603
  end.should_not_be_updated
592
- expect(shell_out("rpm -q --queryformat '%{NAME}-%{VERSION}-%{RELEASE}.%{ARCH}\n' chef_rpm").stdout.chomp).to match("^chef_rpm-1.10-1.#{pkg_arch}$")
604
+ expect_matching_installed_version("^chef_rpm-1.10-1.#{pkg_arch}$")
593
605
  end
594
606
 
595
607
  it "with nothing installed, it installs the latest version" do
@@ -598,7 +610,7 @@ describe Chef::Resource::DnfPackage, :requires_root, external: exclude_test do
598
610
  options default_options
599
611
  action :install
600
612
  end.should_be_updated
601
- expect(shell_out("rpm -q --queryformat '%{NAME}-%{VERSION}-%{RELEASE}.%{ARCH}\n' chef_rpm").stdout.chomp).to match("^chef_rpm-1.10-1.#{pkg_arch}$")
613
+ expect_matching_installed_version("^chef_rpm-1.10-1.#{pkg_arch}$")
602
614
  dnf_package "chef_rpm > 1.2" do
603
615
  options default_options
604
616
  action :install
@@ -611,7 +623,7 @@ describe Chef::Resource::DnfPackage, :requires_root, external: exclude_test do
611
623
  options default_options
612
624
  action :install
613
625
  end.should_be_updated
614
- expect(shell_out("rpm -q --queryformat '%{NAME}-%{VERSION}-%{RELEASE}.%{ARCH}\n' chef_rpm").stdout.chomp).to match("^chef_rpm-1.10-1.#{pkg_arch}$")
626
+ expect_matching_installed_version("^chef_rpm-1.10-1.#{pkg_arch}$")
615
627
  dnf_package "chef_rpm > 1.2" do
616
628
  options default_options
617
629
  action :install
@@ -624,7 +636,7 @@ describe Chef::Resource::DnfPackage, :requires_root, external: exclude_test do
624
636
  options default_options
625
637
  action :install
626
638
  end.should_be_updated
627
- expect(shell_out("rpm -q --queryformat '%{NAME}-%{VERSION}-%{RELEASE}.%{ARCH}\n' chef_rpm").stdout.chomp).to match("^chef_rpm-1.10-1.#{pkg_arch}$")
639
+ expect_matching_installed_version("^chef_rpm-1.10-1.#{pkg_arch}$")
628
640
  dnf_package "chef_rpm = 1.10" do
629
641
  options default_options
630
642
  action :install
@@ -637,7 +649,7 @@ describe Chef::Resource::DnfPackage, :requires_root, external: exclude_test do
637
649
  options default_options
638
650
  action :install
639
651
  end.should_not_be_updated
640
- expect(shell_out("rpm -q --queryformat '%{NAME}-%{VERSION}-%{RELEASE}.%{ARCH}\n' chef_rpm").stdout.chomp).to match("^chef_rpm-1.2-1.#{pkg_arch}$")
652
+ expect_matching_installed_version("^chef_rpm-1.2-1.#{pkg_arch}$")
641
653
  end
642
654
 
643
655
  it "when it is met by an installed rpm, it does nothing" do
@@ -646,7 +658,7 @@ describe Chef::Resource::DnfPackage, :requires_root, external: exclude_test do
646
658
  options default_options
647
659
  action :install
648
660
  end.should_not_be_updated
649
- expect(shell_out("rpm -q --queryformat '%{NAME}-%{VERSION}-%{RELEASE}.%{ARCH}\n' chef_rpm").stdout.chomp).to match("^chef_rpm-1.10-1.#{pkg_arch}$")
661
+ expect_matching_installed_version("^chef_rpm-1.10-1.#{pkg_arch}$")
650
662
  end
651
663
 
652
664
  it "when there is no solution to the contraint" do
@@ -669,7 +681,7 @@ describe Chef::Resource::DnfPackage, :requires_root, external: exclude_test do
669
681
  options default_options
670
682
  action :install
671
683
  end.should_be_updated
672
- expect(shell_out("rpm -q --queryformat '%{NAME}-%{VERSION}-%{RELEASE}.%{ARCH}\n' chef_rpm").stdout.chomp).to match("^chef_rpm-1.2-1.#{pkg_arch}$")
684
+ expect_matching_installed_version("^chef_rpm-1.2-1.#{pkg_arch}$")
673
685
  dnf_package "chef_rpm < 1.10" do
674
686
  options default_options
675
687
  action :install
@@ -682,7 +694,7 @@ describe Chef::Resource::DnfPackage, :requires_root, external: exclude_test do
682
694
  options default_options
683
695
  action :install
684
696
  end.should_not_be_updated
685
- expect(shell_out("rpm -q --queryformat '%{NAME}-%{VERSION}-%{RELEASE}.%{ARCH}\n' chef_rpm").stdout.chomp).to match("^chef_rpm-1.2-1.#{pkg_arch}$")
697
+ expect_matching_installed_version("^chef_rpm-1.2-1.#{pkg_arch}$")
686
698
  end
687
699
 
688
700
  it "with a less than constraint, when the install version fails, it should downgrade" do
@@ -691,7 +703,7 @@ describe Chef::Resource::DnfPackage, :requires_root, external: exclude_test do
691
703
  options default_options
692
704
  action :install
693
705
  end.should_be_updated
694
- expect(shell_out("rpm -q --queryformat '%{NAME}-%{VERSION}-%{RELEASE}.%{ARCH}\n' chef_rpm").stdout.chomp).to match("^chef_rpm-1.2-1.#{pkg_arch}$")
706
+ expect_matching_installed_version("^chef_rpm-1.2-1.#{pkg_arch}$")
695
707
  dnf_package "chef_rpm < 1.10" do
696
708
  options default_options
697
709
  action :install
@@ -725,7 +737,7 @@ describe Chef::Resource::DnfPackage, :requires_root, external: exclude_test do
725
737
  name "something"
726
738
  action :install
727
739
  end.should_be_updated
728
- expect(shell_out("rpm -q --queryformat '%{NAME}-%{VERSION}-%{RELEASE}.%{ARCH}\n' chef_rpm").stdout.chomp).to match("^chef_rpm-1.2-1.#{pkg_arch}$")
740
+ expect_matching_installed_version("^chef_rpm-1.2-1.#{pkg_arch}$")
729
741
  dnf_package "something" do
730
742
  source("#{CHEF_SPEC_ASSETS}/yumrepo/chef_rpm-1.2-1.#{pkg_arch}.rpm")
731
743
  options default_options
@@ -741,7 +753,7 @@ describe Chef::Resource::DnfPackage, :requires_root, external: exclude_test do
741
753
  options default_options
742
754
  action :install
743
755
  end.should_be_updated
744
- expect(shell_out("rpm -q --queryformat '%{NAME}-%{VERSION}-%{RELEASE}.%{ARCH}\n' chef_rpm").stdout.chomp).to match("^chef_rpm-1.2-1.#{pkg_arch}$")
756
+ expect_matching_installed_version("^chef_rpm-1.2-1.#{pkg_arch}$")
745
757
  dnf_package "#{CHEF_SPEC_ASSETS}/yumrepo/chef_rpm-1.2-1.#{pkg_arch}.rpm" do
746
758
  options default_options
747
759
  action :install
@@ -755,7 +767,7 @@ describe Chef::Resource::DnfPackage, :requires_root, external: exclude_test do
755
767
  version "1.2-1"
756
768
  action :install
757
769
  end.should_be_updated
758
- expect(shell_out("rpm -q --queryformat '%{NAME}-%{VERSION}-%{RELEASE}.%{ARCH}\n' chef_rpm").stdout.chomp).to match("^chef_rpm-1.2-1.#{pkg_arch}$")
770
+ expect_matching_installed_version("^chef_rpm-1.2-1.#{pkg_arch}$")
759
771
  dnf_package "#{CHEF_SPEC_ASSETS}/yumrepo/chef_rpm-1.2-1.#{pkg_arch}.rpm" do
760
772
  options default_options
761
773
  version "1.2-1"
@@ -763,13 +775,24 @@ describe Chef::Resource::DnfPackage, :requires_root, external: exclude_test do
763
775
  end.should_not_be_updated
764
776
  end
765
777
 
778
+ it "downgrade on a local file with allow_downgrade false does not downgrade" do
779
+ preinstall("chef_rpm-1.10-1.#{pkg_arch}.rpm")
780
+ dnf_package "#{CHEF_SPEC_ASSETS}/yumrepo/chef_rpm-1.2-1.#{pkg_arch}.rpm" do
781
+ options default_options
782
+ allow_downgrade false
783
+ version "1.2-1"
784
+ action :install
785
+ end.should_not_be_updated
786
+ expect_matching_installed_version("^chef_rpm-1.10-1.#{pkg_arch}$")
787
+ end
788
+
766
789
  it "does not downgrade the package with :install" do
767
790
  preinstall("chef_rpm-1.10-1.#{pkg_arch}.rpm")
768
791
  dnf_package "#{CHEF_SPEC_ASSETS}/yumrepo/chef_rpm-1.2-1.#{pkg_arch}.rpm" do
769
792
  options default_options
770
793
  action :install
771
794
  end.should_not_be_updated
772
- expect(shell_out("rpm -q --queryformat '%{NAME}-%{VERSION}-%{RELEASE}.%{ARCH}\n' chef_rpm").stdout.chomp).to match("^chef_rpm-1.10-1.#{pkg_arch}$")
795
+ expect_matching_installed_version("^chef_rpm-1.10-1.#{pkg_arch}$")
773
796
  end
774
797
 
775
798
  it "does not upgrade the package with :install" do
@@ -778,7 +801,7 @@ describe Chef::Resource::DnfPackage, :requires_root, external: exclude_test do
778
801
  options default_options
779
802
  action :install
780
803
  end.should_not_be_updated
781
- expect(shell_out("rpm -q --queryformat '%{NAME}-%{VERSION}-%{RELEASE}.%{ARCH}\n' chef_rpm").stdout.chomp).to match("^chef_rpm-1.2-1.#{pkg_arch}$")
804
+ expect_matching_installed_version("^chef_rpm-1.2-1.#{pkg_arch}$")
782
805
  end
783
806
 
784
807
  it "is idempotent when the package is already installed" do
@@ -787,7 +810,7 @@ describe Chef::Resource::DnfPackage, :requires_root, external: exclude_test do
787
810
  options default_options
788
811
  action :install
789
812
  end.should_not_be_updated
790
- expect(shell_out("rpm -q --queryformat '%{NAME}-%{VERSION}-%{RELEASE}.%{ARCH}\n' chef_rpm").stdout.chomp).to match("^chef_rpm-1.2-1.#{pkg_arch}$")
813
+ expect_matching_installed_version("^chef_rpm-1.2-1.#{pkg_arch}$")
791
814
  end
792
815
 
793
816
  it "is idempotent when the package is already installed and there is a version string" do
@@ -797,7 +820,7 @@ describe Chef::Resource::DnfPackage, :requires_root, external: exclude_test do
797
820
  version "1.2-1"
798
821
  action :install
799
822
  end.should_not_be_updated
800
- expect(shell_out("rpm -q --queryformat '%{NAME}-%{VERSION}-%{RELEASE}.%{ARCH}\n' chef_rpm").stdout.chomp).to match("^chef_rpm-1.2-1.#{pkg_arch}$")
823
+ expect_matching_installed_version("^chef_rpm-1.2-1.#{pkg_arch}$")
801
824
  end
802
825
  end
803
826
 
@@ -809,7 +832,7 @@ describe Chef::Resource::DnfPackage, :requires_root, external: exclude_test do
809
832
  options "--nogpgcheck --disablerepo=*"
810
833
  action :install
811
834
  end.should_not_be_updated
812
- expect(shell_out("rpm -q --queryformat '%{NAME}-%{VERSION}-%{RELEASE}.%{ARCH}\n' chef_rpm").stdout.chomp).to match("^chef_rpm-1.2-1.#{pkg_arch}$")
835
+ expect_matching_installed_version("^chef_rpm-1.2-1.#{pkg_arch}$")
813
836
  end
814
837
 
815
838
  it "works with a local source" do
@@ -819,7 +842,7 @@ describe Chef::Resource::DnfPackage, :requires_root, external: exclude_test do
819
842
  options "--nogpgcheck --disablerepo=*"
820
843
  action :install
821
844
  end.should_be_updated
822
- expect(shell_out("rpm -q --queryformat '%{NAME}-%{VERSION}-%{RELEASE}.%{ARCH}\n' chef_rpm").stdout.chomp).to match("^chef_rpm-1.2-1.#{pkg_arch}$")
845
+ expect_matching_installed_version("^chef_rpm-1.2-1.#{pkg_arch}$")
823
846
  dnf_package "#{CHEF_SPEC_ASSETS}/yumrepo/chef_rpm-1.2-1.#{pkg_arch}.rpm" do
824
847
  options "--nogpgcheck --disablerepo=*"
825
848
  action :install
@@ -834,8 +857,8 @@ describe Chef::Resource::DnfPackage, :requires_root, external: exclude_test do
834
857
  options default_options
835
858
  action :install
836
859
  end.should_be_updated
837
- expect(shell_out("rpm -q --queryformat '%{NAME}-%{VERSION}-%{RELEASE}.%{ARCH}\n' chef_rpm").stdout.chomp).to match(/^chef_rpm-1.10-1.#{pkg_arch}$/)
838
- expect(shell_out("rpm -q --queryformat '%{NAME}-%{VERSION}-%{RELEASE}.%{ARCH}\n' chef_rpm").stdout.chomp).to match(/^chef_rpm-1.10-1.i686$/)
860
+ expect_matching_installed_version(/^chef_rpm-1.10-1.#{pkg_arch}$/)
861
+ expect_matching_installed_version(/^chef_rpm-1.10-1.i686$/)
839
862
  dnf_package [ "chef_rpm.#{pkg_arch}", "chef_rpm.i686" ] do
840
863
  options default_options
841
864
  action :install
@@ -857,8 +880,8 @@ describe Chef::Resource::DnfPackage, :requires_root, external: exclude_test do
857
880
  options default_options
858
881
  action :install
859
882
  end.should_be_updated
860
- expect(shell_out("rpm -q --queryformat '%{NAME}-%{VERSION}-%{RELEASE}.%{ARCH}\n' chef_rpm").stdout.chomp).to match(/^chef_rpm-1.10-1.#{pkg_arch}$/)
861
- expect(shell_out("rpm -q --queryformat '%{NAME}-%{VERSION}-%{RELEASE}.%{ARCH}\n' chef_rpm").stdout.chomp).to match(/^chef_rpm-1.10-1.i686$/)
883
+ expect_matching_installed_version(/^chef_rpm-1.10-1.#{pkg_arch}$/)
884
+ expect_matching_installed_version(/^chef_rpm-1.10-1.i686$/)
862
885
  dnf_package [ "chef_rpm.#{pkg_arch}", "chef_rpm.i686" ] do
863
886
  options default_options
864
887
  action :install
@@ -871,8 +894,8 @@ describe Chef::Resource::DnfPackage, :requires_root, external: exclude_test do
871
894
  options default_options
872
895
  action :install
873
896
  end.should_be_updated
874
- expect(shell_out("rpm -q --queryformat '%{NAME}-%{VERSION}-%{RELEASE}.%{ARCH}\n' chef_rpm").stdout.chomp).to match(/^chef_rpm-1.10-1.#{pkg_arch}$/)
875
- expect(shell_out("rpm -q --queryformat '%{NAME}-%{VERSION}-%{RELEASE}.%{ARCH}\n' chef_rpm").stdout.chomp).to match(/^chef_rpm-1.10-1.i686$/)
897
+ expect_matching_installed_version(/^chef_rpm-1.10-1.#{pkg_arch}$/)
898
+ expect_matching_installed_version(/^chef_rpm-1.10-1.i686$/)
876
899
  dnf_package [ "chef_rpm.#{pkg_arch}", "chef_rpm.i686" ] do
877
900
  options default_options
878
901
  action :install
@@ -887,8 +910,8 @@ describe Chef::Resource::DnfPackage, :requires_root, external: exclude_test do
887
910
  arch [pkg_arch, "i686"]
888
911
  action :install
889
912
  end.should_be_updated
890
- expect(shell_out("rpm -q --queryformat '%{NAME}-%{VERSION}-%{RELEASE}.%{ARCH}\n' chef_rpm").stdout.chomp).to match(/^chef_rpm-1.10-1.#{pkg_arch}$/)
891
- expect(shell_out("rpm -q --queryformat '%{NAME}-%{VERSION}-%{RELEASE}.%{ARCH}\n' chef_rpm").stdout.chomp).to match(/^chef_rpm-1.10-1.i686$/)
913
+ expect_matching_installed_version(/^chef_rpm-1.10-1.#{pkg_arch}$/)
914
+ expect_matching_installed_version(/^chef_rpm-1.10-1.i686$/)
892
915
  dnf_package %w{chef_rpm chef_rpm} do
893
916
  options default_options
894
917
  arch [pkg_arch, "i686"]
@@ -904,8 +927,8 @@ describe Chef::Resource::DnfPackage, :requires_root, external: exclude_test do
904
927
  arch [pkg_arch, "i686"]
905
928
  action :install
906
929
  end.should_be_updated
907
- expect(shell_out("rpm -q --queryformat '%{NAME}-%{VERSION}-%{RELEASE}.%{ARCH}\n' chef_rpm").stdout.chomp).to match(/^chef_rpm-1.10-1.#{pkg_arch}$/)
908
- expect(shell_out("rpm -q --queryformat '%{NAME}-%{VERSION}-%{RELEASE}.%{ARCH}\n' chef_rpm").stdout.chomp).to match(/^chef_rpm-1.10-1.i686$/)
930
+ expect_matching_installed_version(/^chef_rpm-1.10-1.#{pkg_arch}$/)
931
+ expect_matching_installed_version(/^chef_rpm-1.10-1.i686$/)
909
932
  dnf_package %w{chef_rpm chef_rpm} do
910
933
  options default_options
911
934
  action :install
@@ -920,8 +943,8 @@ describe Chef::Resource::DnfPackage, :requires_root, external: exclude_test do
920
943
  arch [pkg_arch, "i686"]
921
944
  action :install
922
945
  end.should_be_updated
923
- expect(shell_out("rpm -q --queryformat '%{NAME}-%{VERSION}-%{RELEASE}.%{ARCH}\n' chef_rpm").stdout.chomp).to match(/^chef_rpm-1.10-1.#{pkg_arch}$/)
924
- expect(shell_out("rpm -q --queryformat '%{NAME}-%{VERSION}-%{RELEASE}.%{ARCH}\n' chef_rpm").stdout.chomp).to match(/^chef_rpm-1.10-1.i686$/)
946
+ expect_matching_installed_version(/^chef_rpm-1.10-1.#{pkg_arch}$/)
947
+ expect_matching_installed_version(/^chef_rpm-1.10-1.i686$/)
925
948
  dnf_package %w{chef_rpm chef_rpm} do
926
949
  options default_options
927
950
  action :install
@@ -956,7 +979,7 @@ describe Chef::Resource::DnfPackage, :requires_root, external: exclude_test do
956
979
  options ["--nogpgcheck", "--disablerepo=*", "--enablerepo=chef-dnf-localtesting"]
957
980
  action :install
958
981
  end.should_be_updated
959
- expect(shell_out("rpm -q --queryformat '%{NAME}-%{VERSION}-%{RELEASE}.%{ARCH}\n' chef_rpm").stdout.chomp).to match("^chef_rpm-1.10-1.#{pkg_arch}$")
982
+ expect_matching_installed_version("^chef_rpm-1.10-1.#{pkg_arch}$")
960
983
  dnf_package "chef_rpm" do
961
984
  options ["--nogpgcheck", "--disablerepo=*", "--enablerepo=chef-dnf-localtesting"]
962
985
  action :install
@@ -977,7 +1000,7 @@ describe Chef::Resource::DnfPackage, :requires_root, external: exclude_test do
977
1000
  options "--nogpgcheck --enablerepo=chef-dnf-localtesting"
978
1001
  action :install
979
1002
  end.should_be_updated
980
- expect(shell_out("rpm -q --queryformat '%{NAME}-%{VERSION}-%{RELEASE}.%{ARCH}\n' chef_rpm").stdout.chomp).to match("^chef_rpm-1.10-1.#{pkg_arch}$")
1003
+ expect_matching_installed_version("^chef_rpm-1.10-1.#{pkg_arch}$")
981
1004
  dnf_package "chef_rpm" do
982
1005
  options "--nogpgcheck --enablerepo=chef-dnf-localtesting"
983
1006
  action :install
@@ -995,14 +1018,14 @@ describe Chef::Resource::DnfPackage, :requires_root, external: exclude_test do
995
1018
  options "--nogpgcheck --disablerepo=chef-dnf-localtesting"
996
1019
  action :upgrade
997
1020
  end.should_not_be_updated
998
- expect(shell_out("rpm -q --queryformat '%{NAME}-%{VERSION}-%{RELEASE}.%{ARCH}\n' chef_rpm").stdout.chomp).to match("^chef_rpm-1.2-1.#{pkg_arch}$")
1021
+ expect_matching_installed_version("^chef_rpm-1.2-1.#{pkg_arch}$")
999
1022
  # now we're still using the same cache in the dnf_helper.py cache and we test to see if the
1000
1023
  # repo that we temporarily disabled is enabled on this pass.
1001
1024
  dnf_package "chef_rpm-1.10-1.#{pkg_arch}" do
1002
1025
  options "--nogpgcheck"
1003
1026
  action :install
1004
1027
  end.should_be_updated
1005
- expect(shell_out("rpm -q --queryformat '%{NAME}-%{VERSION}-%{RELEASE}.%{ARCH}\n' chef_rpm").stdout.chomp).to match("^chef_rpm-1.10-1.#{pkg_arch}$")
1028
+ expect_matching_installed_version("^chef_rpm-1.10-1.#{pkg_arch}$")
1006
1029
  dnf_package "chef_rpm-1.10-1.#{pkg_arch}" do
1007
1030
  options "--nogpgcheck"
1008
1031
  action :install
@@ -1013,7 +1036,7 @@ describe Chef::Resource::DnfPackage, :requires_root, external: exclude_test do
1013
1036
 
1014
1037
  describe ":upgrade" do
1015
1038
  context "downgrades" do
1016
- it "just work with DNF" do
1039
+ it "just works by default" do
1017
1040
  preinstall("chef_rpm-1.10-1.#{pkg_arch}.rpm")
1018
1041
  dnf_package "chef_rpm" do
1019
1042
  options default_options
@@ -1027,25 +1050,6 @@ describe Chef::Resource::DnfPackage, :requires_root, external: exclude_test do
1027
1050
  action :install
1028
1051
  end.should_not_be_updated
1029
1052
  end
1030
-
1031
- it "throws a deprecation warning with allow_downgrade" do
1032
- Chef::Config[:treat_deprecation_warnings_as_errors] = false
1033
- expect(Chef).to receive(:deprecated).at_least(:once).with(:dnf_package_allow_downgrade, /^the allow_downgrade property on the dnf_package provider is not used/)
1034
- preinstall("chef_rpm-1.10-1.#{pkg_arch}.rpm")
1035
- dnf_package "chef_rpm" do
1036
- options default_options
1037
- version "1.2"
1038
- allow_downgrade true
1039
- action :install
1040
- end.should_be_updated
1041
- expect(shell_out("rpm -q chef_rpm").stdout.chomp).to match("^chef_rpm-1.2-1.#{pkg_arch}")
1042
- dnf_package "chef_rpm" do
1043
- options default_options
1044
- version "1.2"
1045
- allow_downgrade true
1046
- action :install
1047
- end.should_not_be_updated
1048
- end
1049
1053
  end
1050
1054
 
1051
1055
  context "with source arguments" do
@@ -1057,7 +1061,7 @@ describe Chef::Resource::DnfPackage, :requires_root, external: exclude_test do
1057
1061
  source("#{CHEF_SPEC_ASSETS}/yumrepo/chef_rpm-1.2-1.#{pkg_arch}.rpm")
1058
1062
  action :upgrade
1059
1063
  end.should_be_updated
1060
- expect(shell_out("rpm -q --queryformat '%{NAME}-%{VERSION}-%{RELEASE}.%{ARCH}\n' chef_rpm").stdout.chomp).to match("^chef_rpm-1.2-1.#{pkg_arch}$")
1064
+ expect_matching_installed_version("^chef_rpm-1.2-1.#{pkg_arch}$")
1061
1065
  dnf_package "something" do
1062
1066
  options default_options
1063
1067
  package_name "somethingelse"
@@ -1072,7 +1076,7 @@ describe Chef::Resource::DnfPackage, :requires_root, external: exclude_test do
1072
1076
  options default_options
1073
1077
  action :upgrade
1074
1078
  end.should_be_updated
1075
- expect(shell_out("rpm -q --queryformat '%{NAME}-%{VERSION}-%{RELEASE}.%{ARCH}\n' chef_rpm").stdout.chomp).to match("^chef_rpm-1.2-1.#{pkg_arch}$")
1079
+ expect_matching_installed_version("^chef_rpm-1.2-1.#{pkg_arch}$")
1076
1080
  dnf_package "#{CHEF_SPEC_ASSETS}/yumrepo/chef_rpm-1.2-1.#{pkg_arch}.rpm" do
1077
1081
  options default_options
1078
1082
  action :upgrade
@@ -1085,11 +1089,21 @@ describe Chef::Resource::DnfPackage, :requires_root, external: exclude_test do
1085
1089
  options default_options
1086
1090
  action :upgrade
1087
1091
  end.should_be_updated
1088
- expect(shell_out("rpm -q --queryformat '%{NAME}-%{VERSION}-%{RELEASE}.%{ARCH}\n' chef_rpm").stdout.chomp).to match("^chef_rpm-1.2-1.#{pkg_arch}$")
1092
+ expect_matching_installed_version("^chef_rpm-1.2-1.#{pkg_arch}$")
1093
+ dnf_package "#{CHEF_SPEC_ASSETS}/yumrepo/chef_rpm-1.2-1.#{pkg_arch}.rpm" do
1094
+ options default_options
1095
+ action :upgrade
1096
+ end.should_not_be_updated
1097
+ end
1098
+
1099
+ it "does not downgrade the package when allow_downgrade is false" do
1100
+ preinstall("chef_rpm-1.10-1.#{pkg_arch}.rpm")
1089
1101
  dnf_package "#{CHEF_SPEC_ASSETS}/yumrepo/chef_rpm-1.2-1.#{pkg_arch}.rpm" do
1090
1102
  options default_options
1103
+ allow_downgrade false
1091
1104
  action :upgrade
1092
1105
  end.should_not_be_updated
1106
+ expect_matching_installed_version("^chef_rpm-1.10-1.#{pkg_arch}$")
1093
1107
  end
1094
1108
 
1095
1109
  it "upgrades the package" do
@@ -1098,7 +1112,7 @@ describe Chef::Resource::DnfPackage, :requires_root, external: exclude_test do
1098
1112
  options default_options
1099
1113
  action :upgrade
1100
1114
  end.should_be_updated
1101
- expect(shell_out("rpm -q --queryformat '%{NAME}-%{VERSION}-%{RELEASE}.%{ARCH}\n' chef_rpm").stdout.chomp).to match("^chef_rpm-1.10-1.#{pkg_arch}$")
1115
+ expect_matching_installed_version("^chef_rpm-1.10-1.#{pkg_arch}$")
1102
1116
  dnf_package "#{CHEF_SPEC_ASSETS}/yumrepo/chef_rpm-1.10-1.#{pkg_arch}.rpm" do
1103
1117
  options default_options
1104
1118
  action :upgrade
@@ -1111,7 +1125,7 @@ describe Chef::Resource::DnfPackage, :requires_root, external: exclude_test do
1111
1125
  options default_options
1112
1126
  action :upgrade
1113
1127
  end.should_not_be_updated
1114
- expect(shell_out("rpm -q --queryformat '%{NAME}-%{VERSION}-%{RELEASE}.%{ARCH}\n' chef_rpm").stdout.chomp).to match("^chef_rpm-1.2-1.#{pkg_arch}$")
1128
+ expect_matching_installed_version("^chef_rpm-1.2-1.#{pkg_arch}$")
1115
1129
  end
1116
1130
  end
1117
1131
 
@@ -1123,7 +1137,7 @@ describe Chef::Resource::DnfPackage, :requires_root, external: exclude_test do
1123
1137
  options "--nogpgcheck --disablerepo=*"
1124
1138
  action :upgrade
1125
1139
  end.should_not_be_updated
1126
- expect(shell_out("rpm -q --queryformat '%{NAME}-%{VERSION}-%{RELEASE}.%{ARCH}\n' chef_rpm").stdout.chomp).to match("^chef_rpm-1.2-1.#{pkg_arch}$")
1140
+ expect_matching_installed_version("^chef_rpm-1.2-1.#{pkg_arch}$")
1127
1141
  end
1128
1142
 
1129
1143
  it "works with a local source" do
@@ -1133,7 +1147,7 @@ describe Chef::Resource::DnfPackage, :requires_root, external: exclude_test do
1133
1147
  options "--nogpgcheck --disablerepo=*"
1134
1148
  action :upgrade
1135
1149
  end.should_be_updated
1136
- expect(shell_out("rpm -q --queryformat '%{NAME}-%{VERSION}-%{RELEASE}.%{ARCH}\n' chef_rpm").stdout.chomp).to match("^chef_rpm-1.2-1.#{pkg_arch}$")
1150
+ expect_matching_installed_version("^chef_rpm-1.2-1.#{pkg_arch}$")
1137
1151
  dnf_package "#{CHEF_SPEC_ASSETS}/yumrepo/chef_rpm-1.2-1.#{pkg_arch}.rpm" do
1138
1152
  options default_options
1139
1153
  action :upgrade
@@ -1149,7 +1163,7 @@ describe Chef::Resource::DnfPackage, :requires_root, external: exclude_test do
1149
1163
  version "1.10-1"
1150
1164
  action :upgrade
1151
1165
  end.should_be_updated
1152
- expect(shell_out("rpm -q --queryformat '%{NAME}-%{VERSION}-%{RELEASE}.%{ARCH}\n' chef_rpm").stdout.chomp).to match("^chef_rpm-1.10-1.#{pkg_arch}$")
1166
+ expect_matching_installed_version("^chef_rpm-1.10-1.#{pkg_arch}$")
1153
1167
  dnf_package "chef_rpm" do
1154
1168
  options default_options
1155
1169
  version "1.10-1"
@@ -1164,7 +1178,7 @@ describe Chef::Resource::DnfPackage, :requires_root, external: exclude_test do
1164
1178
  version "1.2-1"
1165
1179
  action :upgrade
1166
1180
  end.should_be_updated
1167
- expect(shell_out("rpm -q --queryformat '%{NAME}-%{VERSION}-%{RELEASE}.%{ARCH}\n' chef_rpm").stdout.chomp).to match("^chef_rpm-1.2-1.#{pkg_arch}$")
1181
+ expect_matching_installed_version("^chef_rpm-1.2-1.#{pkg_arch}$")
1168
1182
  dnf_package "chef_rpm" do
1169
1183
  options default_options
1170
1184
  version "1.2-1"
@@ -1179,7 +1193,7 @@ describe Chef::Resource::DnfPackage, :requires_root, external: exclude_test do
1179
1193
  version "1.10"
1180
1194
  action :upgrade
1181
1195
  end.should_be_updated
1182
- expect(shell_out("rpm -q --queryformat '%{NAME}-%{VERSION}-%{RELEASE}.%{ARCH}\n' chef_rpm").stdout.chomp).to match("^chef_rpm-1.10-1.#{pkg_arch}$")
1196
+ expect_matching_installed_version("^chef_rpm-1.10-1.#{pkg_arch}$")
1183
1197
  dnf_package "chef_rpm" do
1184
1198
  options default_options
1185
1199
  version "1.10"
@@ -1194,7 +1208,7 @@ describe Chef::Resource::DnfPackage, :requires_root, external: exclude_test do
1194
1208
  version("1.2")
1195
1209
  action :upgrade
1196
1210
  end.should_be_updated
1197
- expect(shell_out("rpm -q --queryformat '%{NAME}-%{VERSION}-%{RELEASE}.%{ARCH}\n' chef_rpm").stdout.chomp).to match("^chef_rpm-1.2-1.#{pkg_arch}$")
1211
+ expect_matching_installed_version("^chef_rpm-1.2-1.#{pkg_arch}$")
1198
1212
  dnf_package "chef_rpm" do
1199
1213
  options default_options
1200
1214
  version("1.2")
@@ -1208,7 +1222,7 @@ describe Chef::Resource::DnfPackage, :requires_root, external: exclude_test do
1208
1222
  options default_options
1209
1223
  action :upgrade
1210
1224
  end.should_be_updated
1211
- expect(shell_out("rpm -q --queryformat '%{NAME}-%{VERSION}-%{RELEASE}.%{ARCH}\n' chef_rpm").stdout.chomp).to match("^chef_rpm-1.10-1.#{pkg_arch}$")
1225
+ expect_matching_installed_version("^chef_rpm-1.10-1.#{pkg_arch}$")
1212
1226
  dnf_package "chef_rpm-1.10-1" do
1213
1227
  options default_options
1214
1228
  action :upgrade
@@ -1221,7 +1235,7 @@ describe Chef::Resource::DnfPackage, :requires_root, external: exclude_test do
1221
1235
  options default_options
1222
1236
  action :upgrade
1223
1237
  end.should_be_updated
1224
- expect(shell_out("rpm -q --queryformat '%{NAME}-%{VERSION}-%{RELEASE}.%{ARCH}\n' chef_rpm").stdout.chomp).to match("^chef_rpm-1.2-1.#{pkg_arch}$")
1238
+ expect_matching_installed_version("^chef_rpm-1.2-1.#{pkg_arch}$")
1225
1239
  dnf_package "chef_rpm-1.2-1" do
1226
1240
  options default_options
1227
1241
  action :upgrade
@@ -1234,7 +1248,7 @@ describe Chef::Resource::DnfPackage, :requires_root, external: exclude_test do
1234
1248
  options default_options
1235
1249
  action :upgrade
1236
1250
  end.should_be_updated
1237
- expect(shell_out("rpm -q --queryformat '%{NAME}-%{VERSION}-%{RELEASE}.%{ARCH}\n' chef_rpm").stdout.chomp).to match("^chef_rpm-1.10-1.#{pkg_arch}$")
1251
+ expect_matching_installed_version("^chef_rpm-1.10-1.#{pkg_arch}$")
1238
1252
  dnf_package "chef_rpm-1.10" do
1239
1253
  options default_options
1240
1254
  action :upgrade
@@ -1247,7 +1261,7 @@ describe Chef::Resource::DnfPackage, :requires_root, external: exclude_test do
1247
1261
  options default_options
1248
1262
  action :upgrade
1249
1263
  end.should_be_updated
1250
- expect(shell_out("rpm -q --queryformat '%{NAME}-%{VERSION}-%{RELEASE}.%{ARCH}\n' chef_rpm").stdout.chomp).to match("^chef_rpm-1.2-1.#{pkg_arch}$")
1264
+ expect_matching_installed_version("^chef_rpm-1.2-1.#{pkg_arch}$")
1251
1265
  dnf_package "chef_rpm-1.2" do
1252
1266
  options default_options
1253
1267
  action :upgrade
@@ -1260,7 +1274,7 @@ describe Chef::Resource::DnfPackage, :requires_root, external: exclude_test do
1260
1274
  options default_options
1261
1275
  action :upgrade
1262
1276
  end.should_be_updated
1263
- expect(shell_out("rpm -q --queryformat '%{NAME}-%{VERSION}-%{RELEASE}.%{ARCH}\n' chef_rpm").stdout.chomp).to match("^chef_rpm-1.10-1.#{pkg_arch}$")
1277
+ expect_matching_installed_version("^chef_rpm-1.10-1.#{pkg_arch}$")
1264
1278
  dnf_package "chef_rpm = 1.10" do
1265
1279
  options default_options
1266
1280
  action :upgrade
@@ -1273,7 +1287,7 @@ describe Chef::Resource::DnfPackage, :requires_root, external: exclude_test do
1273
1287
  options default_options
1274
1288
  action :upgrade
1275
1289
  end.should_be_updated
1276
- expect(shell_out("rpm -q --queryformat '%{NAME}-%{VERSION}-%{RELEASE}.%{ARCH}\n' chef_rpm").stdout.chomp).to match("^chef_rpm-1.2-1.#{pkg_arch}$")
1290
+ expect_matching_installed_version("^chef_rpm-1.2-1.#{pkg_arch}$")
1277
1291
  dnf_package "chef_rpm = 1.2" do
1278
1292
  options default_options
1279
1293
  action :upgrade
@@ -1286,7 +1300,7 @@ describe Chef::Resource::DnfPackage, :requires_root, external: exclude_test do
1286
1300
  options default_options
1287
1301
  action :upgrade
1288
1302
  end.should_be_updated
1289
- expect(shell_out("rpm -q --queryformat '%{NAME}-%{VERSION}-%{RELEASE}.%{ARCH}\n' chef_rpm").stdout.chomp).to match("^chef_rpm-1.10-1.#{pkg_arch}$")
1303
+ expect_matching_installed_version("^chef_rpm-1.10-1.#{pkg_arch}$")
1290
1304
  dnf_package "chef_rpm > 1.2" do
1291
1305
  options default_options
1292
1306
  action :upgrade
@@ -1299,7 +1313,7 @@ describe Chef::Resource::DnfPackage, :requires_root, external: exclude_test do
1299
1313
  options default_options
1300
1314
  action :upgrade
1301
1315
  end.should_be_updated
1302
- expect(shell_out("rpm -q --queryformat '%{NAME}-%{VERSION}-%{RELEASE}.%{ARCH}\n' chef_rpm").stdout.chomp).to match("^chef_rpm-1.2-1.#{pkg_arch}$")
1316
+ expect_matching_installed_version("^chef_rpm-1.2-1.#{pkg_arch}$")
1303
1317
  dnf_package "chef_rpm < 1.10" do
1304
1318
  options default_options
1305
1319
  action :upgrade
@@ -1312,7 +1326,7 @@ describe Chef::Resource::DnfPackage, :requires_root, external: exclude_test do
1312
1326
  options default_options
1313
1327
  action :upgrade
1314
1328
  end.should_not_be_updated
1315
- expect(shell_out("rpm -q --queryformat '%{NAME}-%{VERSION}-%{RELEASE}.%{ARCH}\n' chef_rpm").stdout.chomp).to match("^chef_rpm-1.10-1.#{pkg_arch}$")
1329
+ expect_matching_installed_version("^chef_rpm-1.10-1.#{pkg_arch}$")
1316
1330
  end
1317
1331
 
1318
1332
  it "with a < pin in the name and no rpm installed it installs" do
@@ -1321,7 +1335,7 @@ describe Chef::Resource::DnfPackage, :requires_root, external: exclude_test do
1321
1335
  options default_options
1322
1336
  action :upgrade
1323
1337
  end.should_not_be_updated
1324
- expect(shell_out("rpm -q --queryformat '%{NAME}-%{VERSION}-%{RELEASE}.%{ARCH}\n' chef_rpm").stdout.chomp).to match("^chef_rpm-1.2-1.#{pkg_arch}$")
1338
+ expect_matching_installed_version("^chef_rpm-1.2-1.#{pkg_arch}$")
1325
1339
  end
1326
1340
 
1327
1341
  it "with a > pin in the name and non-matching rpm installed it upgrades" do
@@ -1330,7 +1344,7 @@ describe Chef::Resource::DnfPackage, :requires_root, external: exclude_test do
1330
1344
  options default_options
1331
1345
  action :upgrade
1332
1346
  end.should_be_updated
1333
- expect(shell_out("rpm -q --queryformat '%{NAME}-%{VERSION}-%{RELEASE}.%{ARCH}\n' chef_rpm").stdout.chomp).to match("^chef_rpm-1.10-1.#{pkg_arch}$")
1347
+ expect_matching_installed_version("^chef_rpm-1.10-1.#{pkg_arch}$")
1334
1348
  dnf_package "chef_rpm > 1.2" do
1335
1349
  options default_options
1336
1350
  action :upgrade
@@ -1343,7 +1357,7 @@ describe Chef::Resource::DnfPackage, :requires_root, external: exclude_test do
1343
1357
  options default_options
1344
1358
  action :upgrade
1345
1359
  end.should_be_updated
1346
- expect(shell_out("rpm -q --queryformat '%{NAME}-%{VERSION}-%{RELEASE}.%{ARCH}\n' chef_rpm").stdout.chomp).to match("^chef_rpm-1.2-1.#{pkg_arch}$")
1360
+ expect_matching_installed_version("^chef_rpm-1.2-1.#{pkg_arch}$")
1347
1361
  dnf_package "chef_rpm < 1.10" do
1348
1362
  options default_options
1349
1363
  action :upgrade
@@ -1360,7 +1374,7 @@ describe Chef::Resource::DnfPackage, :requires_root, external: exclude_test do
1360
1374
  options default_options
1361
1375
  action :remove
1362
1376
  end.should_not_be_updated
1363
- expect(shell_out("rpm -q --queryformat '%{NAME}-%{VERSION}-%{RELEASE}.%{ARCH}\n' chef_rpm").stdout.chomp).to match("^package chef_rpm is not installed$")
1377
+ expect_matching_installed_version("^package chef_rpm is not installed$")
1364
1378
  end
1365
1379
 
1366
1380
  it "removes the package if the package is installed" do
@@ -1369,7 +1383,7 @@ describe Chef::Resource::DnfPackage, :requires_root, external: exclude_test do
1369
1383
  options default_options
1370
1384
  action :remove
1371
1385
  end.should_be_updated
1372
- expect(shell_out("rpm -q --queryformat '%{NAME}-%{VERSION}-%{RELEASE}.%{ARCH}\n' chef_rpm").stdout.chomp).to match("^package chef_rpm is not installed$")
1386
+ expect_matching_installed_version("^package chef_rpm is not installed$")
1373
1387
  end
1374
1388
 
1375
1389
  it "does not remove the package twice" do
@@ -1378,12 +1392,12 @@ describe Chef::Resource::DnfPackage, :requires_root, external: exclude_test do
1378
1392
  options default_options
1379
1393
  action :remove
1380
1394
  end.should_be_updated
1381
- expect(shell_out("rpm -q --queryformat '%{NAME}-%{VERSION}-%{RELEASE}.%{ARCH}\n' chef_rpm").stdout.chomp).to match("^package chef_rpm is not installed$")
1395
+ expect_matching_installed_version("^package chef_rpm is not installed$")
1382
1396
  dnf_package "chef_rpm" do
1383
1397
  options default_options
1384
1398
  action :remove
1385
1399
  end.should_not_be_updated
1386
- expect(shell_out("rpm -q --queryformat '%{NAME}-%{VERSION}-%{RELEASE}.%{ARCH}\n' chef_rpm").stdout.chomp).to match("^package chef_rpm is not installed$")
1400
+ expect_matching_installed_version("^package chef_rpm is not installed$")
1387
1401
  end
1388
1402
 
1389
1403
  it "removes the package if the prior version package is installed" do
@@ -1392,7 +1406,7 @@ describe Chef::Resource::DnfPackage, :requires_root, external: exclude_test do
1392
1406
  options default_options
1393
1407
  action :remove
1394
1408
  end.should_be_updated
1395
- expect(shell_out("rpm -q --queryformat '%{NAME}-%{VERSION}-%{RELEASE}.%{ARCH}\n' chef_rpm").stdout.chomp).to match("^package chef_rpm is not installed$")
1409
+ expect_matching_installed_version("^package chef_rpm is not installed$")
1396
1410
  dnf_package "chef_rpm" do
1397
1411
  options default_options
1398
1412
  action :remove
@@ -1406,7 +1420,7 @@ describe Chef::Resource::DnfPackage, :requires_root, external: exclude_test do
1406
1420
  options default_options
1407
1421
  action :remove
1408
1422
  end.should_be_updated
1409
- expect(shell_out("rpm -q --queryformat '%{NAME}-%{VERSION}-%{RELEASE}.%{ARCH}\n' chef_rpm").stdout.chomp).to match("^package chef_rpm is not installed$")
1423
+ expect_matching_installed_version("^package chef_rpm is not installed$")
1410
1424
  dnf_package "chef_rpm" do
1411
1425
  options default_options
1412
1426
  action :remove
@@ -1420,7 +1434,7 @@ describe Chef::Resource::DnfPackage, :requires_root, external: exclude_test do
1420
1434
  options default_options
1421
1435
  action :remove
1422
1436
  end.should_be_updated
1423
- expect(shell_out("rpm -q --queryformat '%{NAME}-%{VERSION}-%{RELEASE}.%{ARCH}\n' chef_rpm").stdout.chomp).to match("^package chef_rpm is not installed$")
1437
+ expect_matching_installed_version("^package chef_rpm is not installed$")
1424
1438
  dnf_package "chef_rpm" do
1425
1439
  options default_options
1426
1440
  action :remove
@@ -1435,7 +1449,7 @@ describe Chef::Resource::DnfPackage, :requires_root, external: exclude_test do
1435
1449
  options default_options
1436
1450
  action :remove
1437
1451
  end.should_not_be_updated
1438
- expect(shell_out("rpm -q --queryformat '%{NAME}-%{VERSION}-%{RELEASE}.%{ARCH}\n' chef_rpm").stdout.chomp).to match("^package chef_rpm is not installed$")
1452
+ expect_matching_installed_version("^package chef_rpm is not installed$")
1439
1453
  end
1440
1454
 
1441
1455
  it "removes the package if the package is installed" do
@@ -1444,7 +1458,7 @@ describe Chef::Resource::DnfPackage, :requires_root, external: exclude_test do
1444
1458
  options default_options
1445
1459
  action :remove
1446
1460
  end.should_be_updated
1447
- expect(shell_out("rpm -q --queryformat '%{NAME}-%{VERSION}-%{RELEASE}.%{ARCH}\n' chef_rpm").stdout.chomp).to match("^package chef_rpm is not installed$")
1461
+ expect_matching_installed_version("^package chef_rpm is not installed$")
1448
1462
  dnf_package "chef_rpm.#{pkg_arch}" do
1449
1463
  options default_options
1450
1464
  action :remove
@@ -1457,7 +1471,7 @@ describe Chef::Resource::DnfPackage, :requires_root, external: exclude_test do
1457
1471
  options default_options
1458
1472
  action :remove
1459
1473
  end.should_be_updated
1460
- expect(shell_out("rpm -q --queryformat '%{NAME}-%{VERSION}-%{RELEASE}.%{ARCH}\n' chef_rpm").stdout.chomp).to match("^package chef_rpm is not installed$")
1474
+ expect_matching_installed_version("^package chef_rpm is not installed$")
1461
1475
  dnf_package "chef_rpm.#{pkg_arch}" do
1462
1476
  options default_options
1463
1477
  action :remove
@@ -1470,7 +1484,7 @@ describe Chef::Resource::DnfPackage, :requires_root, external: exclude_test do
1470
1484
  options default_options
1471
1485
  action :remove
1472
1486
  end.should_not_be_updated
1473
- expect(shell_out("rpm -q --queryformat '%{NAME}-%{VERSION}-%{RELEASE}.%{ARCH}\n' chef_rpm").stdout.chomp).to match("^chef_rpm-1.10-1.i686$")
1487
+ expect_matching_installed_version("^chef_rpm-1.10-1.i686$")
1474
1488
  end
1475
1489
 
1476
1490
  it "does nothing if the prior version i686 package is installed" do
@@ -1479,7 +1493,7 @@ describe Chef::Resource::DnfPackage, :requires_root, external: exclude_test do
1479
1493
  options default_options
1480
1494
  action :remove
1481
1495
  end.should_not_be_updated
1482
- expect(shell_out("rpm -q --queryformat '%{NAME}-%{VERSION}-%{RELEASE}.%{ARCH}\n' chef_rpm").stdout.chomp).to match("^chef_rpm-1.2-1.i686$")
1496
+ expect_matching_installed_version("^chef_rpm-1.2-1.i686$")
1483
1497
  end
1484
1498
  end
1485
1499
 
@@ -1490,7 +1504,7 @@ describe Chef::Resource::DnfPackage, :requires_root, external: exclude_test do
1490
1504
  options default_options
1491
1505
  action :remove
1492
1506
  end.should_be_updated
1493
- expect(shell_out("rpm -q --queryformat '%{NAME}-%{VERSION}-%{RELEASE}.%{ARCH}\n' chef_rpm").stdout.chomp).to match("^chef_rpm-1.10-1.#{pkg_arch}$")
1507
+ expect_matching_installed_version("^chef_rpm-1.10-1.#{pkg_arch}$")
1494
1508
  dnf_package "chef_rpm.i686" do
1495
1509
  options default_options
1496
1510
  action :remove
@@ -1506,7 +1520,7 @@ describe Chef::Resource::DnfPackage, :requires_root, external: exclude_test do
1506
1520
  options "--nogpgcheck --disablerepo=*"
1507
1521
  action :remove
1508
1522
  end.should_be_updated
1509
- expect(shell_out("rpm -q --queryformat '%{NAME}-%{VERSION}-%{RELEASE}.%{ARCH}\n' chef_rpm").stdout.chomp).to match("^package chef_rpm is not installed$")
1523
+ expect_matching_installed_version("^package chef_rpm is not installed$")
1510
1524
  dnf_package "chef_rpm" do
1511
1525
  options "--nogpgcheck --disablerepo=*"
1512
1526
  action :remove