diff options
38 files changed, 329 insertions, 329 deletions
diff --git a/chef-config/lib/chef-config/package_task.rb b/chef-config/lib/chef-config/package_task.rb index 6a5c911c43..ae5acef258 100644 --- a/chef-config/lib/chef-config/package_task.rb +++ b/chef-config/lib/chef-config/package_task.rb @@ -216,7 +216,7 @@ module ChefConfig # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. - + #!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! # NOTE: This file is generated by running `rake version` in the top level of # this repo. Do not edit this manually. Edit the VERSION file and run the rake @@ -227,7 +227,7 @@ module ChefConfig #{module_name.upcase}_ROOT = File.expand_path("../..", __FILE__) VERSION = #{use_versionstring ? "Chef::VersionString.new(\"#{version}\")" : "\"#{version}\""} end - + # # NOTE: the Chef::Version class is defined in version_class.rb # diff --git a/lib/chef/cookbook/metadata.rb b/lib/chef/cookbook/metadata.rb index 8a70a77168..03e2d7a090 100644 --- a/lib/chef/cookbook/metadata.rb +++ b/lib/chef/cookbook/metadata.rb @@ -653,7 +653,7 @@ class Chef The dependency specification syntax you are using is no longer valid. You may not specify more than one version constraint for a particular cookbook. Consult https://docs.chef.io/config_rb_metadata.html for the updated syntax. - + Called by: #{caller_name} '#{dep_name}', #{version_constraints.map { |vc| vc.inspect }.join(", ")} Called from: #{caller[0...5].map { |line| " " + line }.join("\n")} @@ -672,7 +672,7 @@ OBSOLETED upgraded to Chef 0.10.0, be aware that you no may longer use "<<" and ">>" for 'less than' and 'greater than'; use '<' and '>' instead. Consult https://docs.chef.io/config_rb_metadata.html for more information. - + Called by: #{caller_name} '#{dep_name}', '#{constraint_str}' Called from: #{caller[0...5].map { |line| " " + line }.join("\n")} diff --git a/lib/chef/formatters/error_inspectors/api_error_formatting.rb b/lib/chef/formatters/error_inspectors/api_error_formatting.rb index f306a5a5f1..954eebafdb 100644 --- a/lib/chef/formatters/error_inspectors/api_error_formatting.rb +++ b/lib/chef/formatters/error_inspectors/api_error_formatting.rb @@ -28,7 +28,7 @@ class Chef def describe_network_errors(error_description) error_description.section("Networking Error:", <<~E) #{exception.message} - + Your chef_server_url may be misconfigured, or the network could be down. E error_description.section("Relevant Config Settings:", <<~E) @@ -40,25 +40,25 @@ E error_description.section("Authentication Error:", <<~E) Received an EOF on transport socket. This almost always indicates a network error external to chef-client. Some causes include: - + - Blocking ICMP Dest Unreachable (breaking Path MTU Discovery) - IPsec or VPN tunnelling / TCP Encapsulation MTU issues - Jumbo frames configured only on one side (breaking Path MTU) - Jumbo frames configured on a LAN that does not support them - Proxies or Load Balancers breaking large POSTs - Broken TCP offload in network drivers/hardware - + Try sending large pings to the destination: - + windows: ping server.example.com -f -l 9999 unix: ping server.example.com -s 9999 - + Try sending large POSTs to the destination (any HTTP code returned is success): - + e.g.: curl http://server.example.com/`printf '%*s' 9999 '' | tr ' ' 'a'` - + Try disabling TCP Offload Engines (TOE) in your ethernet drivers. - + windows: Disable-NetAdapterChecksumOffload * -TcpIPv4 -UdpIPv4 -IpIPv4 -NoRestart Disable-NetAdapterLso * -IPv4 -NoRestart @@ -66,7 +66,7 @@ E Restart-NetAdapter * unix(bash): for i in rx tx sg tso ufo gso gro lro rxvlan txvlan rxhash; do /sbin/ethtool -K eth0 $i off; done - + In some cases the underlying virtualization layer (Xen, VMware, KVM, Hyper-V, etc) may have broken virtual networking code. E @@ -89,7 +89,7 @@ E chef_server_url "#{server_url}" node_name "#{username}" client_key "#{api_key}" - + If these settings are correct, your client_key may be invalid, or you may have a chef user with the same client name as this node. E diff --git a/lib/chef/formatters/error_inspectors/cookbook_resolve_error_inspector.rb b/lib/chef/formatters/error_inspectors/cookbook_resolve_error_inspector.rb index a45d5ea45f..a046f1a277 100644 --- a/lib/chef/formatters/error_inspectors/cookbook_resolve_error_inspector.rb +++ b/lib/chef/formatters/error_inspectors/cookbook_resolve_error_inspector.rb @@ -59,7 +59,7 @@ class Chef error_description.section("Authorization Error", <<~E) This client is not authorized to read some of the information required to access its cookbooks (HTTP 403). - + To access its cookbooks, a client needs to be able to read its environment and all of the cookbooks in its expanded run list. E diff --git a/lib/chef/formatters/error_inspectors/registration_error_inspector.rb b/lib/chef/formatters/error_inspectors/registration_error_inspector.rb index cfc536192c..b912800bc5 100644 --- a/lib/chef/formatters/error_inspectors/registration_error_inspector.rb +++ b/lib/chef/formatters/error_inspectors/registration_error_inspector.rb @@ -32,7 +32,7 @@ class Chef E error_description.section("Relevant Config Settings:", <<~E) chef_server_url "#{server_url}" - + If your chef_server_url is correct, your network could be down. E when Chef::Exceptions::PrivateKeyMissing @@ -74,7 +74,7 @@ E chef_server_url "#{server_url}" validation_client_name "#{username}" validation_key "#{api_key}" - + If these settings are correct, your validation_key may be invalid. E end diff --git a/lib/chef/formatters/error_inspectors/run_list_expansion_error_inspector.rb b/lib/chef/formatters/error_inspectors/run_list_expansion_error_inspector.rb index 93e29e4017..9d46465947 100644 --- a/lib/chef/formatters/error_inspectors/run_list_expansion_error_inspector.rb +++ b/lib/chef/formatters/error_inspectors/run_list_expansion_error_inspector.rb @@ -38,7 +38,7 @@ class Chef when Errno::ECONNREFUSED, Timeout::Error, Errno::ETIMEDOUT, SocketError error_description.section("Networking Error:", <<~E) #{exception.message} - + Your chef_server_url may be misconfigured, or the network could be down. E when Net::HTTPServerException, Net::HTTPFatalError @@ -85,7 +85,7 @@ E chef_server_url "#{server_url}" node_name "#{username}" client_key "#{api_key}" - + If these settings are correct, your client_key may be invalid. E when Net::HTTPForbidden diff --git a/lib/chef/knife/cookbook_upload.rb b/lib/chef/knife/cookbook_upload.rb index 854945bf5f..b19c352b79 100644 --- a/lib/chef/knife/cookbook_upload.rb +++ b/lib/chef/knife/cookbook_upload.rb @@ -212,7 +212,7 @@ class Chef ui.warn(<<~WARNING) The cookbooks: #{cookbook_repo.merged_cookbooks.join(', ')} exist in multiple places in your cookbook_path. A composite version of these cookbooks has been compiled for uploading. - + #{ui.color('IMPORTANT:', :red, :bold)} In a future version of Chef, this behavior will be removed and you will no longer be able to have the same version of a cookbook in multiple places in your cookbook_path. WARNING diff --git a/lib/chef/knife/ssl_check.rb b/lib/chef/knife/ssl_check.rb index e3005711fe..858ab3cf89 100644 --- a/lib/chef/knife/ssl_check.rb +++ b/lib/chef/knife/ssl_check.rb @@ -154,23 +154,23 @@ class Chef ui.warn(<<~BAD_CERTS) There are invalid certificates in your trusted_certs_dir. OpenSSL will not use the following certificates when verifying SSL connections: - + #{cert_debug_msg} - + #{ui.color("TO FIX THESE WARNINGS:", :bold)} - + We are working on documentation for resolving common issues uncovered here. - + * If the certificate is generated by the server, you may try redownloading the server's certificate. By default, the certificate is stored in the following location on the host where your chef-server runs: - + /var/opt/opscode/nginx/ca/SERVER_HOSTNAME.crt - + Copy that file to your trusted_certs_dir (currently: #{configuration.trusted_certs_dir}) using SSH/SCP or some other secure method, then re-run this command to confirm that the server's certificate is now trusted. - + BAD_CERTS # @TODO: ^ needs URL once documentation is posted. end @@ -185,21 +185,21 @@ BAD_CERTS debug_chef_ssl_config ui.err(<<~ADVICE) - + #{ui.color("TO FIX THIS ERROR:", :bold)} - + If the server you are connecting to uses a self-signed certificate, you must configure chef to trust that server's certificate. - + By default, the certificate is stored in the following location on the host where your chef-server runs: - + /var/opt/opscode/nginx/ca/SERVER_HOSTNAME.crt - + Copy that file to your trusted_certs_dir (currently: #{configuration.trusted_certs_dir}) using SSH/SCP or some other secure method, then re-run this command to confirm that the server's certificate is now trusted. - + ADVICE end @@ -212,14 +212,14 @@ ADVICE ui.error("You are attempting to connect to: '#{host}'") ui.error("The server's certificate belongs to '#{cn}'") ui.err(<<~ADVICE) - + #{ui.color("TO FIX THIS ERROR:", :bold)} - + The solution for this issue depends on your networking configuration. If you are able to connect to this server using the hostname #{cn} instead of #{host}, then you can resolve this issue by updating chef_server_url in your configuration file. - + If you are not able to connect to the server using the hostname #{cn} you will have to update the certificate on the server to use the correct hostname. ADVICE diff --git a/lib/chef/knife/ssl_fetch.rb b/lib/chef/knife/ssl_fetch.rb index cc0ad3bbd6..88eb95e97d 100644 --- a/lib/chef/knife/ssl_fetch.rb +++ b/lib/chef/knife/ssl_fetch.rb @@ -133,10 +133,10 @@ class Chef ui.warn(<<~TRUST_TRUST) Certificates from #{host} will be fetched and placed in your trusted_cert directory (#{trusted_certs_dir}). - + Knife has no means to verify these are the correct certificates. You should verify the authenticity of these certificates after downloading. - + TRUST_TRUST remote_cert_chain.each do |cert| write_cert(cert) diff --git a/lib/chef/provider/powershell_script.rb b/lib/chef/provider/powershell_script.rb index 6117fa4e1c..31521c3675 100644 --- a/lib/chef/provider/powershell_script.rb +++ b/lib/chef/provider/powershell_script.rb @@ -148,7 +148,7 @@ EOH def wrapper_script <<~EOH # Chef Client wrapper for powershell_script resources - + # In rare cases, such as when PowerShell is executed # as an alternate user, the new-variable cmdlet is not # available, so import it just in case @@ -156,36 +156,36 @@ EOH { Import-Module Microsoft.PowerShell.Utility } - + # LASTEXITCODE can be uninitialized -- make it explictly 0 # to avoid incorrect detection of failure (non-zero) codes $global:LASTEXITCODE = 0 - + # Catch any exceptions -- without this, exceptions will result # In a zero return code instead of the desired non-zero code # that indicates a failure trap [Exception] {write-error ($_.Exception.Message);exit 1} - + # Variable state that should not be accessible to the user code new-variable -name interpolatedexitcode -visibility private -value $#{new_resource.convert_boolean_return} new-variable -name chefscriptresult -visibility private - + # Initialize a variable we use to capture $? inside a block $global:lastcmdlet = $null - + # Execute the user's code in a script block -- $chefscriptresult = { #{new_resource.code} - + # This assignment doesn't affect the block's return value $global:lastcmdlet = $? }.invokereturnasis() - + # Assume failure status of 1 -- success cases # will have to override this $exitstatus = 1 - + # If convert_boolean_return is enabled, the block's return value # gets precedence in determining our exit status if ($interpolatedexitcode -and $chefscriptresult -ne $null -and $chefscriptresult.gettype().name -eq 'boolean') @@ -206,10 +206,10 @@ EOH # status. $exitstatus = $LASTEXITCODE } - + # Print STDOUT for the script execution Write-Output $chefscriptresult - + # If this script is launched with -File, the process exit # status of PowerShell.exe will be $exitstatus. If it was # launched with -Command, it will be 0 if $exitstatus was 0, diff --git a/lib/chef/shell/ext.rb b/lib/chef/shell/ext.rb index 558c8ad5ca..cb1fb9041b 100644 --- a/lib/chef/shell/ext.rb +++ b/lib/chef/shell/ext.rb @@ -306,9 +306,9 @@ module Shell ## SUMMARY ## +edit(object)+ allows you to edit any object that can be converted to JSON. When finished editing, this method will return the edited object: - + new_node = edit(existing_node) - + ## EDITOR SELECTION ## chef-shell looks for an editor using the following logic 1. Looks for an EDITOR set by Shell.editor = "EDITOR" @@ -344,44 +344,44 @@ module Shell ## SUMMARY ## +clients+ allows you to query you chef server for information about your api clients. - + ## LIST ALL CLIENTS ## To see all clients on the system, use - + clients.all #=> [<Chef::ApiClient...>, ...] - + If the output from all is too verbose, or you're only interested in a specific value from each of the objects, you can give a code block to +all+: - + clients.all { |client| client.name } #=> [CLIENT1_NAME, CLIENT2_NAME, ...] - + ## SHOW ONE CLIENT ## To see a specific client, use - + clients.show(CLIENT_NAME) - + ## SEARCH FOR CLIENTS ## You can also search for clients using +find+ or +search+. You can use the familiar string search syntax: - + clients.search("KEY:VALUE") - + Just as the +all+ subcommand, the +search+ subcommand can use a code block to filter or transform the information returned from the search: - + clients.search("KEY:VALUE") { |c| c.name } - + You can also use a Hash based syntax, multiple search conditions will be joined with AND. - + clients.find :KEY => :VALUE, :KEY2 => :VALUE2, ... - + ## BULK-EDIT CLIENTS ## **BE CAREFUL, THIS IS DESTRUCTIVE** You can bulk edit API Clients using the +transform+ subcommand, which requires a code block. Each client will be saved after the code block is run. If the code block returns +nil+ or +false+, that client will be skipped: - + clients.transform("*:*") do |client| if client.name =~ /borat/i client.admin(false) @@ -390,7 +390,7 @@ module Shell nil end end - + This will strip the admin privileges from any client named after borat. E subcommands all: "list all api clients", @@ -413,46 +413,46 @@ module Shell explain(<<~E) ## SUMMARY ## +nodes+ Allows you to query your chef server for information about your nodes. - + ## LIST ALL NODES ## You can list all nodes using +all+ or +list+ - + nodes.all #=> [<Chef::Node...>, <Chef::Node...>, ...] - + To limit the information returned for each node, pass a code block to the +all+ subcommand: - + nodes.all { |node| node.name } #=> [NODE1_NAME, NODE2_NAME, ...] - + ## SHOW ONE NODE ## You can show the data for a single node using the +show+ subcommand: - + nodes.show("NODE_NAME") => <Chef::Node @name="NODE_NAME" ...> - + ## SEARCH FOR NODES ## You can search for nodes using the +search+ or +find+ subcommands: - + nodes.find(:name => "app*") #=> [<Chef::Node @name="app1.example.com" ...>, ...] - + Similarly to +all+, you can pass a code block to limit or transform the information returned: - + nodes.find(:name => "app#") { |node| node.ec2 } - + ## BULK EDIT NODES ## **BE CAREFUL, THIS OPERATION IS DESTRUCTIVE** - + Bulk edit nodes by passing a code block to the +transform+ or +bulk_edit+ subcommand. The block will be applied to each matching node, and then the node will be saved. If the block returns +nil+ or +false+, that node will be skipped. - + nodes.transform do |node| if node.fqdn =~ /.*\\.preprod\\.example\\.com/ node.set[:environment] = "preprod" end end - + This will assign the attribute to every node with a FQDN matching the regex. E subcommands all: "list all nodes", @@ -467,13 +467,13 @@ module Shell explain(<<~E) ## SUMMARY ## +roles+ allows you to query and edit roles on your Chef server. - + ## SUBCOMMANDS ## * all (list) * show (load) * search (find) * transform (bulk_edit) - + ## SEE ALSO ## See the help for +nodes+ for more information about the subcommands. E @@ -492,16 +492,16 @@ module Shell Chef server. Unlike other commands for working with data on the server, +databags+ requires the databag name as an argument, for example: databags(:users).all - + ## SUBCOMMANDS ## * all (list) * show (load) * search (find) * transform (bulk_edit) - + ## SEE ALSO ## See the help for +nodes+ for more information about the subcommands. - + E subcommands all: "list all items in the data bag", show: "load a data bag item by id", @@ -516,13 +516,13 @@ module Shell explain(<<~E) ## SUMMARY ## +environments+ allows you to query and edit environments on your Chef server. - + ## SUBCOMMANDS ## * all (list) * show (load) * search (find) * transform (bulk_edit) - + ## SEE ALSO ## See the help for +nodes+ for more information about the subcommands. E diff --git a/spec/functional/resource/dsc_script_spec.rb b/spec/functional/resource/dsc_script_spec.rb index 3b7042610b..e9301d4231 100644 --- a/spec/functional/resource/dsc_script_spec.rb +++ b/spec/functional/resource/dsc_script_spec.rb @@ -154,7 +154,7 @@ EOH $testuser = #{dsc_user_code} $testpassword = ConvertTo-SecureString -String "jf9a8m49jrajf4#" -AsPlainText -Force $testcred = New-Object -TypeName System.Management.Automation.PSCredential -ArgumentList $testuser, $testpassword - + User dsctestusercreate { UserName = $testuser @@ -179,7 +179,7 @@ EOH } ) } - + EOH end @@ -424,7 +424,7 @@ EOH $cert = ls Cert:\\LocalMachine\\My\\ | Where-Object {$_.Subject -match "ChefTest"} | Select -first 1 - + if($cert -eq $null) { $pfxpath = '#{self_signed_cert_path}' $password = '' @@ -434,7 +434,7 @@ EOH $store.Add($cert) $store.Close() } - + lcm -thumbprint $cert.thumbprint set-dsclocalconfigurationmanager -path ./LCM $ConfigurationData = @" diff --git a/spec/integration/knife/chef_repo_path_spec.rb b/spec/integration/knife/chef_repo_path_spec.rb index f1ab02dceb..9df0b9def9 100644 --- a/spec/integration/knife/chef_repo_path_spec.rb +++ b/spec/integration/knife/chef_repo_path_spec.rb @@ -362,7 +362,7 @@ EOM knife("show --local /clients/blah.json").should_succeed <<~EOM /clients/blah.json: { - + } EOM end @@ -462,7 +462,7 @@ EOM knife("show --local /environments/blah.json").should_succeed <<~EOM /environments/blah.json: { - + } EOM end @@ -477,7 +477,7 @@ EOM knife("show --local /nodes/blah.json").should_succeed <<~EOM /nodes/blah.json: { - + } EOM end @@ -492,7 +492,7 @@ EOM knife("show --local /roles/blah.json").should_succeed <<~EOM /roles/blah.json: { - + } EOM end @@ -507,7 +507,7 @@ EOM knife("show --local /users/blah.json").should_succeed <<~EOM /users/blah.json: { - + } EOM end diff --git a/spec/integration/knife/client_bulk_delete_spec.rb b/spec/integration/knife/client_bulk_delete_spec.rb index 336852c0b8..42bfe0396a 100644 --- a/spec/integration/knife/client_bulk_delete_spec.rb +++ b/spec/integration/knife/client_bulk_delete_spec.rb @@ -35,9 +35,9 @@ describe "knife client bulk delete", :workstation do it "deletes all matching clients" do knife("client bulk delete ^ca.*", input: "Y").should_succeed <<~EOM The following clients will be deleted: - + car cat - + Are you sure you want to delete these clients? (Y/N) Deleted client car Deleted client cat EOM @@ -54,9 +54,9 @@ EOM it "deletes all matching clients when unanchored" do knife("client bulk delete ca.*", input: "Y").should_succeed <<~EOM The following clients will be deleted: - + car cat concat - + Are you sure you want to delete these clients? (Y/N) Deleted client car Deleted client cat Deleted client concat @@ -83,14 +83,14 @@ EOM it "refuses to delete a validator normally" do knife("client bulk delete ^ca.*", input: "Y").should_succeed <<~EOM The following clients are validators and will not be deleted: - + car-validator - + You must specify --delete-validators to delete the validator clients The following clients will be deleted: - + car cat - + Are you sure you want to delete these clients? (Y/N) Deleted client car Deleted client cat EOM @@ -107,14 +107,14 @@ EOM it "deletes a validator when told to" do knife("client bulk delete ^ca.* -D", input: "Y\nY").should_succeed <<~EOM The following validators will be deleted: - + car-validator - + Are you sure you want to delete these validators? (Y/N) Deleted client car-validator The following clients will be deleted: - + car cat - + Are you sure you want to delete these clients? (Y/N) Deleted client car Deleted client cat EOM diff --git a/spec/integration/knife/download_spec.rb b/spec/integration/knife/download_spec.rb index 12e14fce04..04610ba4e7 100644 --- a/spec/integration/knife/download_spec.rb +++ b/spec/integration/knife/download_spec.rb @@ -107,7 +107,7 @@ EOM "override_attributes": { }, "run_list": [ - + ] } EOM @@ -139,7 +139,7 @@ EOM "override_attributes": { }, "run_list": [ - + ] } EOM @@ -564,7 +564,7 @@ EOM WARN: Parse error reading #{path_to('environments/x.json')} as JSON: parse error: premature EOF { (right here) ------^ - + EOH knife("download /environments/x.json").should_succeed "Updated /environments/x.json\n", stderr: warning knife("diff --name-status /environments/x.json").should_succeed "" @@ -687,7 +687,7 @@ EOM "override_attributes": { }, "run_list": [ - + ] } EOM diff --git a/spec/integration/knife/environment_from_file_spec.rb b/spec/integration/knife/environment_from_file_spec.rb index 0831ef5518..8948a3772c 100644 --- a/spec/integration/knife/environment_from_file_spec.rb +++ b/spec/integration/knife/environment_from_file_spec.rb @@ -34,7 +34,7 @@ describe "knife environment from file", :workstation do "name": "cons", "description": "An environment", "cookbook_versions": { - + }, "json_class": "Chef::Environment", "chef_type": "environment", @@ -42,7 +42,7 @@ describe "knife environment from file", :workstation do "hola": "Amigos!" }, "override_attributes": { - + } } EOM @@ -52,7 +52,7 @@ EOM "name": "car", "description": "An environment for list nodes", "cookbook_versions": { - + }, "json_class": "Chef::Environment", "chef_type": "environment", @@ -60,7 +60,7 @@ EOM "hola": "Amigos!" }, "override_attributes": { - + } } EOM @@ -70,7 +70,7 @@ EOM "name": "cdr", "description": "An environment for last nodes", "cookbook_versions": { - + }, "json_class": "Chef::Environment", "chef_type": "environment", @@ -78,7 +78,7 @@ EOM "hola": "Amigos!" }, "override_attributes": { - + } } EOM diff --git a/spec/integration/knife/list_spec.rb b/spec/integration/knife/list_spec.rb index bee9892220..39a3f77fc5 100644 --- a/spec/integration/knife/list_spec.rb +++ b/spec/integration/knife/list_spec.rb @@ -48,22 +48,22 @@ EOM nodes roles users - + /clients: chef-validator.json chef-webui.json - + /cookbooks: - + /data_bags: - + /environments: _default.json - + /nodes: - + /roles: - + /users: admin.json EOM @@ -113,52 +113,52 @@ EOM nodes roles users - + /clients: chef-validator.json chef-webui.json client1.json client2.json - + /cookbooks: cookbook1 cookbook2 - + /cookbooks/cookbook1: metadata.rb - + /cookbooks/cookbook2: metadata.rb recipes - + /cookbooks/cookbook2/recipes: default.rb - + /data_bags: bag1 bag2 - + /data_bags/bag1: item1.json item2.json - + /data_bags/bag2: item1.json item2.json - + /environments: _default.json environment1.json environment2.json - + /nodes: node1.json node2.json - + /roles: role1.json role2.json - + /users: admin.json user1.json @@ -686,7 +686,7 @@ EOM policies policy_groups roles - + /acls: clients containers @@ -700,10 +700,10 @@ EOM policies policy_groups roles - + /acls/clients: foo-validator.json - + /acls/containers: clients.json containers.json @@ -717,33 +717,33 @@ EOM policy_groups.json roles.json sandboxes.json - + /acls/cookbook_artifacts: - + /acls/cookbooks: - + /acls/data_bags: - + /acls/environments: _default.json - + /acls/groups: admins.json billing-admins.json clients.json users.json - + /acls/nodes: - + /acls/policies: - + /acls/policy_groups: - + /acls/roles: - + /clients: foo-validator.json - + /containers: clients.json containers.json @@ -757,28 +757,28 @@ EOM policy_groups.json roles.json sandboxes.json - + /cookbook_artifacts: - + /cookbooks: - + /data_bags: - + /environments: _default.json - + /groups: admins.json billing-admins.json clients.json users.json - + /nodes: - + /policies: - + /policy_groups: - + /roles: EOM end @@ -802,7 +802,7 @@ EOM policies policy_groups roles - + /acls: clients containers @@ -816,10 +816,10 @@ EOM policies policy_groups roles - + /acls/clients: foo-validator.json - + /acls/containers: clients.json containers.json @@ -833,33 +833,33 @@ EOM policy_groups.json roles.json sandboxes.json - + /acls/cookbook_artifacts: - + /acls/cookbooks: - + /acls/data_bags: - + /acls/environments: _default.json - + /acls/groups: admins.json billing-admins.json clients.json users.json - + /acls/nodes: - + /acls/policies: - + /acls/policy_groups: - + /acls/roles: - + /clients: foo-validator.json - + /containers: clients.json containers.json @@ -873,28 +873,28 @@ EOM policy_groups.json roles.json sandboxes.json - + /cookbook_artifacts: - + /cookbooks: - + /data_bags: - + /environments: _default.json - + /groups: admins.json billing-admins.json clients.json users.json - + /nodes: - + /policies: - + /policy_groups: - + /roles: EOM end diff --git a/spec/integration/knife/node_bulk_delete_spec.rb b/spec/integration/knife/node_bulk_delete_spec.rb index dfac031068..501091c0e7 100644 --- a/spec/integration/knife/node_bulk_delete_spec.rb +++ b/spec/integration/knife/node_bulk_delete_spec.rb @@ -34,9 +34,9 @@ describe "knife node bulk delete", :workstation do it "deletes all matching nodes" do knife("node bulk delete ^ca.*", input: "Y").should_succeed <<~EOM The following nodes will be deleted: - + car cat - + Are you sure you want to delete these nodes? (Y/N) Deleted node car Deleted node cat EOM diff --git a/spec/integration/knife/node_from_file_spec.rb b/spec/integration/knife/node_from_file_spec.rb index e58dfddee4..f7a4717e7c 100644 --- a/spec/integration/knife/node_from_file_spec.rb +++ b/spec/integration/knife/node_from_file_spec.rb @@ -39,7 +39,7 @@ describe "knife node from file", :workstation do , "normal": { "tags": [ - + ] } } diff --git a/spec/integration/knife/raw_spec.rb b/spec/integration/knife/raw_spec.rb index 35f5130145..1c8239746f 100644 --- a/spec/integration/knife/raw_spec.rb +++ b/spec/integration/knife/raw_spec.rb @@ -46,21 +46,21 @@ describe "knife raw", :workstation do "chef_type": "node", "chef_environment": "_default", "override": { - + }, "normal": { "tags": [ - + ] }, "default": { - + }, "automatic": { - + }, "run_list": [ - + ] } EOM @@ -78,16 +78,16 @@ EOM "json_class": "Chef::Role", "chef_type": "role", "default_attributes": { - + }, "override_attributes": { - + }, "run_list": [ - + ], "env_run_lists": { - + } } EOM @@ -103,16 +103,16 @@ EOM "json_class": "Chef::Role", "chef_type": "role", "default_attributes": { - + }, "override_attributes": { - + }, "run_list": [ - + ], "env_run_lists": { - + } } EOM @@ -125,16 +125,16 @@ EOM "json_class": "Chef::Role", "chef_type": "role", "default_attributes": { - + }, "override_attributes": { - + }, "run_list": [ - + ], "env_run_lists": { - + } } EOM @@ -161,7 +161,7 @@ EOM "override_attributes": { }, "run_list": [ - + ], "env_run_lists": { } diff --git a/spec/integration/knife/role_bulk_delete_spec.rb b/spec/integration/knife/role_bulk_delete_spec.rb index 40aef97c07..5a88ef282e 100644 --- a/spec/integration/knife/role_bulk_delete_spec.rb +++ b/spec/integration/knife/role_bulk_delete_spec.rb @@ -34,9 +34,9 @@ describe "knife role bulk delete", :workstation do it "deletes all matching roles" do knife("role bulk delete ^ca.*", input: "Y").should_succeed <<~EOM The following roles will be deleted: - + car cat - + Are you sure you want to delete these roles? (Y/N) Deleted role car Deleted role cat EOM diff --git a/spec/integration/knife/role_from_file_spec.rb b/spec/integration/knife/role_from_file_spec.rb index ca1c17380d..bc93d0f6e0 100644 --- a/spec/integration/knife/role_from_file_spec.rb +++ b/spec/integration/knife/role_from_file_spec.rb @@ -39,7 +39,7 @@ describe "knife role from file", :workstation do "hola": "Amigos!" }, "override_attributes": { - + } } EOM @@ -54,7 +54,7 @@ EOM "hola": "Amigos!" }, "override_attributes": { - + } } EOM @@ -69,7 +69,7 @@ EOM "hola": "Amigos!" }, "override_attributes": { - + } } EOM diff --git a/spec/integration/knife/upload_spec.rb b/spec/integration/knife/upload_spec.rb index 4a3247ccd7..647c7773f9 100644 --- a/spec/integration/knife/upload_spec.rb +++ b/spec/integration/knife/upload_spec.rb @@ -142,7 +142,7 @@ EOM "override_attributes": { }, "run_list": [ - + ] } EOM @@ -639,7 +639,7 @@ EOM WARN: Parse error reading #{path_to('environments/x.json')} as JSON: parse error: premature EOF { (right here) ------^ - + ERROR: /environments/x.json failed to write: Parse error reading JSON: parse error: premature EOF { (right here) ------^ @@ -649,7 +649,7 @@ EOM WARN: Parse error reading #{path_to('environments/x.json')} as JSON: parse error: premature EOF { (right here) ------^ - + EOH knife("upload /environments/x.json").should_fail(error1) knife("diff --name-status /environments/x.json").should_succeed("M\t/environments/x.json\n", stderr: warn) @@ -837,7 +837,7 @@ EOM "override_attributes": { }, "run_list": [ - + ] } EOM diff --git a/spec/integration/recipes/notifies_spec.rb b/spec/integration/recipes/notifies_spec.rb index 596f7b1970..d9e89e7f1e 100644 --- a/spec/integration/recipes/notifies_spec.rb +++ b/spec/integration/recipes/notifies_spec.rb @@ -47,7 +47,7 @@ EOM default_action :run provides :notifying_test resource_name :notifying_test - + action :run do log "bar" do notifies :write, 'log[foo]', :delayed @@ -88,7 +88,7 @@ EOM default_action :run provides :notifying_test resource_name :notifying_test - + action :run do log "bar" do notifies :write, 'log[foo]', :delayed @@ -133,7 +133,7 @@ EOM default_action :run provides :notifying_test resource_name :notifying_test - + action :run do log "bar" do notifies :write, 'log[foo]', :delayed @@ -214,7 +214,7 @@ EOM default_action :run provides :notifying_test resource_name :notifying_test - + action :run do log "bar" do notifies :write, 'log[foo]', :immediately @@ -254,7 +254,7 @@ EOM default_action :run provides :notifying_test resource_name :notifying_test - + action :run do log "bar" do notifies :write, resources(log: "foo"), :immediately @@ -294,7 +294,7 @@ EOM default_action :run provides :notifying_test resource_name :notifying_test - + action :run do log "bar" do notifies :write, "log[foo]" @@ -331,7 +331,7 @@ EOM default_action :run provides :cloning_test resource_name :cloning_test - + action :run do log "bar" do level :info @@ -343,7 +343,7 @@ EOM log "bar" do level :warn end - + cloning_test "whatever" EOM diff --git a/spec/unit/formatters/error_description_spec.rb b/spec/unit/formatters/error_description_spec.rb index a09d295c9b..772ad84481 100644 --- a/spec/unit/formatters/error_description_spec.rb +++ b/spec/unit/formatters/error_description_spec.rb @@ -73,14 +73,14 @@ describe Chef::Formatters::ErrorDescription do ================================================================================ test title ================================================================================ - + System Info: ------------ chef_version=1.2.3 ruby=ruby 2.3.1p112 (2016-04-26 revision 54768) [x86_64-darwin15] program_name=chef-client executable=/test/bin/chef-client - + END end end @@ -96,18 +96,18 @@ describe Chef::Formatters::ErrorDescription do ================================================================================ test title ================================================================================ - + test heading ------------ test text - + System Info: ------------ chef_version=1.2.3 ruby=ruby 2.3.1p112 (2016-04-26 revision 54768) [x86_64-darwin15] program_name=chef-client executable=/test/bin/chef-client - + END end @@ -123,7 +123,7 @@ describe Chef::Formatters::ErrorDescription do ================================================================================ test title ================================================================================ - + System Info: ------------ chef_version=1.2.3 @@ -132,7 +132,7 @@ describe Chef::Formatters::ErrorDescription do ruby=ruby 2.3.1p112 (2016-04-26 revision 54768) [x86_64-darwin15] program_name=chef-client executable=/test/bin/chef-client - + END end diff --git a/spec/unit/formatters/error_inspectors/compile_error_inspector_spec.rb b/spec/unit/formatters/error_inspectors/compile_error_inspector_spec.rb index 9ec2c8d567..a09b192b6d 100644 --- a/spec/unit/formatters/error_inspectors/compile_error_inspector_spec.rb +++ b/spec/unit/formatters/error_inspectors/compile_error_inspector_spec.rb @@ -27,8 +27,8 @@ BAD_RECIPE = <<~E # # All rights reserved - Do Not Redistribute # - - + + file "/tmp/explode-me" do mode 0655 owner "root" diff --git a/spec/unit/knife/cookbook_upload_spec.rb b/spec/unit/knife/cookbook_upload_spec.rb index 3110ba7496..74612f520d 100644 --- a/spec/unit/knife/cookbook_upload_spec.rb +++ b/spec/unit/knife/cookbook_upload_spec.rb @@ -115,7 +115,7 @@ describe Chef::Knife::CookbookUpload do expected_message = <<~E WARNING: The cookbooks: test_cookbook exist in multiple places in your cookbook_path. A composite version of these cookbooks has been compiled for uploading. - + IMPORTANT: In a future version of Chef, this behavior will be removed and you will no longer be able to have the same version of a cookbook in multiple places in your cookbook_path. WARNING: The affected cookbooks are located: diff --git a/spec/unit/knife/core/ui_spec.rb b/spec/unit/knife/core/ui_spec.rb index 65463005c9..025c1ecd91 100644 --- a/spec/unit/knife/core/ui_spec.rb +++ b/spec/unit/knife/core/ui_spec.rb @@ -250,7 +250,7 @@ EOM expect(@out.string).to eq <<~EOM a b - + c d EOM @@ -261,10 +261,10 @@ EOM expect(@out.string).to eq <<~EOM a b - + c - - + + d e EOM @@ -275,9 +275,9 @@ EOM expect(@out.string).to eq <<~EOM a: b c: d - + x: y - + m: n o: p EOM diff --git a/spec/unit/provider/cron/unix_spec.rb b/spec/unit/provider/cron/unix_spec.rb index 6c4caa4656..c77b0e0528 100644 --- a/spec/unit/provider/cron/unix_spec.rb +++ b/spec/unit/provider/cron/unix_spec.rb @@ -55,10 +55,10 @@ describe Chef::Provider::Cron::Unix do let(:stdout) do String.new(<<~CRONTAB) 0 2 * * * /some/other/command - + # Chef Name: something else * 5 * * * /bin/true - + # Another comment CRONTAB end diff --git a/spec/unit/provider/cron_spec.rb b/spec/unit/provider/cron_spec.rb index 50ebff779d..67d578e2ea 100644 --- a/spec/unit/provider/cron_spec.rb +++ b/spec/unit/provider/cron_spec.rb @@ -44,12 +44,12 @@ describe Chef::Provider::Cron do before :each do allow(@provider).to receive(:read_crontab).and_return(<<~CRONTAB) 0 2 * * * /some/other/command - + # Chef Name: cronhole some stuff @reboot /bin/true param1 param2 # Chef Name: something else 2 * 1 * * /bin/false - + # Another comment CRONTAB end @@ -69,7 +69,7 @@ CRONTAB it "should pull env vars out" do allow(@provider).to receive(:read_crontab).and_return(<<~CRONTAB) 0 2 * * * /some/other/command - + # Chef Name: cronhole some stuff MAILTO=foo@example.com SHELL=/bin/foosh @@ -78,7 +78,7 @@ CRONTAB @reboot /bin/true param1 param2 # Chef Name: something else 2 * 1 * * /bin/false - + # Another comment CRONTAB cron = @provider.load_current_resource @@ -170,10 +170,10 @@ CRONTAB before :each do allow(@provider).to receive(:read_crontab).and_return(<<~CRONTAB) 0 2 * * * /some/other/command - + # Chef Name: something else * 5 * * * /bin/true - + # Another comment CRONTAB end @@ -204,12 +204,12 @@ CRONTAB before :each do allow(@provider).to receive(:read_crontab).and_return(<<~CRONTAB) 0 2 * * * /some/other/command - + # Chef Name: cronhole some stuff * 5 * 1 * /bin/true param1 param2 # Chef Name: something else 2 * 1 * * /bin/false - + # Another comment CRONTAB end @@ -234,7 +234,7 @@ CRONTAB it "should pull env vars out" do allow(@provider).to receive(:read_crontab).and_return(<<~CRONTAB) 0 2 * * * /some/other/command - + # Chef Name: cronhole some stuff MAILTO=foo@example.com SHELL=/bin/foosh @@ -243,7 +243,7 @@ CRONTAB * 5 * 1 * /bin/true param1 param2 # Chef Name: something else 2 * 1 * * /bin/false - + # Another comment CRONTAB cron = @provider.load_current_resource @@ -300,12 +300,12 @@ CRONTAB before :each do allow(@provider).to receive(:read_crontab).and_return(<<~CRONTAB) 0 2 * * * /some/other/command - + # Chef Name: cronhole some stuff * 5 * Jan Mon /bin/true param1 param2 # Chef Name: something else 2 * 1 * * /bin/false - + # Another comment CRONTAB end @@ -336,7 +336,7 @@ CRONTAB it "should set cron_exists and leave current_resource values at defaults" do allow(@provider).to receive(:read_crontab).and_return(<<~CRONTAB) 0 2 * * * /some/other/command - + # Chef Name: cronhole some stuff CRONTAB cron = @provider.load_current_resource @@ -353,7 +353,7 @@ CRONTAB it "should not pick up a commented out crontab line" do allow(@provider).to receive(:read_crontab).and_return(<<~CRONTAB) 0 2 * * * /some/other/command - + # Chef Name: cronhole some stuff #* 5 * 1 * /bin/true param1 param2 CRONTAB @@ -371,12 +371,12 @@ CRONTAB it "should not pick up a later crontab entry" do allow(@provider).to receive(:read_crontab).and_return(<<~CRONTAB) 0 2 * * * /some/other/command - + # Chef Name: cronhole some stuff #* 5 * 1 * /bin/true param1 param2 # Chef Name: something else 2 * 1 * * /bin/false - + # Another comment CRONTAB cron = @provider.load_current_resource @@ -483,10 +483,10 @@ CRONTAB @provider.cron_exists = false allow(@provider).to receive(:read_crontab).and_return(<<~CRONTAB) 0 2 * * * /some/other/command - + # Chef Name: something else 2 * 1 * * /bin/false - + # Another comment CRONTAB end @@ -494,10 +494,10 @@ CRONTAB it "should add the entry to the crontab" do expect(@provider).to receive(:write_crontab).with(<<~ENDCRON) 0 2 * * * /some/other/command - + # Chef Name: something else 2 * 1 * * /bin/false - + # Another comment # Chef Name: cronhole some stuff 30 * * * * /bin/true @@ -513,10 +513,10 @@ CRONTAB @new_resource.environment "TEST" => "LOL" expect(@provider).to receive(:write_crontab).with(<<~ENDCRON) 0 2 * * * /some/other/command - + # Chef Name: something else 2 * 1 * * /bin/false - + # Another comment # Chef Name: cronhole some stuff MAILTO="foo@example.com" @@ -546,12 +546,12 @@ CRONTAB allow(@provider).to receive(:cron_different?).and_return(true) allow(@provider).to receive(:read_crontab).and_return(<<~CRONTAB) 0 2 * * * /some/other/command - + # Chef Name: cronhole some stuff 30 * * 3 * /bin/true # Chef Name: something else 2 * 1 * * /bin/false - + # Another comment CRONTAB end @@ -559,12 +559,12 @@ CRONTAB it "should update the crontab entry" do expect(@provider).to receive(:write_crontab).with(<<~ENDCRON) 0 2 * * * /some/other/command - + # Chef Name: cronhole some stuff 30 * * * * /bin/true # Chef Name: something else 2 * 1 * * /bin/false - + # Another comment ENDCRON @provider.run_action(:create) @@ -578,7 +578,7 @@ CRONTAB @new_resource.environment "TEST" => "LOL" expect(@provider).to receive(:write_crontab).with(<<~ENDCRON) 0 2 * * * /some/other/command - + # Chef Name: cronhole some stuff MAILTO="foo@example.com" PATH="/usr/bin:/my/custom/path" @@ -588,7 +588,7 @@ CRONTAB 30 * * * * /bin/true # Chef Name: something else 2 * 1 * * /bin/false - + # Another comment ENDCRON @provider.run_action(:create) @@ -614,12 +614,12 @@ CRONTAB it "should add the crontab to the entry" do allow(@provider).to receive(:read_crontab).and_return(<<~CRONTAB) 0 2 * * * /some/other/command - + # Chef Name: cronhole some stuff CRONTAB expect(@provider).to receive(:write_crontab).with(<<~ENDCRON) 0 2 * * * /some/other/command - + # Chef Name: cronhole some stuff 30 * * * * /bin/true ENDCRON @@ -629,23 +629,23 @@ CRONTAB it "should not blat any following entries" do allow(@provider).to receive(:read_crontab).and_return(<<~CRONTAB) 0 2 * * * /some/other/command - + # Chef Name: cronhole some stuff #30 * * * * /bin/true # Chef Name: something else 2 * 1 * * /bin/false - + # Another comment CRONTAB expect(@provider).to receive(:write_crontab).with(<<~ENDCRON) 0 2 * * * /some/other/command - + # Chef Name: cronhole some stuff 30 * * * * /bin/true #30 * * * * /bin/true # Chef Name: something else 2 * 1 * * /bin/false - + # Another comment ENDCRON @provider.run_action(:create) @@ -654,16 +654,16 @@ CRONTAB it "should handle env vars with no crontab" do allow(@provider).to receive(:read_crontab).and_return(<<~CRONTAB) 0 2 * * * /some/other/command - + # Chef Name: cronhole some stuff MAILTO=bar@example.com PATH=/usr/bin:/my/custom/path SHELL=/bin/barsh HOME=/home/foo - + # Chef Name: something else 2 * 1 * * /bin/false - + # Another comment CRONTAB @new_resource.mailto "foo@example.com" @@ -672,17 +672,17 @@ CRONTAB @new_resource.home "/home/foo" expect(@provider).to receive(:write_crontab).with(<<~ENDCRON) 0 2 * * * /some/other/command - + # Chef Name: cronhole some stuff MAILTO="foo@example.com" PATH="/usr/bin:/my/custom/path" SHELL="/bin/foosh" HOME="/home/foo" 30 * * * * /bin/true - + # Chef Name: something else 2 * 1 * * /bin/false - + # Another comment ENDCRON @provider.run_action(:create) @@ -695,10 +695,10 @@ CRONTAB allow(@provider).to receive(:cron_different?).and_return(false) allow(@provider).to receive(:read_crontab).and_return(<<~CRONTAB) 0 2 * * * /some/other/command - + # Chef Name: cronhole some stuff * 5 * * * /bin/true - + # Another comment CRONTAB end @@ -749,12 +749,12 @@ CRONTAB @provider.cron_exists = true allow(@provider).to receive(:read_crontab).and_return(<<~CRONTAB) 0 2 * * * /some/other/command - + # Chef Name: cronhole some stuff 30 * * 3 * /bin/true # Chef Name: something else 2 * 1 * * /bin/false - + # Another comment CRONTAB end @@ -762,10 +762,10 @@ CRONTAB it "should remove the entry" do expect(@provider).to receive(:write_crontab).with(<<~ENDCRON) 0 2 * * * /some/other/command - + # Chef Name: something else 2 * 1 * * /bin/false - + # Another comment ENDCRON @provider.run_action(:delete) @@ -774,22 +774,22 @@ CRONTAB it "should remove any env vars with the entry" do allow(@provider).to receive(:read_crontab).and_return(<<~CRONTAB) 0 2 * * * /some/other/command - + # Chef Name: cronhole some stuff MAILTO=foo@example.com FOO=test 30 * * 3 * /bin/true # Chef Name: something else 2 * 1 * * /bin/false - + # Another comment CRONTAB expect(@provider).to receive(:write_crontab).with(<<~ENDCRON) 0 2 * * * /some/other/command - + # Chef Name: something else 2 * 1 * * /bin/false - + # Another comment ENDCRON @provider.run_action(:delete) @@ -814,12 +814,12 @@ CRONTAB it "should remove the section" do allow(@provider).to receive(:read_crontab).and_return(<<~CRONTAB) 0 2 * * * /some/other/command - + # Chef Name: cronhole some stuff CRONTAB expect(@provider).to receive(:write_crontab).with(<<~ENDCRON) 0 2 * * * /some/other/command - + ENDCRON @provider.run_action(:delete) end @@ -827,21 +827,21 @@ CRONTAB it "should not blat following sections" do allow(@provider).to receive(:read_crontab).and_return(<<~CRONTAB) 0 2 * * * /some/other/command - + # Chef Name: cronhole some stuff #30 * * 3 * /bin/true # Chef Name: something else 2 * 1 * * /bin/false - + # Another comment CRONTAB expect(@provider).to receive(:write_crontab).with(<<~ENDCRON) 0 2 * * * /some/other/command - + #30 * * 3 * /bin/true # Chef Name: something else 2 * 1 * * /bin/false - + # Another comment ENDCRON @provider.run_action(:delete) @@ -850,22 +850,22 @@ CRONTAB it "should remove any envvars with the section" do allow(@provider).to receive(:read_crontab).and_return(<<~CRONTAB) 0 2 * * * /some/other/command - + # Chef Name: cronhole some stuff MAILTO=foo@example.com #30 * * 3 * /bin/true # Chef Name: something else 2 * 1 * * /bin/false - + # Another comment CRONTAB expect(@provider).to receive(:write_crontab).with(<<~ENDCRON) 0 2 * * * /some/other/command - + #30 * * 3 * /bin/true # Chef Name: something else 2 * 1 * * /bin/false - + # Another comment ENDCRON @provider.run_action(:delete) @@ -877,10 +877,10 @@ CRONTAB before :each do @stdout = <<~CRONTAB 0 2 * * * /some/other/command - + # Chef Name: something else * 5 * * * /bin/true - + # Another comment CRONTAB @status = double("Status", exitstatus: 0, stdout: @stdout) @@ -896,10 +896,10 @@ CRONTAB crontab = @provider.send(:read_crontab) expect(crontab).to eq <<~CRONTAB 0 2 * * * /some/other/command - + # Chef Name: something else * 5 * * * /bin/true - + # Another comment CRONTAB end diff --git a/spec/unit/provider/mount/aix_spec.rb b/spec/unit/provider/mount/aix_spec.rb index 409bd46ecc..80a83130e9 100644 --- a/spec/unit/provider/mount/aix_spec.rb +++ b/spec/unit/provider/mount/aix_spec.rb @@ -242,7 +242,7 @@ WRONG vol = /opt free = false quota = no - + /tmp/abc: dev = /dev/sdz2 vfs = jfs2 diff --git a/spec/unit/provider/package/apt_spec.rb b/spec/unit/provider/package/apt_spec.rb index 97eda1d774..05be08f332 100644 --- a/spec/unit/provider/package/apt_spec.rb +++ b/spec/unit/provider/package/apt_spec.rb @@ -126,7 +126,7 @@ describe Chef::Provider::Package::Apt do showpkg_out = <<~SHOWPKG_STDOUT Package: libmysqlclient15-dev Versions: - + Reverse Depends: libmysqlclient-dev,libmysqlclient15-dev libmysqlclient-dev,libmysqlclient15-dev @@ -186,7 +186,7 @@ describe Chef::Provider::Package::Apt do showpkg_out = <<~SHOWPKG_STDOUT Package: mp3-decoder Versions: - + Reverse Depends: nautilus,mp3-decoder vux,mp3-decoder diff --git a/spec/unit/provider/package/cab_spec.rb b/spec/unit/provider/package/cab_spec.rb index bdfcd06be3..9c5865ec31 100644 --- a/spec/unit/provider/package/cab_spec.rb +++ b/spec/unit/provider/package/cab_spec.rb @@ -60,9 +60,9 @@ describe Chef::Provider::Package::Cab do get_package_info_stdout = <<~EOF Deployment Image Servicing and Management tool Version: 6.1.7600.16385 - + Image Version: 6.1.7600.16385 - + Package information: Package Identity : Package_for_KB2664825~31bf3856ad364e35~amd64~~6.1.3.0 Applicable : Yes @@ -84,26 +84,26 @@ describe Chef::Provider::Package::Cab do get_packages_stdout = <<~EOF Deployment Image Servicing and Management tool Version: 6.1.7600.16385 - + Image Version: 6.1.7600.16385 - + Packages listing: - + Package Identity : Package_for_KB2999486~31bf3856ad364e35~amd64~~6.1.9768.0 State : Installed Release Type : Language Pack Install Time : 2/11/2015 11:33 PM - + Package Identity : Package_for_KB2994825~31bf3856ad364e35~amd64~~6.1.7601.0 State : Installed Release Type : Language Pack Install Time : 2/11/2015 11:33 PM - + Package Identity : Package_for_KB2664825~31bf3856ad364e35~amd64~~6.1.3.0 State : Installed Release Type : Feature Pack Install Time : 11/21/2010 3:40 AM - + The operation completed successfully. EOF get_packages_obj = double(stdout: get_packages_stdout) diff --git a/spec/unit/provider/package/ips_spec.rb b/spec/unit/provider/package/ips_spec.rb index b5fb05f7ec..70e1c3fe32 100644 --- a/spec/unit/provider/package/ips_spec.rb +++ b/spec/unit/provider/package/ips_spec.rb @@ -38,7 +38,7 @@ describe Chef::Provider::Package::Ips do stderr = <<~PKG_STATUS pkg: info: no packages matching the following patterns you specified are installed on the system. Try specifying -r to query remotely: - + crypto/gnupg PKG_STATUS OpenStruct.new(stdout: stdout, stdin: stdin, stderr: stderr, status: @status, exitstatus: 1) diff --git a/spec/unit/provider/package/msu_spec.rb b/spec/unit/provider/package/msu_spec.rb index 49b723e572..b2f0b22963 100644 --- a/spec/unit/provider/package/msu_spec.rb +++ b/spec/unit/provider/package/msu_spec.rb @@ -52,9 +52,9 @@ describe Chef::Provider::Package::Msu, :windows_only do <<~EOF Deployment Image Servicing and Management tool Version: 6.1.7600.16385 - + Image Version: 6.1.7600.16385 - + Package information: Package Identity : Package_for_KB2664825~31bf3856ad364e35~amd64~~6.1.3.0 Applicable : Yes @@ -70,26 +70,26 @@ describe Chef::Provider::Package::Msu, :windows_only do get_packages_stdout = <<~EOF Deployment Image Servicing and Management tool Version: 6.1.7600.16385 - + Image Version: 6.1.7600.16385 - + Packages listing: - + Package Identity : Package_for_KB2999486~31bf3856ad364e35~amd64~~6.1.9768.0 State : Installed Release Type : Language Pack Install Time : 2/11/2015 11:33 PM - + Package Identity : Package_for_KB2994825~31bf3856ad364e35~amd64~~6.1.7601.0 State : Installed Release Type : Language Pack Install Time : 2/11/2015 11:33 PM - + Package Identity : Package_for_KB2664825~31bf3856ad364e35~amd64~~6.1.3.0 State : Installed Release Type : Feature Pack Install Time : 11/21/2010 3:40 AM - + The operation completed successfully. EOF get_packages_obj = double(stdout: get_packages_stdout) diff --git a/spec/unit/provider/package/pacman_spec.rb b/spec/unit/provider/package/pacman_spec.rb index a07c3b236d..10bb3492b2 100644 --- a/spec/unit/provider/package/pacman_spec.rb +++ b/spec/unit/provider/package/pacman_spec.rb @@ -106,16 +106,16 @@ PACMAN [options] HoldPkg = pacman glibc Architecture = auto - + [customrepo] Server = https://my.custom.repo - + [core] Include = /etc/pacman.d/mirrorlist - + [extra] Include = /etc/pacman.d/mirrorlist - + [community] Include = /etc/pacman.d/mirrorlist PACMAN_CONF diff --git a/spec/unit/provider/package/portage_spec.rb b/spec/unit/provider/package/portage_spec.rb index 08d80d3a7d..e1036bea74 100644 --- a/spec/unit/provider/package/portage_spec.rb +++ b/spec/unit/provider/package/portage_spec.rb @@ -136,7 +136,7 @@ describe Chef::Provider::Package::Portage, "load_current_resource" do You specified an unqualified atom that matched multiple packages: * app-misc/sphinx * dev-python/sphinx - + Please use a more specific atom. EOF status = double(stdout: "", stderr: stderr_output, exitstatus: 1) diff --git a/spec/unit/resource_reporter_spec.rb b/spec/unit/resource_reporter_spec.rb index 0c4942f319..fe8b129a73 100644 --- a/spec/unit/resource_reporter_spec.rb +++ b/spec/unit/resource_reporter_spec.rb @@ -618,7 +618,7 @@ describe Chef::ResourceReporter do @error = Net::HTTPServerException.new("404 message", @response) expect(@rest_client).to receive(:post) .with("reports/nodes/spitfire/runs", { action: :start, run_id: @run_id, - start_time: @start_time.to_s }, + start_time: @start_time.to_s }, { "X-Ops-Reporting-Protocol-Version" => Chef::ResourceReporter::PROTOCOL_VERSION }) .and_raise(@error) end |