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.
- checksums.yaml +4 -4
- data/Gemfile +5 -0
- data/chef.gemspec +1 -0
- data/distro/ruby_bin_folder/AMD64/Chef.PowerShell.Wrapper.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/Chef.PowerShell.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/Ijwhost.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/concrt140.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/host/fxr/5.0.0/hostfxr.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/msvcp140.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/msvcp140_1.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/msvcp140_2.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/msvcp140_atomic_wait.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/msvcp140_codecvt_ids.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/Chef.PowerShell.Wrapper.Core.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/Chef.Powershell.Core.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/Chef.Powershell.Core.pdb +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/Ijwhost.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/Microsoft.CSharp.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/Microsoft.NETCore.App.deps.json +180 -180
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/Microsoft.VisualBasic.Core.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/Microsoft.VisualBasic.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/Microsoft.Win32.Primitives.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/Microsoft.Win32.Registry.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.AppContext.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Buffers.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Collections.Concurrent.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Collections.Immutable.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Collections.NonGeneric.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Collections.Specialized.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Collections.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.ComponentModel.Annotations.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.ComponentModel.DataAnnotations.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.ComponentModel.EventBasedAsync.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.ComponentModel.Primitives.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.ComponentModel.TypeConverter.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.ComponentModel.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Configuration.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Console.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Core.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Data.Common.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Data.DataSetExtensions.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Data.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Diagnostics.Contracts.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Diagnostics.Debug.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Diagnostics.DiagnosticSource.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Diagnostics.FileVersionInfo.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Diagnostics.Process.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Diagnostics.StackTrace.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Diagnostics.TextWriterTraceListener.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Diagnostics.Tools.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Diagnostics.TraceSource.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Diagnostics.Tracing.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Drawing.Primitives.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Drawing.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Dynamic.Runtime.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Formats.Asn1.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Globalization.Calendars.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Globalization.Extensions.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Globalization.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.IO.Compression.Brotli.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.IO.Compression.FileSystem.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.IO.Compression.ZipFile.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.IO.Compression.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.IO.FileSystem.AccessControl.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.IO.FileSystem.DriveInfo.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.IO.FileSystem.Primitives.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.IO.FileSystem.Watcher.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.IO.FileSystem.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.IO.IsolatedStorage.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.IO.MemoryMappedFiles.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.IO.Pipes.AccessControl.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.IO.Pipes.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.IO.UnmanagedMemoryStream.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.IO.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Linq.Expressions.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Linq.Parallel.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Linq.Queryable.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Linq.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Memory.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Net.Http.Json.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Net.Http.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Net.HttpListener.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Net.Mail.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Net.NameResolution.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Net.NetworkInformation.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Net.Ping.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Net.Primitives.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Net.Requests.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Net.Security.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Net.ServicePoint.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Net.Sockets.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Net.WebClient.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Net.WebHeaderCollection.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Net.WebProxy.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Net.WebSockets.Client.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Net.WebSockets.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Net.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Numerics.Vectors.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Numerics.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.ObjectModel.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Private.CoreLib.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Private.DataContractSerialization.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Private.Uri.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Private.Xml.Linq.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Private.Xml.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Reflection.DispatchProxy.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Reflection.Emit.ILGeneration.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Reflection.Emit.Lightweight.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Reflection.Emit.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Reflection.Extensions.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Reflection.Metadata.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Reflection.Primitives.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Reflection.TypeExtensions.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Reflection.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Resources.Reader.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Resources.ResourceManager.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Resources.Writer.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Runtime.CompilerServices.Unsafe.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Runtime.CompilerServices.VisualC.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Runtime.Extensions.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Runtime.Handles.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Runtime.InteropServices.RuntimeInformation.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Runtime.InteropServices.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Runtime.Intrinsics.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Runtime.Loader.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Runtime.Numerics.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Runtime.Serialization.Formatters.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Runtime.Serialization.Json.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Runtime.Serialization.Primitives.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Runtime.Serialization.Xml.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Runtime.Serialization.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Runtime.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Security.AccessControl.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Security.Claims.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Security.Cryptography.Algorithms.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Security.Cryptography.Cng.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Security.Cryptography.Csp.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Security.Cryptography.Encoding.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Security.Cryptography.OpenSsl.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Security.Cryptography.Primitives.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Security.Cryptography.X509Certificates.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Security.Principal.Windows.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Security.Principal.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Security.SecureString.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Security.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.ServiceModel.Web.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.ServiceProcess.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Text.Encoding.CodePages.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Text.Encoding.Extensions.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Text.Encoding.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Text.Encodings.Web.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Text.Json.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Text.RegularExpressions.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Threading.Channels.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Threading.Overlapped.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Threading.Tasks.Dataflow.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Threading.Tasks.Extensions.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Threading.Tasks.Parallel.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Threading.Tasks.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Threading.Thread.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Threading.ThreadPool.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Threading.Timer.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Threading.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Transactions.Local.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Transactions.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.ValueTuple.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Web.HttpUtility.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Web.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Windows.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Xml.Linq.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Xml.ReaderWriter.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Xml.Serialization.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Xml.XDocument.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Xml.XPath.XDocument.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Xml.XPath.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Xml.XmlDocument.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Xml.XmlSerializer.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Xml.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/WindowsBase.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/clrcompression.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/clretwrc.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/clrjit.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/coreclr.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/createdump.exe +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/dbgshim.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/hostfxr.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/hostpolicy.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/mscordaccore.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/mscordaccore_amd64_amd64_5.0.521.16609.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/mscordbi.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/mscorlib.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/mscorrc.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/netstandard.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/vccorlib140.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/vcruntime140.dll +0 -0
- data/distro/ruby_bin_folder/AMD64/vcruntime140_1.dll +0 -0
- data/distro/ruby_bin_folder/x86/Chef.PowerShell.dll +0 -0
- data/distro/ruby_bin_folder/x86/Chef.Powershell.Wrapper.dll +0 -0
- data/distro/ruby_bin_folder/x86/concrt140.dll +0 -0
- data/distro/ruby_bin_folder/x86/msvcp140.dll +0 -0
- data/distro/ruby_bin_folder/x86/msvcp140_1.dll +0 -0
- data/distro/ruby_bin_folder/x86/msvcp140_2.dll +0 -0
- data/distro/ruby_bin_folder/x86/msvcp140_atomic_wait.dll +0 -0
- data/distro/ruby_bin_folder/x86/msvcp140_codecvt_ids.dll +0 -0
- data/distro/ruby_bin_folder/x86/shared/Microsoft.NETCore.App/5.0.0/Chef.PowerShell.Wrapper.Core.dll +0 -0
- data/distro/ruby_bin_folder/x86/shared/Microsoft.NETCore.App/5.0.0/Chef.Powershell.Core.dll +0 -0
- data/distro/ruby_bin_folder/x86/shared/Microsoft.NETCore.App/5.0.0/Chef.Powershell.Core.pdb +0 -0
- data/distro/ruby_bin_folder/x86/vccorlib140.dll +0 -0
- data/distro/ruby_bin_folder/x86/vcruntime140.dll +0 -0
- data/lib/chef/application/base.rb +1 -1
- data/lib/chef/chef_fs/file_pattern.rb +1 -1
- data/lib/chef/chef_fs/path_utils.rb +1 -1
- data/lib/chef/compliance/default_attributes.rb +12 -2
- data/lib/chef/compliance/runner.rb +51 -5
- data/lib/chef/data_collector/run_end_message.rb +1 -1
- data/lib/chef/dsl/reboot_pending.rb +1 -1
- data/lib/chef/exceptions.rb +10 -0
- data/lib/chef/mixin/powershell_exec.rb +6 -5
- data/lib/chef/mixin/why_run.rb +8 -2
- data/lib/chef/powershell.rb +8 -6
- data/lib/chef/provider/cron.rb +6 -3
- data/lib/chef/provider/directory.rb +2 -2
- data/lib/chef/provider/git.rb +1 -1
- data/lib/chef/provider/ifconfig/debian.rb +1 -1
- data/lib/chef/provider/ifconfig.rb +4 -4
- data/lib/chef/provider/mount/linux.rb +16 -2
- data/lib/chef/provider/mount/mount.rb +1 -1
- data/lib/chef/provider/package/dnf.rb +1 -1
- data/lib/chef/provider/package/habitat.rb +1 -1
- data/lib/chef/provider/package/powershell.rb +13 -10
- data/lib/chef/provider/package/yum/python_helper.rb +81 -25
- data/lib/chef/provider/package/yum.rb +39 -12
- data/lib/chef/provider/package/zypper.rb +2 -0
- data/lib/chef/provider/package.rb +62 -27
- data/lib/chef/provider/subversion.rb +5 -5
- data/lib/chef/provider.rb +5 -2
- data/lib/chef/providers.rb +0 -1
- data/lib/chef/pwsh.rb +3 -2
- data/lib/chef/resource/apt_package.rb +2 -2
- data/lib/chef/resource/chef_client_config.rb +21 -1
- data/lib/chef/resource/chef_client_launchd.rb +1 -1
- data/lib/chef/resource/chef_client_trusted_certificate.rb +1 -0
- data/lib/chef/resource/chocolatey_config.rb +1 -1
- data/lib/chef/resource/chocolatey_feature.rb +1 -1
- data/lib/chef/resource/chocolatey_package.rb +3 -3
- data/lib/chef/resource/chocolatey_source.rb +24 -2
- data/lib/chef/resource/cron/cron.rb +75 -1
- data/lib/chef/resource/cron/cron_d.rb +2 -1
- data/lib/chef/resource/directory.rb +1 -1
- data/lib/chef/resource/dnf_package.rb +4 -6
- data/lib/chef/resource/dpkg_package.rb +5 -0
- data/lib/chef/resource/execute.rb +1 -4
- data/lib/chef/resource/habitat_install.rb +5 -5
- data/lib/chef/resource/homebrew_tap.rb +0 -4
- data/lib/chef/resource/inspec_waiver.rb +1 -1
- data/lib/chef/resource/inspec_waiver_file_entry.rb +1 -1
- data/lib/chef/resource/kernel_module.rb +27 -2
- data/lib/chef/resource/launchd.rb +0 -3
- data/lib/chef/resource/macos_userdefaults.rb +41 -131
- data/lib/chef/resource/powershell_package_source.rb +8 -8
- data/lib/chef/resource/rhsm_register.rb +31 -0
- data/lib/chef/resource/support/client.erb +7 -0
- data/lib/chef/resource/windows_auto_run.rb +1 -1
- data/lib/chef/resource/windows_dfs_namespace.rb +2 -2
- data/lib/chef/resource/windows_feature_powershell.rb +8 -9
- data/lib/chef/resource/windows_task.rb +25 -10
- data/lib/chef/resource/windows_update_settings.rb +3 -3
- data/lib/chef/resource.rb +2 -2
- data/lib/chef/resource_reporter.rb +1 -1
- data/lib/chef/secret_fetcher/azure_key_vault.rb +64 -8
- data/lib/chef/secret_fetcher/hashi_vault.rb +37 -3
- data/lib/chef/secret_fetcher.rb +0 -1
- data/lib/chef/version.rb +1 -1
- data/spec/functional/dsl/reboot_pending_spec.rb +3 -3
- data/spec/functional/dsl/registry_helper_spec.rb +1 -1
- data/spec/functional/resource/dnf_package_spec.rb +138 -124
- data/spec/functional/resource/dpkg_package_spec.rb +16 -0
- data/spec/functional/resource/dsc_script_spec.rb +2 -2
- data/spec/functional/resource/macos_userdefaults_spec.rb +139 -0
- data/spec/functional/resource/registry_spec.rb +81 -81
- data/spec/functional/resource/yum_package_spec.rb +789 -129
- data/spec/functional/resource/zypper_package_spec.rb +7 -0
- data/spec/functional/win32/registry_spec.rb +8 -8
- data/spec/integration/client/client_spec.rb +31 -0
- data/spec/unit/application/base_spec.rb +40 -0
- data/spec/unit/compliance/runner_spec.rb +62 -1
- data/spec/unit/data_collector_spec.rb +24 -1
- data/spec/unit/dsl/reboot_pending_spec.rb +1 -1
- data/spec/unit/file_access_control_spec.rb +1 -1
- data/spec/unit/mixin/default_paths_spec.rb +1 -1
- data/spec/unit/mixin/securable_spec.rb +3 -3
- data/spec/unit/mixin/why_run_spec.rb +53 -0
- data/spec/unit/provider/cron_spec.rb +45 -0
- data/spec/unit/provider/group/groupadd_spec.rb +1 -0
- data/spec/unit/provider/group/usermod_spec.rb +2 -2
- data/spec/unit/provider/ifconfig_spec.rb +2 -0
- data/spec/unit/provider/mount/linux_spec.rb +16 -3
- data/spec/unit/provider/package/bff_spec.rb +1 -0
- data/spec/unit/provider/package/powershell_spec.rb +114 -114
- data/spec/unit/provider/package/rubygems_spec.rb +8 -5
- data/spec/unit/provider/package/solaris_spec.rb +1 -0
- data/spec/unit/provider/package/windows_spec.rb +1 -1
- data/spec/unit/provider/registry_key_spec.rb +4 -4
- data/spec/unit/provider/service/arch_service_spec.rb +2 -2
- data/spec/unit/provider/service/debian_service_spec.rb +1 -0
- data/spec/unit/provider/service/gentoo_service_spec.rb +1 -0
- data/spec/unit/provider/service/macosx_spec.rb +1 -0
- data/spec/unit/provider/service/redhat_spec.rb +4 -1
- data/spec/unit/provider/service/simple_service_spec.rb +6 -4
- data/spec/unit/provider/service/windows_spec.rb +5 -5
- data/spec/unit/provider/subversion_spec.rb +4 -4
- data/spec/unit/provider/user_spec.rb +2 -0
- data/spec/unit/provider/windows_env_spec.rb +1 -1
- data/spec/unit/provider/zypper_repository_spec.rb +1 -1
- data/spec/unit/resource/chef_client_trusted_certificate_spec.rb +14 -0
- data/spec/unit/resource/chocolatey_config_spec.rb +1 -1
- data/spec/unit/resource/chocolatey_feature_spec.rb +1 -1
- data/spec/unit/resource/chocolatey_source_spec.rb +1 -1
- data/spec/unit/resource/dpkg_package_spec.rb +12 -0
- data/spec/unit/resource/kernel_module_spec.rb +2 -1
- data/spec/unit/resource/macos_user_defaults_spec.rb +36 -96
- data/spec/unit/resource/registry_key_spec.rb +10 -10
- data/spec/unit/resource/rhsm_register_spec.rb +42 -0
- data/spec/unit/resource/windows_auto_run_spec.rb +1 -1
- data/spec/unit/resource/windows_feature_powershell_spec.rb +1 -1
- data/spec/unit/resource/windows_firewall_rule_spec.rb +2 -2
- data/spec/unit/resource/windows_task_spec.rb +3 -3
- data/spec/unit/resource_reporter_spec.rb +2 -2
- data/spec/unit/resource_spec.rb +5 -0
- data/spec/unit/secret_fetcher/azure_key_vault_spec.rb +99 -20
- data/spec/unit/secret_fetcher/hashi_vault_spec.rb +46 -0
- data/spec/unit/util/backup_spec.rb +1 -1
- data/spec/unit/win32/registry_spec.rb +3 -3
- metadata +25 -10
- data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/mscordaccore_amd64_amd64_5.0.20.51904.dll +0 -0
- data/lib/chef/provider/group/suse.rb +0 -82
- data/spec/unit/provider/group/suse_spec.rb +0 -90
@@ -184,6 +184,22 @@ describe Chef::Resource::DpkgPackage, :requires_root, :debian_family_only, arch:
|
|
184
184
|
dpkg_package.run_action(action)
|
185
185
|
expect(dpkg_package).to be_updated_by_last_action
|
186
186
|
end
|
187
|
+
|
188
|
+
it "should not allow downgrade a package" do
|
189
|
+
dpkg_package.allow_downgrade false
|
190
|
+
shell_out!("dpkg -i #{test1_1}")
|
191
|
+
set_dpkg_package_name test1_0
|
192
|
+
dpkg_package.run_action(action)
|
193
|
+
expect(dpkg_package).not_to be_updated_by_last_action
|
194
|
+
end
|
195
|
+
|
196
|
+
it "should allow downgrade a package" do
|
197
|
+
dpkg_package.allow_downgrade true
|
198
|
+
shell_out!("dpkg -i #{test1_1}")
|
199
|
+
set_dpkg_package_name test1_0
|
200
|
+
dpkg_package.run_action(action)
|
201
|
+
expect(dpkg_package).to be_updated_by_last_action
|
202
|
+
end
|
187
203
|
end
|
188
204
|
|
189
205
|
shared_examples_for "common behavior for remove or purge" do
|
@@ -85,7 +85,7 @@ describe Chef::Resource::DscScript, :windows_powershell_dsc_only, :ruby64_only d
|
|
85
85
|
let(:dsc_test_resource_base) do
|
86
86
|
Chef::Resource::DscScript.new(dsc_test_resource_name, dsc_test_run_context)
|
87
87
|
end
|
88
|
-
let(:test_registry_key) {
|
88
|
+
let(:test_registry_key) { "HKEY_LOCAL_MACHINE\\Software\\Chef\\Spec\\Functional\\Resource\\dsc_script_spec" }
|
89
89
|
let(:test_registry_value) { "Registration" }
|
90
90
|
let(:test_registry_data1) { "LL927" }
|
91
91
|
let(:test_registry_data2) { "LL928" }
|
@@ -394,7 +394,7 @@ describe Chef::Resource::DscScript, :windows_powershell_dsc_only, :ruby64_only d
|
|
394
394
|
dsc_test_run_context.node.consume_external_attrs(OHAI_SYSTEM.data, {})
|
395
395
|
end
|
396
396
|
|
397
|
-
let(:configuration_data_path) {
|
397
|
+
let(:configuration_data_path) { "C:\\configurationdata.psd1" }
|
398
398
|
|
399
399
|
let(:self_signed_cert_path) do
|
400
400
|
File.join(CHEF_SPEC_DATA, "dsc_lcm.pfx")
|
@@ -0,0 +1,139 @@
|
|
1
|
+
#
|
2
|
+
# Copyright:: Copyright (c) Chef Software Inc.
|
3
|
+
# License:: Apache License, Version 2.0
|
4
|
+
#
|
5
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
6
|
+
# you may not use this file except in compliance with the License.
|
7
|
+
# You may obtain a copy of the License at
|
8
|
+
#
|
9
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
#
|
11
|
+
# Unless required by applicable law or agreed to in writing, software
|
12
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
13
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
|
+
# See the License for the specific language governing permissions and
|
15
|
+
# limitations under the License.
|
16
|
+
#
|
17
|
+
require "spec_helper"
|
18
|
+
|
19
|
+
describe Chef::Resource::MacosUserDefaults, :macos_only do
|
20
|
+
def create_resource
|
21
|
+
node = Chef::Node.new
|
22
|
+
events = Chef::EventDispatch::Dispatcher.new
|
23
|
+
run_context = Chef::RunContext.new(node, {}, events)
|
24
|
+
resource = Chef::Resource::MacosUserDefaults.new("test", run_context)
|
25
|
+
resource
|
26
|
+
end
|
27
|
+
|
28
|
+
let(:resource) do
|
29
|
+
create_resource
|
30
|
+
end
|
31
|
+
|
32
|
+
context "has a default value" do
|
33
|
+
it ":macos_userdefaults for resource name" do
|
34
|
+
expect(resource.name).to eq("test")
|
35
|
+
end
|
36
|
+
|
37
|
+
it "NSGlobalDomain for the domain property" do
|
38
|
+
expect(resource.domain).to eq("NSGlobalDomain")
|
39
|
+
end
|
40
|
+
|
41
|
+
it "nil for the host property" do
|
42
|
+
expect(resource.host).to be_nil
|
43
|
+
end
|
44
|
+
|
45
|
+
it "nil for the user property" do
|
46
|
+
expect(resource.user).to be_nil
|
47
|
+
end
|
48
|
+
|
49
|
+
it ":write for resource action" do
|
50
|
+
expect(resource.action).to eq([:write])
|
51
|
+
end
|
52
|
+
end
|
53
|
+
|
54
|
+
it "supports :write, :delete actions" do
|
55
|
+
expect { resource.action :write }.not_to raise_error
|
56
|
+
expect { resource.action :delete }.not_to raise_error
|
57
|
+
end
|
58
|
+
|
59
|
+
context "can process expected data" do
|
60
|
+
it "set array values" do
|
61
|
+
resource.domain "/Library/Preferences/ManagedInstalls"
|
62
|
+
resource.key "TestArrayValues"
|
63
|
+
resource.value [ "/Library/Managed Installs/fake.log", "/Library/Managed Installs/also_fake.log"]
|
64
|
+
resource.run_action(:write)
|
65
|
+
expect(resource.get_preference resource).to eq([ "/Library/Managed Installs/fake.log", "/Library/Managed Installs/also_fake.log"])
|
66
|
+
end
|
67
|
+
|
68
|
+
it "set dictionary value" do
|
69
|
+
resource.domain "/Library/Preferences/ManagedInstalls"
|
70
|
+
resource.key "TestDictionaryValues"
|
71
|
+
resource.value "User": "/Library/Managed Installs/way_fake.log"
|
72
|
+
resource.run_action(:write)
|
73
|
+
expect(resource.get_preference resource).to eq("User" => "/Library/Managed Installs/way_fake.log")
|
74
|
+
end
|
75
|
+
|
76
|
+
it "set array of dictionaries" do
|
77
|
+
resource.domain "/Library/Preferences/ManagedInstalls"
|
78
|
+
resource.key "TestArrayWithDictionary"
|
79
|
+
resource.value [ { "User": "/Library/Managed Installs/way_fake.log" } ]
|
80
|
+
resource.run_action(:write)
|
81
|
+
expect(resource.get_preference resource).to eq([ { "User" => "/Library/Managed Installs/way_fake.log" } ])
|
82
|
+
end
|
83
|
+
|
84
|
+
it "set boolean for preference value" do
|
85
|
+
resource.domain "/Library/Preferences/ManagedInstalls"
|
86
|
+
resource.key "TestBooleanValue"
|
87
|
+
resource.value true
|
88
|
+
resource.run_action(:write)
|
89
|
+
expect(resource.get_preference resource).to eq(true)
|
90
|
+
end
|
91
|
+
|
92
|
+
it "sets value to global domain when domain is not passed" do
|
93
|
+
resource.key "TestKey"
|
94
|
+
resource.value 1
|
95
|
+
resource.run_action(:write)
|
96
|
+
expect(resource.get_preference resource).to eq(1)
|
97
|
+
end
|
98
|
+
|
99
|
+
it "short domain names" do
|
100
|
+
resource.domain "com.apple.dock"
|
101
|
+
resource.key "titlesize"
|
102
|
+
resource.value "20"
|
103
|
+
resource.run_action(:write)
|
104
|
+
expect(resource.get_preference resource).to eq("20")
|
105
|
+
end
|
106
|
+
end
|
107
|
+
|
108
|
+
it "we can delete a preference with full path" do
|
109
|
+
resource.domain "/Library/Preferences/ManagedInstalls"
|
110
|
+
resource.key "TestKey"
|
111
|
+
expect { resource.run_action(:delete) }. to_not raise_error
|
112
|
+
end
|
113
|
+
|
114
|
+
it "we can delete a preference with short name" do
|
115
|
+
resource.domain "com.apple.dock"
|
116
|
+
resource.key "titlesize"
|
117
|
+
expect { resource.run_action(:delete) }. to_not raise_error
|
118
|
+
end
|
119
|
+
|
120
|
+
context "resource can process FFI::Pointer type" do
|
121
|
+
it "for host property" do
|
122
|
+
resource.domain "/Library/Preferences/ManagedInstalls"
|
123
|
+
resource.key "TestDictionaryValues"
|
124
|
+
resource.value "User": "/Library/Managed Installs/way_fake.log"
|
125
|
+
resource.host :current
|
126
|
+
resource.run_action(:write)
|
127
|
+
expect { resource.run_action(:write) }. to_not raise_error
|
128
|
+
end
|
129
|
+
|
130
|
+
it "for user property" do
|
131
|
+
resource.domain "/Library/Preferences/ManagedInstalls"
|
132
|
+
resource.key "TestDictionaryValues"
|
133
|
+
resource.value "User": "/Library/Managed Installs/way_fake.log"
|
134
|
+
resource.user :current
|
135
|
+
resource.run_action(:write)
|
136
|
+
expect { resource.run_action(:write) }. to_not raise_error
|
137
|
+
end
|
138
|
+
end
|
139
|
+
end
|
@@ -75,19 +75,19 @@ describe Chef::Resource::RegistryKey, :windows_only, broken: true do
|
|
75
75
|
def create_deletable_keys
|
76
76
|
# create them both 32-bit and 64-bit
|
77
77
|
[ 0x0100, 0x0200 ].each do |flag|
|
78
|
-
hive_class.create(key_parent +
|
79
|
-
hive_class.open(key_parent +
|
78
|
+
hive_class.create(key_parent + "\\Opscode", Win32::Registry::KEY_WRITE | flag)
|
79
|
+
hive_class.open(key_parent + "\\Opscode", Win32::Registry::KEY_ALL_ACCESS | flag) do |reg|
|
80
80
|
reg["Color", Win32::Registry::REG_SZ] = "Orange"
|
81
81
|
reg.write("Opscode", Win32::Registry::REG_MULTI_SZ, %w{Seattle Washington})
|
82
82
|
reg["AKA", Win32::Registry::REG_SZ] = "OC"
|
83
83
|
end
|
84
|
-
hive_class.create(key_parent +
|
85
|
-
hive_class.open(key_parent +
|
84
|
+
hive_class.create(key_parent + "\\ReportKey", Win32::Registry::KEY_WRITE | flag)
|
85
|
+
hive_class.open(key_parent + "\\ReportKey", Win32::Registry::KEY_ALL_ACCESS | flag) do |reg|
|
86
86
|
reg["ReportVal4", Win32::Registry::REG_SZ] = "report4"
|
87
87
|
reg["ReportVal5", Win32::Registry::REG_SZ] = "report5"
|
88
88
|
end
|
89
|
-
hive_class.create(key_parent +
|
90
|
-
hive_class.open(key_parent +
|
89
|
+
hive_class.create(key_parent + "\\OpscodeWhyRun", Win32::Registry::KEY_WRITE | flag)
|
90
|
+
hive_class.open(key_parent + "\\OpscodeWhyRun", Win32::Registry::KEY_ALL_ACCESS | flag) do |reg|
|
91
91
|
reg["BriskWalk", Win32::Registry::REG_SZ] = "is good for health"
|
92
92
|
end
|
93
93
|
end
|
@@ -188,13 +188,13 @@ describe Chef::Resource::RegistryKey, :windows_only, broken: true do
|
|
188
188
|
end
|
189
189
|
|
190
190
|
it "creates subkey if parent exists" do
|
191
|
-
@new_resource.key(reg_child +
|
191
|
+
@new_resource.key(reg_child + "\\OpscodeTest")
|
192
192
|
@new_resource.values([{ name: "Chef", type: :multi_string, data: %w{OpscodeOrange Rules} }])
|
193
193
|
@new_resource.recursive(false)
|
194
194
|
@new_resource.run_action(:create)
|
195
195
|
|
196
|
-
expect(@registry.key_exists?(reg_child +
|
197
|
-
expect(@registry.value_exists?(reg_child +
|
196
|
+
expect(@registry.key_exists?(reg_child + "\\OpscodeTest")).to eq(true)
|
197
|
+
expect(@registry.value_exists?(reg_child + "\\OpscodeTest", { name: "Chef", type: :multi_string, data: %w{OpscodeOrange Rules} })).to eq(true)
|
198
198
|
end
|
199
199
|
|
200
200
|
it "raises an error if action create and parent does not exist and recursive is set to false" do
|
@@ -258,20 +258,20 @@ describe Chef::Resource::RegistryKey, :windows_only, broken: true do
|
|
258
258
|
@registry.architecture = :machine
|
259
259
|
end
|
260
260
|
it "creates a key in a 32-bit registry that is not viewable in 64-bit" do
|
261
|
-
@new_resource.key(reg_child +
|
261
|
+
@new_resource.key(reg_child + "\\Atraxi" )
|
262
262
|
@new_resource.values([{ name: "OC", type: :string, data: "Data" }])
|
263
263
|
@new_resource.recursive(true)
|
264
264
|
@new_resource.architecture(:i386)
|
265
265
|
@new_resource.run_action(:create)
|
266
266
|
@registry.architecture = :i386
|
267
|
-
expect(@registry.data_exists?(reg_child +
|
267
|
+
expect(@registry.data_exists?(reg_child + "\\Atraxi", { name: "OC", type: :string, data: "Data" })).to eq(true)
|
268
268
|
@registry.architecture = :x86_64
|
269
|
-
expect(@registry.key_exists?(reg_child +
|
269
|
+
expect(@registry.key_exists?(reg_child + "\\Atraxi")).to eq(false)
|
270
270
|
end
|
271
271
|
end
|
272
272
|
|
273
273
|
it "prepares the reporting data for action :create" do
|
274
|
-
@new_resource.key(reg_child +
|
274
|
+
@new_resource.key(reg_child + "\\Ood")
|
275
275
|
@new_resource.values([{ name: "ReportingVal1", type: :string, data: "report1" }, { name: "ReportingVal2", type: :string, data: "report2" }])
|
276
276
|
@new_resource.recursive(true)
|
277
277
|
@new_resource.run_action(:create)
|
@@ -280,7 +280,7 @@ describe Chef::Resource::RegistryKey, :windows_only, broken: true do
|
|
280
280
|
expect(@report["action"]).to eq("end")
|
281
281
|
expect(@report["resources"][0]["type"]).to eq("registry_key")
|
282
282
|
expect(@report["resources"][0]["name"]).to eq(resource_name)
|
283
|
-
expect(@report["resources"][0]["id"]).to eq(reg_child +
|
283
|
+
expect(@report["resources"][0]["id"]).to eq(reg_child + "\\Ood")
|
284
284
|
expect(@report["resources"][0]["after"][:values]).to eq([{ name: "ReportingVal1", type: :string, data: "report1" },
|
285
285
|
{ name: "ReportingVal2", type: :string, data: "report2" }])
|
286
286
|
expect(@report["resources"][0]["before"][:values]).to eq([])
|
@@ -295,48 +295,48 @@ describe Chef::Resource::RegistryKey, :windows_only, broken: true do
|
|
295
295
|
end
|
296
296
|
|
297
297
|
it "does not raise an exception if the keys do not exist but recursive is set to false" do
|
298
|
-
@new_resource.key(reg_child +
|
298
|
+
@new_resource.key(reg_child + "\\Slitheen\\Raxicoricofallapatorius")
|
299
299
|
@new_resource.values([{ name: "BriskWalk", type: :string, data: "is good for health" }])
|
300
300
|
@new_resource.recursive(false)
|
301
301
|
@new_resource.run_action(:create) # should not raise_error
|
302
|
-
expect(@registry.key_exists?(reg_child +
|
303
|
-
expect(@registry.key_exists?(reg_child +
|
302
|
+
expect(@registry.key_exists?(reg_child + "\\Slitheen")).to eq(false)
|
303
|
+
expect(@registry.key_exists?(reg_child + "\\Slitheen\\Raxicoricofallapatorius")).to eq(false)
|
304
304
|
end
|
305
305
|
|
306
306
|
it "does not create key if the action is create" do
|
307
|
-
@new_resource.key(reg_child +
|
307
|
+
@new_resource.key(reg_child + "\\Slitheen")
|
308
308
|
@new_resource.values([{ name: "BriskWalk", type: :string, data: "is good for health" }])
|
309
309
|
@new_resource.recursive(false)
|
310
310
|
@new_resource.run_action(:create)
|
311
|
-
expect(@registry.key_exists?(reg_child +
|
311
|
+
expect(@registry.key_exists?(reg_child + "\\Slitheen")).to eq(false)
|
312
312
|
end
|
313
313
|
|
314
314
|
it "does not raise an exception if the action create and type key missing in values hash" do
|
315
|
-
@new_resource.key(reg_child +
|
315
|
+
@new_resource.key(reg_child + "\\Slitheen")
|
316
316
|
@new_resource.values([{ name: "BriskWalk", data: "my_data" }])
|
317
317
|
@new_resource.run_action(:create) # should not raise_error
|
318
|
-
expect(@registry.key_exists?(reg_child +
|
318
|
+
expect(@registry.key_exists?(reg_child + "\\Slitheen")).to eq(false)
|
319
319
|
end
|
320
320
|
|
321
321
|
it "does not raise an exception if the action create and data key missing in values hash" do
|
322
|
-
@new_resource.key(reg_child +
|
322
|
+
@new_resource.key(reg_child + "\\Slitheen")
|
323
323
|
@new_resource.values([{ name: "BriskWalk", type: :string }])
|
324
324
|
@new_resource.run_action(:create) # should not raise_error
|
325
|
-
expect(@registry.key_exists?(reg_child +
|
325
|
+
expect(@registry.key_exists?(reg_child + "\\Slitheen")).to eq(false)
|
326
326
|
end
|
327
327
|
|
328
328
|
it "does not raise an exception if the action create and only name key present in values hash" do
|
329
|
-
@new_resource.key(reg_child +
|
329
|
+
@new_resource.key(reg_child + "\\Slitheen")
|
330
330
|
@new_resource.values([{ name: "BriskWalk" }])
|
331
331
|
@new_resource.run_action(:create) # should not raise_error
|
332
|
-
expect(@registry.key_exists?(reg_child +
|
332
|
+
expect(@registry.key_exists?(reg_child + "\\Slitheen")).to eq(false)
|
333
333
|
end
|
334
334
|
|
335
335
|
it "does not raise an exception if the action create and all keys are present in values hash" do
|
336
|
-
@new_resource.key(reg_child +
|
336
|
+
@new_resource.key(reg_child + "\\Slitheen")
|
337
337
|
@new_resource.values([{ name: "BriskWalk", type: :string, data: "my_data" }])
|
338
338
|
@new_resource.run_action(:create) # should not raise_error
|
339
|
-
expect(@registry.key_exists?(reg_child +
|
339
|
+
expect(@registry.key_exists?(reg_child + "\\Slitheen")).to eq(false)
|
340
340
|
end
|
341
341
|
end
|
342
342
|
end
|
@@ -374,17 +374,17 @@ describe Chef::Resource::RegistryKey, :windows_only, broken: true do
|
|
374
374
|
end
|
375
375
|
|
376
376
|
it "creates subkey if parent exists" do
|
377
|
-
@new_resource.key(reg_child +
|
377
|
+
@new_resource.key(reg_child + "\\Pyrovile")
|
378
378
|
@new_resource.values([{ name: "Chef", type: :multi_string, data: %w{OpscodeOrange Rules} }])
|
379
379
|
@new_resource.recursive(false)
|
380
380
|
@new_resource.run_action(:create_if_missing)
|
381
381
|
|
382
|
-
expect(@registry.key_exists?(reg_child +
|
383
|
-
expect(@registry.value_exists?(reg_child +
|
382
|
+
expect(@registry.key_exists?(reg_child + "\\Pyrovile")).to eq(true)
|
383
|
+
expect(@registry.value_exists?(reg_child + "\\Pyrovile", { name: "Chef", type: :multi_string, data: %w{OpscodeOrange Rules} })).to eq(true)
|
384
384
|
end
|
385
385
|
|
386
386
|
it "raises an error if action create and parent does not exist and recursive is set to false" do
|
387
|
-
@new_resource.key(reg_child +
|
387
|
+
@new_resource.key(reg_child + "\\Sontaran\\Sontar")
|
388
388
|
@new_resource.values([{ name: "OC", type: :string, data: "MissingData" }])
|
389
389
|
@new_resource.recursive(false)
|
390
390
|
expect { @new_resource.run_action(:create_if_missing) }.to raise_error(Chef::Exceptions::Win32RegNoRecursive)
|
@@ -415,28 +415,28 @@ describe Chef::Resource::RegistryKey, :windows_only, broken: true do
|
|
415
415
|
end
|
416
416
|
|
417
417
|
it "creates missing keys if action create and parent does not exist and recursive is set to true" do
|
418
|
-
@new_resource.key(reg_child +
|
418
|
+
@new_resource.key(reg_child + "\\Sontaran\\Sontar")
|
419
419
|
@new_resource.values([{ name: "OC", type: :string, data: "MissingData" }])
|
420
420
|
@new_resource.recursive(true)
|
421
421
|
@new_resource.run_action(:create_if_missing)
|
422
422
|
|
423
|
-
expect(@registry.key_exists?(reg_child +
|
424
|
-
expect(@registry.value_exists?(reg_child +
|
423
|
+
expect(@registry.key_exists?(reg_child + "\\Sontaran\\Sontar")).to eq(true)
|
424
|
+
expect(@registry.value_exists?(reg_child + "\\Sontaran\\Sontar", { name: "OC", type: :string, data: "MissingData" })).to eq(true)
|
425
425
|
end
|
426
426
|
|
427
427
|
it "creates key with multiple value as specified" do
|
428
|
-
@new_resource.key(reg_child +
|
428
|
+
@new_resource.key(reg_child + "\\Adipose")
|
429
429
|
@new_resource.values([{ name: "one", type: :string, data: "1" }, { name: "two", type: :string, data: "2" }, { name: "three", type: :string, data: "3" }])
|
430
430
|
@new_resource.recursive(true)
|
431
431
|
@new_resource.run_action(:create_if_missing)
|
432
432
|
|
433
433
|
@new_resource.each_value do |value|
|
434
|
-
expect(@registry.value_exists?(reg_child +
|
434
|
+
expect(@registry.value_exists?(reg_child + "\\Adipose", value)).to eq(true)
|
435
435
|
end
|
436
436
|
end
|
437
437
|
|
438
438
|
it "prepares the reporting data for :create_if_missing" do
|
439
|
-
@new_resource.key(reg_child +
|
439
|
+
@new_resource.key(reg_child + "\\Judoon")
|
440
440
|
@new_resource.values([{ name: "ReportingVal3", type: :string, data: "report3" }])
|
441
441
|
@new_resource.recursive(true)
|
442
442
|
@new_resource.run_action(:create_if_missing)
|
@@ -445,7 +445,7 @@ describe Chef::Resource::RegistryKey, :windows_only, broken: true do
|
|
445
445
|
expect(@report["action"]).to eq("end")
|
446
446
|
expect(@report["resources"][0]["type"]).to eq("registry_key")
|
447
447
|
expect(@report["resources"][0]["name"]).to eq(resource_name)
|
448
|
-
expect(@report["resources"][0]["id"]).to eq(reg_child +
|
448
|
+
expect(@report["resources"][0]["id"]).to eq(reg_child + "\\Judoon")
|
449
449
|
expect(@report["resources"][0]["after"][:values]).to eq([{ name: "ReportingVal3", type: :string, data: "report3" }])
|
450
450
|
expect(@report["resources"][0]["before"][:values]).to eq([])
|
451
451
|
expect(@report["resources"][0]["result"]).to eq("create_if_missing")
|
@@ -459,48 +459,48 @@ describe Chef::Resource::RegistryKey, :windows_only, broken: true do
|
|
459
459
|
end
|
460
460
|
|
461
461
|
it "does not raise an exception if the keys do not exist but recursive is set to false" do
|
462
|
-
@new_resource.key(reg_child +
|
462
|
+
@new_resource.key(reg_child + "\\Zygons\\Zygor")
|
463
463
|
@new_resource.values([{ name: "BriskWalk", type: :string, data: "is good for health" }])
|
464
464
|
@new_resource.recursive(false)
|
465
465
|
@new_resource.run_action(:create_if_missing) # should not raise_error
|
466
|
-
expect(@registry.key_exists?(reg_child +
|
467
|
-
expect(@registry.key_exists?(reg_child +
|
466
|
+
expect(@registry.key_exists?(reg_child + "\\Zygons")).to eq(false)
|
467
|
+
expect(@registry.key_exists?(reg_child + "\\Zygons\\Zygor")).to eq(false)
|
468
468
|
end
|
469
469
|
|
470
470
|
it "does nothing if the action is create_if_missing" do
|
471
|
-
@new_resource.key(reg_child +
|
471
|
+
@new_resource.key(reg_child + "\\Zygons")
|
472
472
|
@new_resource.values([{ name: "BriskWalk", type: :string, data: "is good for health" }])
|
473
473
|
@new_resource.recursive(false)
|
474
474
|
@new_resource.run_action(:create_if_missing)
|
475
|
-
expect(@registry.key_exists?(reg_child +
|
475
|
+
expect(@registry.key_exists?(reg_child + "\\Zygons")).to eq(false)
|
476
476
|
end
|
477
477
|
|
478
478
|
it "does not raise an exception if the action create_if_missing and type key missing in values hash" do
|
479
|
-
@new_resource.key(reg_child +
|
479
|
+
@new_resource.key(reg_child + "\\Zygons")
|
480
480
|
@new_resource.values([{ name: "BriskWalk", data: "my_data" }])
|
481
481
|
@new_resource.run_action(:create_if_missing) # should not raise_error
|
482
|
-
expect(@registry.key_exists?(reg_child +
|
482
|
+
expect(@registry.key_exists?(reg_child + "\\Zygons")).to eq(false)
|
483
483
|
end
|
484
484
|
|
485
485
|
it "does not raise an exception if the action create_if_missing and data key missing in values hash" do
|
486
|
-
@new_resource.key(reg_child +
|
486
|
+
@new_resource.key(reg_child + "\\Zygons")
|
487
487
|
@new_resource.values([{ name: "BriskWalk", type: :string }])
|
488
488
|
@new_resource.run_action(:create_if_missing) # should not raise_error
|
489
|
-
expect(@registry.key_exists?(reg_child +
|
489
|
+
expect(@registry.key_exists?(reg_child + "\\Zygons")).to eq(false)
|
490
490
|
end
|
491
491
|
|
492
492
|
it "does not raise an exception if the action create_if_missing and only name key present in values hash" do
|
493
|
-
@new_resource.key(reg_child +
|
493
|
+
@new_resource.key(reg_child + "\\Zygons")
|
494
494
|
@new_resource.values([{ name: "BriskWalk" }])
|
495
495
|
@new_resource.run_action(:create_if_missing) # should not raise_error
|
496
|
-
expect(@registry.key_exists?(reg_child +
|
496
|
+
expect(@registry.key_exists?(reg_child + "\\Zygons")).to eq(false)
|
497
497
|
end
|
498
498
|
|
499
499
|
it "does not raise an exception if the action create_if_missing and all keys are present in values hash" do
|
500
|
-
@new_resource.key(reg_child +
|
500
|
+
@new_resource.key(reg_child + "\\Zygons")
|
501
501
|
@new_resource.values([{ name: "BriskWalk", type: :string, data: "my_data" }])
|
502
502
|
@new_resource.run_action(:create_if_missing) # should not raise_error
|
503
|
-
expect(@registry.key_exists?(reg_child +
|
503
|
+
expect(@registry.key_exists?(reg_child + "\\Zygons")).to eq(false)
|
504
504
|
end
|
505
505
|
end
|
506
506
|
end
|
@@ -512,61 +512,61 @@ describe Chef::Resource::RegistryKey, :windows_only, broken: true do
|
|
512
512
|
end
|
513
513
|
|
514
514
|
it "takes no action if the specified key path does not exist in the system" do
|
515
|
-
expect(@registry.key_exists?(reg_parent +
|
515
|
+
expect(@registry.key_exists?(reg_parent + "\\Osirian")).to eq(false)
|
516
516
|
|
517
|
-
@new_resource.key(reg_parent +
|
517
|
+
@new_resource.key(reg_parent + "\\Osirian")
|
518
518
|
@new_resource.recursive(false)
|
519
519
|
@new_resource.run_action(:delete)
|
520
520
|
|
521
|
-
expect(@registry.key_exists?(reg_parent +
|
521
|
+
expect(@registry.key_exists?(reg_parent + "\\Osirian")).to eq(false)
|
522
522
|
end
|
523
523
|
|
524
524
|
it "takes no action if the key exists but the value does not" do
|
525
|
-
expect(@registry.data_exists?(reg_parent +
|
525
|
+
expect(@registry.data_exists?(reg_parent + "\\Opscode", { name: "Color", type: :string, data: "Orange" })).to eq(true)
|
526
526
|
|
527
|
-
@new_resource.key(reg_parent +
|
527
|
+
@new_resource.key(reg_parent + "\\Opscode")
|
528
528
|
@new_resource.values([{ name: "LooksLike", type: :multi_string, data: %w{SeattleGrey OCOrange} }])
|
529
529
|
@new_resource.recursive(false)
|
530
530
|
@new_resource.run_action(:delete)
|
531
531
|
|
532
|
-
expect(@registry.data_exists?(reg_parent +
|
532
|
+
expect(@registry.data_exists?(reg_parent + "\\Opscode", { name: "Color", type: :string, data: "Orange" })).to eq(true)
|
533
533
|
end
|
534
534
|
|
535
535
|
it "deletes only specified values under a key path" do
|
536
|
-
@new_resource.key(reg_parent +
|
536
|
+
@new_resource.key(reg_parent + "\\Opscode")
|
537
537
|
@new_resource.values([{ name: "Opscode", type: :multi_string, data: %w{Seattle Washington} }, { name: "AKA", type: :string, data: "OC" }])
|
538
538
|
@new_resource.recursive(false)
|
539
539
|
@new_resource.run_action(:delete)
|
540
540
|
|
541
|
-
expect(@registry.data_exists?(reg_parent +
|
542
|
-
expect(@registry.value_exists?(reg_parent +
|
543
|
-
expect(@registry.value_exists?(reg_parent +
|
541
|
+
expect(@registry.data_exists?(reg_parent + "\\Opscode", { name: "Color", type: :string, data: "Orange" })).to eq(true)
|
542
|
+
expect(@registry.value_exists?(reg_parent + "\\Opscode", { name: "AKA", type: :string, data: "OC" })).to eq(false)
|
543
|
+
expect(@registry.value_exists?(reg_parent + "\\Opscode", { name: "Opscode", type: :multi_string, data: %w{Seattle Washington} })).to eq(false)
|
544
544
|
end
|
545
545
|
|
546
546
|
it "it deletes the values with the same name irrespective of it type and data" do
|
547
|
-
@new_resource.key(reg_parent +
|
547
|
+
@new_resource.key(reg_parent + "\\Opscode")
|
548
548
|
@new_resource.values([{ name: "Color", type: :multi_string, data: %w{Black Orange} }])
|
549
549
|
@new_resource.recursive(false)
|
550
550
|
@new_resource.run_action(:delete)
|
551
551
|
|
552
|
-
expect(@registry.value_exists?(reg_parent +
|
552
|
+
expect(@registry.value_exists?(reg_parent + "\\Opscode", { name: "Color", type: :string, data: "Orange" })).to eq(false)
|
553
553
|
end
|
554
554
|
|
555
555
|
it "prepares the reporting data for action :delete" do
|
556
|
-
@new_resource.key(reg_parent +
|
556
|
+
@new_resource.key(reg_parent + "\\ReportKey")
|
557
557
|
@new_resource.values([{ name: "ReportVal4", type: :string, data: "report4" }, { name: "ReportVal5", type: :string, data: "report5" }])
|
558
558
|
@new_resource.recursive(true)
|
559
559
|
@new_resource.run_action(:delete)
|
560
560
|
|
561
561
|
@report = @resource_reporter.prepare_run_data
|
562
562
|
|
563
|
-
expect(@registry.value_exists?(reg_parent +
|
563
|
+
expect(@registry.value_exists?(reg_parent + "\\ReportKey", [{ name: "ReportVal4", type: :string, data: "report4" }, { name: "ReportVal5", type: :string, data: "report5" }])).to eq(false)
|
564
564
|
|
565
565
|
expect(@report["action"]).to eq("end")
|
566
566
|
expect(@report["resources"].count).to eq(1)
|
567
567
|
expect(@report["resources"][0]["type"]).to eq("registry_key")
|
568
568
|
expect(@report["resources"][0]["name"]).to eq(resource_name)
|
569
|
-
expect(@report["resources"][0]["id"]).to eq(reg_parent +
|
569
|
+
expect(@report["resources"][0]["id"]).to eq(reg_parent + "\\ReportKey")
|
570
570
|
expect(@report["resources"][0]["before"][:values]).to eq([{ name: "ReportVal4", type: :string, data: "report4" },
|
571
571
|
{ name: "ReportVal5", type: :string, data: "report5" }])
|
572
572
|
# Not testing for after values to match since after -> new_resource values.
|
@@ -580,12 +580,12 @@ describe Chef::Resource::RegistryKey, :windows_only, broken: true do
|
|
580
580
|
Chef::Config[:why_run] = true
|
581
581
|
end
|
582
582
|
it "does nothing if the action is delete" do
|
583
|
-
@new_resource.key(reg_parent +
|
583
|
+
@new_resource.key(reg_parent + "\\OpscodeWhyRun")
|
584
584
|
@new_resource.values([{ name: "BriskWalk", type: :string, data: "is good for health" }])
|
585
585
|
@new_resource.recursive(false)
|
586
586
|
@new_resource.run_action(:delete)
|
587
587
|
|
588
|
-
expect(@registry.key_exists?(reg_parent +
|
588
|
+
expect(@registry.key_exists?(reg_parent + "\\OpscodeWhyRun")).to eq(true)
|
589
589
|
end
|
590
590
|
end
|
591
591
|
end
|
@@ -597,21 +597,21 @@ describe Chef::Resource::RegistryKey, :windows_only, broken: true do
|
|
597
597
|
end
|
598
598
|
|
599
599
|
it "takes no action if the specified key path does not exist in the system" do
|
600
|
-
expect(@registry.key_exists?(reg_parent +
|
600
|
+
expect(@registry.key_exists?(reg_parent + "\\Osirian")).to eq(false)
|
601
601
|
|
602
|
-
@new_resource.key(reg_parent +
|
602
|
+
@new_resource.key(reg_parent + "\\Osirian")
|
603
603
|
@new_resource.recursive(false)
|
604
604
|
@new_resource.run_action(:delete_key)
|
605
605
|
|
606
|
-
expect(@registry.key_exists?(reg_parent +
|
606
|
+
expect(@registry.key_exists?(reg_parent + "\\Osirian")).to eq(false)
|
607
607
|
end
|
608
608
|
|
609
609
|
it "deletes key if it has no subkeys and recursive == false" do
|
610
|
-
@new_resource.key(reg_parent +
|
610
|
+
@new_resource.key(reg_parent + "\\OpscodeTest")
|
611
611
|
@new_resource.recursive(false)
|
612
612
|
@new_resource.run_action(:delete_key)
|
613
613
|
|
614
|
-
expect(@registry.key_exists?(reg_parent +
|
614
|
+
expect(@registry.key_exists?(reg_parent + "\\OpscodeTest")).to eq(false)
|
615
615
|
end
|
616
616
|
|
617
617
|
it "raises an exception if the key has subkeys and recursive == false" do
|
@@ -621,22 +621,22 @@ describe Chef::Resource::RegistryKey, :windows_only, broken: true do
|
|
621
621
|
end
|
622
622
|
|
623
623
|
it "ignores the values under a key" do
|
624
|
-
@new_resource.key(reg_parent +
|
624
|
+
@new_resource.key(reg_parent + "\\OpscodeIgnoredValues")
|
625
625
|
# @new_resource.values([{:name=>"DontExist", :type=>:string, :data=>"These will be ignored anyways"}])
|
626
626
|
@new_resource.recursive(true)
|
627
627
|
@new_resource.run_action(:delete_key)
|
628
628
|
end
|
629
629
|
|
630
630
|
it "deletes the key if it has subkeys and recursive == true" do
|
631
|
-
@new_resource.key(reg_parent +
|
631
|
+
@new_resource.key(reg_parent + "\\Opscode")
|
632
632
|
@new_resource.recursive(true)
|
633
633
|
@new_resource.run_action(:delete_key)
|
634
634
|
|
635
|
-
expect(@registry.key_exists?(reg_parent +
|
635
|
+
expect(@registry.key_exists?(reg_parent + "\\Opscode")).to eq(false)
|
636
636
|
end
|
637
637
|
|
638
638
|
it "prepares the reporting data for action :delete_key" do
|
639
|
-
@new_resource.key(reg_parent +
|
639
|
+
@new_resource.key(reg_parent + "\\ReportKey")
|
640
640
|
@new_resource.recursive(true)
|
641
641
|
@new_resource.run_action(:delete_key)
|
642
642
|
|
@@ -644,7 +644,7 @@ describe Chef::Resource::RegistryKey, :windows_only, broken: true do
|
|
644
644
|
expect(@report["action"]).to eq("end")
|
645
645
|
expect(@report["resources"][0]["type"]).to eq("registry_key")
|
646
646
|
expect(@report["resources"][0]["name"]).to eq(resource_name)
|
647
|
-
expect(@report["resources"][0]["id"]).to eq(reg_parent +
|
647
|
+
expect(@report["resources"][0]["id"]).to eq(reg_parent + "\\ReportKey")
|
648
648
|
# Not testing for before or after values to match since
|
649
649
|
# after -> new_resource.values and
|
650
650
|
# before -> current_resource.values
|
@@ -658,18 +658,18 @@ describe Chef::Resource::RegistryKey, :windows_only, broken: true do
|
|
658
658
|
end
|
659
659
|
|
660
660
|
it "does not throw an exception if the key has subkeys but recursive is set to false" do
|
661
|
-
@new_resource.key(reg_parent +
|
661
|
+
@new_resource.key(reg_parent + "\\OpscodeWhyRun")
|
662
662
|
@new_resource.values([{ name: "BriskWalk", type: :string, data: "is good for health" }])
|
663
663
|
@new_resource.recursive(false)
|
664
664
|
@new_resource.run_action(:delete_key)
|
665
665
|
end
|
666
666
|
it "does nothing if the action is delete_key" do
|
667
|
-
@new_resource.key(reg_parent +
|
667
|
+
@new_resource.key(reg_parent + "\\OpscodeWhyRun")
|
668
668
|
@new_resource.values([{ name: "BriskWalk", type: :string, data: "is good for health" }])
|
669
669
|
@new_resource.recursive(false)
|
670
670
|
@new_resource.run_action(:delete_key)
|
671
671
|
|
672
|
-
expect(@registry.key_exists?(reg_parent +
|
672
|
+
expect(@registry.key_exists?(reg_parent + "\\OpscodeWhyRun")).to eq(true)
|
673
673
|
end
|
674
674
|
end
|
675
675
|
end
|