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
@@ -377,7 +377,7 @@ describe Chef::Resource::WindowsFirewallRule do
|
|
377
377
|
resource.icmp_type("Any")
|
378
378
|
resource.firewall_action(:notconfigured)
|
379
379
|
resource.profile(:domain)
|
380
|
-
resource.program(
|
380
|
+
resource.program("%WINDIR%\\System32\\lsass.exe")
|
381
381
|
resource.service("SomeService")
|
382
382
|
resource.interface_type(:remoteaccess)
|
383
383
|
resource.enabled(false)
|
@@ -499,7 +499,7 @@ describe Chef::Resource::WindowsFirewallRule do
|
|
499
499
|
resource.icmp_type("Any")
|
500
500
|
resource.firewall_action(:notconfigured)
|
501
501
|
resource.profile(:domain)
|
502
|
-
resource.program(
|
502
|
+
resource.program("%WINDIR%\\System32\\lsass.exe")
|
503
503
|
resource.service("SomeService")
|
504
504
|
resource.interface_type(:remoteaccess)
|
505
505
|
resource.enabled(false)
|
@@ -75,7 +75,7 @@ describe Chef::Resource::WindowsTask, :windows_only do
|
|
75
75
|
context "a System User" do
|
76
76
|
before do
|
77
77
|
resource.frequency :hourly
|
78
|
-
resource.user
|
78
|
+
resource.user "NT AUTHORITY\\SYSTEM"
|
79
79
|
end
|
80
80
|
|
81
81
|
context "for an interactive task" do
|
@@ -88,7 +88,7 @@ describe Chef::Resource::WindowsTask, :windows_only do
|
|
88
88
|
expect { resource.after_created }.to raise_error(ArgumentError, "Password is not required for system users.")
|
89
89
|
end
|
90
90
|
it "does not raises an error even when user is in lowercase" do
|
91
|
-
resource.user
|
91
|
+
resource.user "nt authority\\system"
|
92
92
|
expect { resource.after_created }.to_not raise_error
|
93
93
|
end
|
94
94
|
end
|
@@ -103,7 +103,7 @@ describe Chef::Resource::WindowsTask, :windows_only do
|
|
103
103
|
expect { resource.after_created }.to raise_error(ArgumentError, "Password is not required for system users.")
|
104
104
|
end
|
105
105
|
it "does not raises an error even when user is in lowercase" do
|
106
|
-
resource.user
|
106
|
+
resource.user "nt authority\\system"
|
107
107
|
expect { resource.after_created }.to_not raise_error
|
108
108
|
end
|
109
109
|
end
|
@@ -494,7 +494,7 @@ describe Chef::ResourceReporter do
|
|
494
494
|
|
495
495
|
context "when the resource is a RegistryKey with binary data" do
|
496
496
|
let(:new_resource) do
|
497
|
-
resource = Chef::Resource::RegistryKey.new(
|
497
|
+
resource = Chef::Resource::RegistryKey.new("Wubba\\Lubba\\Dub\\Dubs")
|
498
498
|
resource.values([ { name: "rick", type: :binary, data: 255.chr * 1 } ])
|
499
499
|
allow(resource).to receive(:cookbook_name).and_return(cookbook_name)
|
500
500
|
allow(resource).to receive(:cookbook_version).and_return(cookbook_version)
|
@@ -502,7 +502,7 @@ describe Chef::ResourceReporter do
|
|
502
502
|
end
|
503
503
|
|
504
504
|
let(:current_resource) do
|
505
|
-
resource = Chef::Resource::RegistryKey.new(
|
505
|
+
resource = Chef::Resource::RegistryKey.new("Wubba\\Lubba\\Dub\\Dubs")
|
506
506
|
resource.values([ { name: "rick", type: :binary, data: 255.chr * 1 } ])
|
507
507
|
resource
|
508
508
|
end
|
data/spec/unit/resource_spec.rb
CHANGED
@@ -348,6 +348,11 @@ describe Chef::Resource do
|
|
348
348
|
it "should recognize dynamically defined resources" do
|
349
349
|
expect(resource.defined_at).to eq("dynamically defined")
|
350
350
|
end
|
351
|
+
|
352
|
+
it "should return nil for the cookbook_version when the cookbook_name is @recipe_files" do
|
353
|
+
resource.cookbook_name = "@recipe_files"
|
354
|
+
expect(resource.cookbook_version).to be nil
|
355
|
+
end
|
351
356
|
end
|
352
357
|
|
353
358
|
describe "to_s" do
|
@@ -20,51 +20,130 @@
|
|
20
20
|
require_relative "../../spec_helper"
|
21
21
|
require "chef/secret_fetcher"
|
22
22
|
require "chef/secret_fetcher/azure_key_vault"
|
23
|
+
require "net/http/responses"
|
23
24
|
|
24
25
|
describe Chef::SecretFetcher::AzureKeyVault do
|
25
|
-
let(:config) { { vault: "
|
26
|
+
let(:config) { { vault: "my-vault" } }
|
26
27
|
let(:fetcher) { Chef::SecretFetcher::AzureKeyVault.new(config, nil) }
|
28
|
+
let(:secrets_response_body) { '{ "value" : "my secret value" }' }
|
29
|
+
let(:secrets_response_mock) do
|
30
|
+
rm = Net::HTTPSuccess.new("1.0", "400", "OK")
|
31
|
+
allow(rm).to receive(:body).and_return(secrets_response_body)
|
32
|
+
rm
|
33
|
+
end
|
34
|
+
let(:token_response_body) { %Q({"access_token":"#{access_token}","client_id":"#{client_id}","expires_in":"86294","expires_on":"1627761860","ext_expires_in":"86399","not_before":"1627675160","resource":"https://vault.azure.net","token_type":"Bearer"}) }
|
35
|
+
let(:access_token) { "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsIng1dCI6Im5PbzNaRHJPRFhFSzFqS1doWHNsSFJfS1hFZyIsImtpZCI6Im5PbzNaRHJPRFhFSzFqS1doWHNsSFJfS1hFZyJ9.eyJhdWQiOiJodHRwczovL3ZhdWx0LmF6dXJlLm5ldCIsImlzcyI6Imh0dHBzOi8vc3RzLndpbmRvd3MubmV0L2E5ZTY2ZDhkLTA1ZTAtNGMwMC1iOWRkLWM0Yjc3M2U5MWNhNi8iLCJpYXQiOjE2Mjc2NzUxNjAsIm5iZiI6MTYyNzY3NTE2MCwiZXhwIjoxNjI3NzYxODYwLCJhaW8iOiJFMlpnWUhCWGplaTdWS214eEh6bjdoSWpNZFlMQUE9PSIsImFwcGlkIjoiNjU2Mjc1MjEtMzYzYi00ZDk2LTkyMTctMjcIsIm9pZCI6IjNiZjI1NjVhLWY4NWQtNDBiNy1hZWJkLTNlZDA1ZDA0N2FmNiIsInJoIjoiMC5BUk1BalczbXFlQUZBRXk1M2NTM2Mta2NwaUYxWW1VN05wWk5raGNuRGpuZEwxb1RBQUEuIiwic3ViIjoiM2JmMjU2NWEtZjg1ZC00MGI3LWFlYmQtM2VkMDVkMDQ3YWY2IiwidGlkIjoiYTllNjZkOGQtMDVlMC00YzAwLWI5ZGQtYzRiNzczZTkxY2E2IiwidXRpIjoibXlzeHpSRTV3ay1ibTFlYkNqc09BQSIsInZlciI6IjEuMCIsInhtc19taXJpZCI6Ii9zdWJzY3JpcHRpb25zLzYzNDJkZDZkLTc1NTQtNDJjOS04NTM2LTdkZmU3MmY1MWZhZC9yZXNvdXJjZWdyb3Vwcy9pbWFnZS1waXBlbGluZS1ydW5uZXItcWEtZWFzdHVzMi1yZy9wcm92aWRlcnMvTWljcm9zb2Z0Lk1hbmFnZWRJZGVudGl0eS91c2VyQXNzaWduZWRJZGVudGl0aWVzL2ltYWdlLXBpcGVsaW5lLXJ1bm5lci1xYS1lYXN0dXMyLW1pIn0.BquzjN6d0g4zlvkbkdVwNEfRxIXSmxYwCHMk6UG3iza2fVioiOrcoP4Cp9P5--AB4G_CAhIXaP7YIZs3mq05QiDjSvkVAM0t67UPGhEr66sNXkV72iZBnKca_auh6EHsjPfxeVHkE1wdrsncrYdKhzgO4IAj8Jg4N5qjcE2q-OkliadmEuTwrhPhq" }
|
36
|
+
let(:token_response_mock) do
|
37
|
+
rm = Net::HTTPSuccess.new("1.0", "400", "OK")
|
38
|
+
allow(rm).to receive(:body).and_return(token_response_body)
|
39
|
+
rm
|
40
|
+
end
|
41
|
+
let(:client_id) { SecureRandom.uuid }
|
42
|
+
let(:http_mock) { instance_double("Net::HTTP", :use_ssl= => nil) }
|
43
|
+
let(:token_uri) { URI.parse("http://169.254.169.254/metadata/identity/oauth2/token") }
|
44
|
+
let(:vault_name) { "my-vault" }
|
45
|
+
let(:secret_name) { "my-secret" }
|
46
|
+
let(:vault_secret_uri) { URI.parse("https://#{vault_name}.vault.azure.net/secrets/#{secret_name}/?api-version=7.2") }
|
47
|
+
|
48
|
+
before do
|
49
|
+
# Cache these up front so we can pass into allow statements without hitting:
|
50
|
+
# URI received :parse with unexpected arguments
|
51
|
+
token_uri
|
52
|
+
vault_secret_uri
|
53
|
+
end
|
54
|
+
|
55
|
+
before do
|
56
|
+
allow(Net::HTTP).to receive(:new).and_return(http_mock)
|
57
|
+
allow(URI).to receive(:parse).with("http://169.254.169.254/metadata/identity/oauth2/token").and_return(token_uri)
|
58
|
+
allow(URI).to receive(:parse).with("https://#{vault_name}.vault.azure.net/secrets/#{secret_name}/?api-version=7.2").and_return(vault_secret_uri)
|
59
|
+
allow(http_mock).to receive(:get).with(token_uri, { "Metadata" => "true" }).and_return(token_response_mock)
|
60
|
+
allow(http_mock).to receive(:get).with(vault_secret_uri, { "Authorization" => "Bearer #{access_token}", "Content-Type" => "application/json" }).and_return(secrets_response_mock)
|
61
|
+
end
|
62
|
+
|
63
|
+
describe "#validate!" do
|
64
|
+
it "raises error when more than one is provided: :object_id, :client_id, :mi_res_id" do
|
65
|
+
expect { Chef::SecretFetcher::AzureKeyVault.new({ object_id: "abc", client_id: "abc", mi_res_id: "abc" }, nil).validate! }.to raise_error(Chef::Exceptions::Secret::ConfigurationInvalid)
|
66
|
+
expect { Chef::SecretFetcher::AzureKeyVault.new({ object_id: "abc", client_id: "abc" }, nil).validate! }.to raise_error(Chef::Exceptions::Secret::ConfigurationInvalid)
|
67
|
+
expect { Chef::SecretFetcher::AzureKeyVault.new({ object_id: "abc", mi_res_id: "abc" }, nil).validate! }.to raise_error(Chef::Exceptions::Secret::ConfigurationInvalid)
|
68
|
+
expect { Chef::SecretFetcher::AzureKeyVault.new({ client_id: "abc", mi_res_id: "abc" }, nil).validate! }.to raise_error(Chef::Exceptions::Secret::ConfigurationInvalid)
|
69
|
+
end
|
70
|
+
end
|
27
71
|
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
72
|
+
describe "#fetch_token" do
|
73
|
+
context "when Net::HTTPBadRequest is returned and the error description contains \"Identity not found\"" do
|
74
|
+
let(:token_response_mock) { Net::HTTPBadRequest.new("1.0", "400", "Bad Request") }
|
75
|
+
|
76
|
+
before do
|
77
|
+
allow(fetcher).to receive(:fetch_token).and_call_original
|
78
|
+
allow(token_response_mock).to receive(:body).and_return('{"error":"invalid_request","error_description":"Identity not found"}')
|
79
|
+
end
|
32
80
|
|
33
|
-
|
34
|
-
|
35
|
-
|
81
|
+
it "raises Chef::Exceptions::Secret::Azure::IdentityNotFound" do
|
82
|
+
expect { fetcher.send(:fetch_token) }.to raise_error(Chef::Exceptions::Secret::Azure::IdentityNotFound)
|
83
|
+
end
|
36
84
|
end
|
37
85
|
|
38
|
-
context "
|
39
|
-
let(:
|
86
|
+
context "when :object_id is provided" do
|
87
|
+
let(:object_id) { SecureRandom.uuid }
|
88
|
+
let(:config) { { vault: "my-vault", object_id: object_id } }
|
89
|
+
|
90
|
+
it "adds client_id to request params" do
|
91
|
+
fetcher.send(:fetch_token)
|
92
|
+
expect(token_uri.query).to match(/object_id=#{object_id}/)
|
93
|
+
end
|
94
|
+
end
|
95
|
+
|
96
|
+
context "when :client_id is provided" do
|
97
|
+
let(:config) { { vault: "my-vault", client_id: client_id } }
|
98
|
+
|
99
|
+
it "adds client_id to request params" do
|
100
|
+
fetcher.send(:fetch_token)
|
101
|
+
expect(token_uri.query).to match(/client_id=#{client_id}/)
|
102
|
+
end
|
103
|
+
end
|
104
|
+
|
105
|
+
context "when :mi_res_id is provided" do
|
106
|
+
let(:mi_res_id) { SecureRandom.uuid }
|
107
|
+
let(:config) { { vault: "my-vault", mi_res_id: mi_res_id } }
|
108
|
+
|
109
|
+
it "adds client_id to request params" do
|
110
|
+
fetcher.send(:fetch_token)
|
111
|
+
expect(token_uri.query).to match(/mi_res_id=#{mi_res_id}/)
|
112
|
+
end
|
113
|
+
end
|
114
|
+
end
|
115
|
+
|
116
|
+
describe "#fetch" do
|
117
|
+
context "when vault name is only provided in the secret name" do
|
118
|
+
let(:secrets_response_body) { '{ "value" : "my secret value" }' }
|
40
119
|
let(:config) { {} }
|
41
120
|
it "fetches the value" do
|
42
|
-
expect(fetcher.fetch("
|
121
|
+
expect(fetcher.fetch("my-vault/my-secret")).to eq "my secret value"
|
43
122
|
end
|
44
123
|
end
|
45
124
|
|
46
|
-
context "
|
125
|
+
context "when vault name is not provided in the secret name" do
|
47
126
|
context "and vault name is not provided in config" do
|
48
127
|
let(:config) { {} }
|
49
128
|
it "raises a ConfigurationInvalid exception" do
|
50
|
-
expect { fetcher.fetch("
|
129
|
+
expect { fetcher.fetch("my-secret") }.to raise_error(Chef::Exceptions::Secret::ConfigurationInvalid)
|
51
130
|
end
|
52
131
|
end
|
53
132
|
|
54
133
|
context "and vault name is provided in config" do
|
55
|
-
let(:config) { { vault: "
|
134
|
+
let(:config) { { vault: "my-vault" } }
|
56
135
|
it "fetches the value" do
|
57
|
-
expect(fetcher.fetch("
|
136
|
+
expect(fetcher.fetch("my-secret")).to eq "my secret value"
|
58
137
|
end
|
59
138
|
end
|
60
139
|
end
|
61
|
-
|
62
|
-
|
63
|
-
let(:
|
140
|
+
|
141
|
+
context "when an error response is received in the response body" do
|
142
|
+
let(:config) { { vault: "my-vault" } }
|
143
|
+
let(:secrets_response_body) { '{ "error" : { "code" : 404, "message" : "secret not found" } }' }
|
64
144
|
it "raises FetchFailed" do
|
65
|
-
expect { fetcher.fetch("
|
145
|
+
expect { fetcher.fetch("my-secret") }.to raise_error(Chef::Exceptions::Secret::FetchFailed)
|
66
146
|
end
|
67
147
|
end
|
68
148
|
end
|
69
149
|
end
|
70
|
-
|
@@ -65,6 +65,52 @@ describe Chef::SecretFetcher::HashiVault do
|
|
65
65
|
fetcher.validate!
|
66
66
|
end
|
67
67
|
end
|
68
|
+
|
69
|
+
context "and using auth_method: :approle" do
|
70
|
+
it "raises ConfigurationInvalid message when :approle_name or :approle_id are not specified" do
|
71
|
+
fetcher = Chef::SecretFetcher::HashiVault.new( { auth_method: :approle, vault_addr: "https://vault.example.com:8200" }, run_context)
|
72
|
+
expect { fetcher.validate! }.to raise_error(Chef::Exceptions::Secret::ConfigurationInvalid)
|
73
|
+
end
|
74
|
+
|
75
|
+
it "authenticates using the approle_id and approle_secret_id during validation when all configuration is correct" do
|
76
|
+
fetcher = Chef::SecretFetcher::HashiVault.new({
|
77
|
+
auth_method: :approle,
|
78
|
+
approle_id: "idguid",
|
79
|
+
approle_secret_id: "secretguid",
|
80
|
+
vault_addr: "https://vault.example.com:8200" },
|
81
|
+
run_context)
|
82
|
+
auth = instance_double(Vault::Authenticate)
|
83
|
+
allow(auth).to receive(:approle)
|
84
|
+
allow(Vault).to receive(:auth).and_return(auth)
|
85
|
+
expect(auth).to receive(:approle).with("idguid", "secretguid")
|
86
|
+
fetcher.validate!
|
87
|
+
end
|
88
|
+
|
89
|
+
it "looks up the :role_id and :secret_id when all configuration is correct" do
|
90
|
+
fetcher = Chef::SecretFetcher::HashiVault.new({
|
91
|
+
auth_method: :approle,
|
92
|
+
approle_name: "myapprole",
|
93
|
+
token: "t.1234abcd",
|
94
|
+
vault_addr: "https://vault.example.com:8200" },
|
95
|
+
run_context)
|
96
|
+
approle = instance_double(Vault::AppRole)
|
97
|
+
auth = instance_double(Vault::Authenticate)
|
98
|
+
allow(Vault).to receive(:approle).and_return(approle)
|
99
|
+
allow(approle).to receive(:role_id).with("myapprole").and_return("idguid")
|
100
|
+
allow(approle).to receive(:create_secret_id).with("myapprole").and_return(Vault::Secret.new({
|
101
|
+
data: {
|
102
|
+
secret_id: "secretguid",
|
103
|
+
secret_id_accessor: "accessor_guid",
|
104
|
+
secret_id_ttl: 0,
|
105
|
+
},
|
106
|
+
lease_duration: 0,
|
107
|
+
lease_id: "",
|
108
|
+
}))
|
109
|
+
allow(Vault).to receive(:auth).and_return(auth)
|
110
|
+
expect(auth).to receive(:approle).with("idguid", "secretguid")
|
111
|
+
fetcher.validate!
|
112
|
+
end
|
113
|
+
end
|
68
114
|
end
|
69
115
|
|
70
116
|
context "when fetching a secret from Hashi Vault" do
|
@@ -132,7 +132,7 @@ describe Chef::Util::Backup do
|
|
132
132
|
end
|
133
133
|
|
134
134
|
it "uses the configured Chef::Config[:file_backup_path] and strips the drive on windows" do
|
135
|
-
expect(@backup).to receive(:path).and_return(
|
135
|
+
expect(@backup).to receive(:path).and_return("c:\\a\\b\\c.txt")
|
136
136
|
Chef::Config[:file_backup_path] = 'c:\backupdir'
|
137
137
|
expect(@backup.send(:backup_path)).to match(%r|^c:\\backupdir[\\/]+a\\b\\c.txt.chef-\d{14}.\d{6}$|)
|
138
138
|
end
|
@@ -23,12 +23,12 @@ describe Chef::Win32::Registry do
|
|
23
23
|
|
24
24
|
let(:value1) { { name: "one", type: :string, data: "1" } }
|
25
25
|
let(:value1_upcase_name) { { name: "ONE", type: :string, data: "1" } }
|
26
|
-
let(:key_path) {
|
27
|
-
let(:key) {
|
26
|
+
let(:key_path) { "HKCU\\Software\\OpscodeNumbers" }
|
27
|
+
let(:key) { "Software\\OpscodeNumbers" }
|
28
28
|
let(:key_parent) { "Software" }
|
29
29
|
let(:key_to_delete) { "OpscodeNumbers" }
|
30
30
|
let(:sub_key) { "OpscodePrimes" }
|
31
|
-
let(:missing_key_path) {
|
31
|
+
let(:missing_key_path) { "HKCU\\Software" }
|
32
32
|
let(:registry) { Chef::Win32::Registry.new }
|
33
33
|
let(:hive_mock) { double("::Win32::Registry::HKEY_CURRENT_USER") }
|
34
34
|
let(:reg_mock) { double("reg") }
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: chef
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 17.
|
4
|
+
version: 17.9.18
|
5
5
|
platform: universal-mingw32
|
6
6
|
authors:
|
7
7
|
- Adam Jacob
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-12-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: chef-config
|
@@ -16,28 +16,28 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - '='
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 17.
|
19
|
+
version: 17.9.18
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - '='
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 17.
|
26
|
+
version: 17.9.18
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: chef-utils
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
31
|
- - '='
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: 17.
|
33
|
+
version: 17.9.18
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - '='
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: 17.
|
40
|
+
version: 17.9.18
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: train-core
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -426,6 +426,20 @@ dependencies:
|
|
426
426
|
- - "<"
|
427
427
|
- !ruby/object:Gem::Version
|
428
428
|
version: '3.0'
|
429
|
+
- !ruby/object:Gem::Dependency
|
430
|
+
name: corefoundation
|
431
|
+
requirement: !ruby/object:Gem::Requirement
|
432
|
+
requirements:
|
433
|
+
- - "~>"
|
434
|
+
- !ruby/object:Gem::Version
|
435
|
+
version: 0.3.4
|
436
|
+
type: :runtime
|
437
|
+
prerelease: false
|
438
|
+
version_requirements: !ruby/object:Gem::Requirement
|
439
|
+
requirements:
|
440
|
+
- - "~>"
|
441
|
+
- !ruby/object:Gem::Version
|
442
|
+
version: 0.3.4
|
429
443
|
- !ruby/object:Gem::Dependency
|
430
444
|
name: proxifier
|
431
445
|
requirement: !ruby/object:Gem::Requirement
|
@@ -947,7 +961,7 @@ files:
|
|
947
961
|
- distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/mi.dll
|
948
962
|
- distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/miutils.dll
|
949
963
|
- distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/mscordaccore.dll
|
950
|
-
- distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/mscordaccore_amd64_amd64_5.0.
|
964
|
+
- distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/mscordaccore_amd64_amd64_5.0.521.16609.dll
|
951
965
|
- distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/mscordbi.dll
|
952
966
|
- distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/mscorlib.dll
|
953
967
|
- distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/mscorrc.dll
|
@@ -1634,7 +1648,6 @@ files:
|
|
1634
1648
|
- lib/chef/provider/group/groupmod.rb
|
1635
1649
|
- lib/chef/provider/group/pw.rb
|
1636
1650
|
- lib/chef/provider/group/solaris.rb
|
1637
|
-
- lib/chef/provider/group/suse.rb
|
1638
1651
|
- lib/chef/provider/group/usermod.rb
|
1639
1652
|
- lib/chef/provider/group/windows.rb
|
1640
1653
|
- lib/chef/provider/http_request.rb
|
@@ -2508,6 +2521,7 @@ files:
|
|
2508
2521
|
- spec/functional/resource/launchd_spec.rb
|
2509
2522
|
- spec/functional/resource/link_spec.rb
|
2510
2523
|
- spec/functional/resource/locale_spec.rb
|
2524
|
+
- spec/functional/resource/macos_userdefaults_spec.rb
|
2511
2525
|
- spec/functional/resource/mount_spec.rb
|
2512
2526
|
- spec/functional/resource/msu_package_spec.rb
|
2513
2527
|
- spec/functional/resource/ohai_spec.rb
|
@@ -2631,6 +2645,7 @@ files:
|
|
2631
2645
|
- spec/unit/api_client_v1_spec.rb
|
2632
2646
|
- spec/unit/application/agent_spec.rb
|
2633
2647
|
- spec/unit/application/apply_spec.rb
|
2648
|
+
- spec/unit/application/base_spec.rb
|
2634
2649
|
- spec/unit/application/client_spec.rb
|
2635
2650
|
- spec/unit/application/exit_code_spec.rb
|
2636
2651
|
- spec/unit/application/server_spec.rb
|
@@ -2764,6 +2779,7 @@ files:
|
|
2764
2779
|
- spec/unit/mixin/user_context_spec.rb
|
2765
2780
|
- spec/unit/mixin/versioned_api_spec.rb
|
2766
2781
|
- spec/unit/mixin/which.rb
|
2782
|
+
- spec/unit/mixin/why_run_spec.rb
|
2767
2783
|
- spec/unit/mixin/windows_architecture_helper_spec.rb
|
2768
2784
|
- spec/unit/mixin/xml_escape_spec.rb
|
2769
2785
|
- spec/unit/monologger_spec.rb
|
@@ -2803,7 +2819,6 @@ files:
|
|
2803
2819
|
- spec/unit/provider/group/groupmod_spec.rb
|
2804
2820
|
- spec/unit/provider/group/pw_spec.rb
|
2805
2821
|
- spec/unit/provider/group/solaris_spec.rb
|
2806
|
-
- spec/unit/provider/group/suse_spec.rb
|
2807
2822
|
- spec/unit/provider/group/usermod_spec.rb
|
2808
2823
|
- spec/unit/provider/group/windows_spec.rb
|
2809
2824
|
- spec/unit/provider/group_spec.rb
|
@@ -3152,7 +3167,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
3152
3167
|
- !ruby/object:Gem::Version
|
3153
3168
|
version: '0'
|
3154
3169
|
requirements: []
|
3155
|
-
rubygems_version: 3.2.
|
3170
|
+
rubygems_version: 3.2.32
|
3156
3171
|
signing_key:
|
3157
3172
|
specification_version: 4
|
3158
3173
|
summary: A systems integration framework, built to bring the benefits of configuration
|
Binary file
|
@@ -1,82 +0,0 @@
|
|
1
|
-
#
|
2
|
-
# Author:: AJ Christensen (<aj@chef.io>)
|
3
|
-
# Copyright:: Copyright (c) Chef Software Inc.
|
4
|
-
# License:: Apache License, Version 2.0
|
5
|
-
#
|
6
|
-
# Licensed under the Apache License, Version 2.0 (the "License");
|
7
|
-
# you may not use this file except in compliance with the License.
|
8
|
-
# You may obtain a copy of the License at
|
9
|
-
#
|
10
|
-
# http://www.apache.org/licenses/LICENSE-2.0
|
11
|
-
#
|
12
|
-
# Unless required by applicable law or agreed to in writing, software
|
13
|
-
# distributed under the License is distributed on an "AS IS" BASIS,
|
14
|
-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
15
|
-
# See the License for the specific language governing permissions and
|
16
|
-
# limitations under the License.
|
17
|
-
#
|
18
|
-
|
19
|
-
require_relative "groupadd"
|
20
|
-
require "etc" unless defined?(Etc)
|
21
|
-
|
22
|
-
class Chef
|
23
|
-
class Provider
|
24
|
-
class Group
|
25
|
-
class Suse < Chef::Provider::Group::Groupadd
|
26
|
-
provides :group, platform: "suse", platform_version: "< 12.0"
|
27
|
-
|
28
|
-
def load_current_resource
|
29
|
-
super
|
30
|
-
end
|
31
|
-
|
32
|
-
def define_resource_requirements
|
33
|
-
super
|
34
|
-
requirements.assert(:all_actions) do |a|
|
35
|
-
a.assertion { ::File.exist?("/usr/sbin/groupmod") }
|
36
|
-
a.failure_message Chef::Exceptions::Group, "Could not find binary /usr/sbin/groupmod for #{new_resource.name}"
|
37
|
-
# No whyrun alternative: this component should be available in the base install of any given system that uses it
|
38
|
-
end
|
39
|
-
|
40
|
-
requirements.assert(:create, :manage, :modify) do |a|
|
41
|
-
a.assertion do
|
42
|
-
|
43
|
-
to_add(new_resource.members).all? { |member| Etc.getpwnam(member) }
|
44
|
-
rescue
|
45
|
-
false
|
46
|
-
|
47
|
-
end
|
48
|
-
a.failure_message Chef::Exceptions::Group, "Could not add users #{to_add(new_resource.members).join(", ")} to #{new_resource.group_name}: one of these users does not exist"
|
49
|
-
a.whyrun "Could not find one of these users: #{to_add(new_resource.members).join(", ")}. Assuming it will be created by a prior step"
|
50
|
-
end
|
51
|
-
end
|
52
|
-
|
53
|
-
def set_members(members)
|
54
|
-
to_remove(members).each do |member|
|
55
|
-
remove_member(member)
|
56
|
-
end
|
57
|
-
|
58
|
-
to_add(members).each do |member|
|
59
|
-
add_member(member)
|
60
|
-
end
|
61
|
-
end
|
62
|
-
|
63
|
-
def to_add(members)
|
64
|
-
members - current_resource.members
|
65
|
-
end
|
66
|
-
|
67
|
-
def add_member(member)
|
68
|
-
shell_out!("groupmod", "-A", member, new_resource.group_name)
|
69
|
-
end
|
70
|
-
|
71
|
-
def to_remove(members)
|
72
|
-
current_resource.members - members
|
73
|
-
end
|
74
|
-
|
75
|
-
def remove_member(member)
|
76
|
-
shell_out!("groupmod", "-R", member, new_resource.group_name)
|
77
|
-
end
|
78
|
-
|
79
|
-
end
|
80
|
-
end
|
81
|
-
end
|
82
|
-
end
|
@@ -1,90 +0,0 @@
|
|
1
|
-
#
|
2
|
-
# Author:: Tom Duffield (<tom@chef.io>)
|
3
|
-
# Copyright:: Copyright (c) Chef Software Inc.
|
4
|
-
# License:: Apache License, Version 2.0
|
5
|
-
#
|
6
|
-
# Licensed under the Apache License, Version 2.0 (the "License");
|
7
|
-
# you may not use this file except in compliance with the License.
|
8
|
-
# You may obtain a copy of the License at
|
9
|
-
#
|
10
|
-
# http://www.apache.org/licenses/LICENSE-2.0
|
11
|
-
#
|
12
|
-
# Unless required by applicable law or agreed to in writing, software
|
13
|
-
# distributed under the License is distributed on an "AS IS" BASIS,
|
14
|
-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
15
|
-
# See the License for the specific language governing permissions and
|
16
|
-
# limitations under the License.
|
17
|
-
#
|
18
|
-
|
19
|
-
require "spec_helper"
|
20
|
-
|
21
|
-
describe Chef::Provider::Group::Suse do
|
22
|
-
let(:node) { Chef::Node.new }
|
23
|
-
let(:events) { Chef::EventDispatch::Dispatcher.new }
|
24
|
-
let(:run_context) { Chef::RunContext.new(node, {}, events) }
|
25
|
-
let(:new_members) { %w{root new_user} }
|
26
|
-
let(:new_resource) do
|
27
|
-
Chef::Resource::Group.new("new_group").tap do |r|
|
28
|
-
r.gid 50
|
29
|
-
r.members new_members
|
30
|
-
r.system false
|
31
|
-
r.non_unique false
|
32
|
-
end
|
33
|
-
end
|
34
|
-
let(:current_resource) do
|
35
|
-
Chef::Resource::Group.new("new_group").tap do |r|
|
36
|
-
r.gid 50
|
37
|
-
r.members %w{root}
|
38
|
-
r.system false
|
39
|
-
r.non_unique false
|
40
|
-
end
|
41
|
-
end
|
42
|
-
let(:provider) do
|
43
|
-
described_class.new(new_resource, run_context).tap do |p|
|
44
|
-
p.current_resource = current_resource
|
45
|
-
end
|
46
|
-
end
|
47
|
-
|
48
|
-
describe "when determining the current group state" do
|
49
|
-
before(:each) do
|
50
|
-
allow(File).to receive(:exist?).and_return(true)
|
51
|
-
provider.action = :create
|
52
|
-
provider.define_resource_requirements
|
53
|
-
end
|
54
|
-
|
55
|
-
# Checking for required binaries is already done in the spec
|
56
|
-
# for Chef::Provider::Group - no need to repeat it here. We'll
|
57
|
-
# include only what's specific to this provider.
|
58
|
-
it "should raise an error if the required binary /usr/sbin/groupmod doesn't exist" do
|
59
|
-
expect(File).to receive(:exist?).with("/usr/sbin/groupmod").and_return(false)
|
60
|
-
expect { provider.process_resource_requirements }.to raise_error(Chef::Exceptions::Group)
|
61
|
-
end
|
62
|
-
|
63
|
-
it "should raise error if one of the member users does not exist" do
|
64
|
-
expect(Etc).to receive(:getpwnam).with("new_user").and_raise ArgumentError
|
65
|
-
expect { provider.process_resource_requirements }.to raise_error(Chef::Exceptions::Group)
|
66
|
-
end
|
67
|
-
end
|
68
|
-
|
69
|
-
describe "#set_members" do
|
70
|
-
it "should add missing members and remove deleted members" do
|
71
|
-
expect(provider).not_to receive(:remove_member)
|
72
|
-
expect(provider).to receive(:add_member).with("new_user")
|
73
|
-
provider.set_members(new_members)
|
74
|
-
end
|
75
|
-
end
|
76
|
-
|
77
|
-
describe "#add_member" do
|
78
|
-
it "should call out to groupmod to add user" do
|
79
|
-
expect(provider).to receive(:shell_out_compacted!).with("groupmod", "-A", "new_user", "new_group")
|
80
|
-
provider.add_member("new_user")
|
81
|
-
end
|
82
|
-
end
|
83
|
-
|
84
|
-
describe "#remove_member" do
|
85
|
-
it "should call out to groupmod to remove user" do
|
86
|
-
expect(provider).to receive(:shell_out_compacted!).with("groupmod", "-R", "new_user", "new_group")
|
87
|
-
provider.remove_member("new_user")
|
88
|
-
end
|
89
|
-
end
|
90
|
-
end
|