diff options
author | Lamont Granquist <lamont@scriptkiddie.org> | 2020-04-28 16:28:52 -0700 |
---|---|---|
committer | Lamont Granquist <lamont@scriptkiddie.org> | 2020-04-28 16:28:52 -0700 |
commit | 450ee3767c58c297e884e24cf5796a6a16818d6e (patch) | |
tree | fd34fdd59289cc5944f53da83d4cfefc8b3ee586 /spec/unit/provider | |
parent | 52328f2e7d6d73690c023843f887604dbcba1d14 (diff) | |
download | chef-450ee3767c58c297e884e24cf5796a6a16818d6e.tar.gz |
Fix more ruby 2.7 warning logspamlcg/more-ruby-27-logging-suppression
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
Diffstat (limited to 'spec/unit/provider')
-rw-r--r-- | spec/unit/provider/apt_repository_spec.rb | 54 | ||||
-rw-r--r-- | spec/unit/provider/zypper_repository_spec.rb | 34 |
2 files changed, 44 insertions, 44 deletions
diff --git a/spec/unit/provider/apt_repository_spec.rb b/spec/unit/provider/apt_repository_spec.rb index 7fefa49eb4..aa2fb770c7 100644 --- a/spec/unit/provider/apt_repository_spec.rb +++ b/spec/unit/provider/apt_repository_spec.rb @@ -18,33 +18,33 @@ require "spec_helper" -# Now we are using the option --with-colons that works across old os versions -# as well as the latest (16.10). This for both `apt-key` and `gpg` commands -# -# Output of the command: -# => apt-key adv --list-public-keys --with-fingerprint --with-colons -APT_KEY_FINGER = <<~EOF.freeze - tru:t:1:1488924856:0:3:1:5 - pub:-:1024:17:40976EAF437D05B5:2004-09-12:::-:Ubuntu Archive Automatic Signing Key <ftpmaster@ubuntu.com>::scESC: - fpr:::::::::630239CC130E1A7FD81A27B140976EAF437D05B5: - sub:-:2048:16:251BEFF479164387:2004-09-12::::::e: - pub:-:1024:17:46181433FBB75451:2004-12-30:::-:Ubuntu CD Image Automatic Signing Key <cdimage@ubuntu.com>::scSC: - fpr:::::::::C5986B4F1257FFA86632CBA746181433FBB75451: - pub:-:4096:1:3B4FE6ACC0B21F32:2012-05-11:::-:Ubuntu Archive Automatic Signing Key (2012) <ftpmaster@ubuntu.com>::scSC: - fpr:::::::::790BC7277767219C42C86F933B4FE6ACC0B21F32: - pub:-:4096:1:D94AA3F0EFE21092:2012-05-11:::-:Ubuntu CD Image Automatic Signing Key (2012) <cdimage@ubuntu.com>::scSC: - fpr:::::::::843938DF228D22F7B3742BC0D94AA3F0EFE21092: -EOF - -# Output of the command: -# => gpg --with-fingerprint --with-colons [FILE] -GPG_FINGER = <<~EOF.freeze - pub:-:1024:17:327574EE02A818DD:2009-04-22:::-:Cloudera Apt Repository: - fpr:::::::::F36A89E33CC1BD0F71079007327574EE02A818DD: - sub:-:2048:16:84080586D1CA74A1:2009-04-22:::: -EOF - describe "Chef::Provider::AptRepository" do + # Now we are using the option --with-colons that works across old os versions + # as well as the latest (16.10). This for both `apt-key` and `gpg` commands + # + # Output of the command: + # => apt-key adv --list-public-keys --with-fingerprint --with-colons + APT_KEY_FINGER = <<~EOF.freeze + tru:t:1:1488924856:0:3:1:5 + pub:-:1024:17:40976EAF437D05B5:2004-09-12:::-:Ubuntu Archive Automatic Signing Key <ftpmaster@ubuntu.com>::scESC: + fpr:::::::::630239CC130E1A7FD81A27B140976EAF437D05B5: + sub:-:2048:16:251BEFF479164387:2004-09-12::::::e: + pub:-:1024:17:46181433FBB75451:2004-12-30:::-:Ubuntu CD Image Automatic Signing Key <cdimage@ubuntu.com>::scSC: + fpr:::::::::C5986B4F1257FFA86632CBA746181433FBB75451: + pub:-:4096:1:3B4FE6ACC0B21F32:2012-05-11:::-:Ubuntu Archive Automatic Signing Key (2012) <ftpmaster@ubuntu.com>::scSC: + fpr:::::::::790BC7277767219C42C86F933B4FE6ACC0B21F32: + pub:-:4096:1:D94AA3F0EFE21092:2012-05-11:::-:Ubuntu CD Image Automatic Signing Key (2012) <cdimage@ubuntu.com>::scSC: + fpr:::::::::843938DF228D22F7B3742BC0D94AA3F0EFE21092: + EOF + + # Output of the command: + # => gpg --with-fingerprint --with-colons [FILE] + APG_GPG_FINGER = <<~EOF.freeze + pub:-:1024:17:327574EE02A818DD:2009-04-22:::-:Cloudera Apt Repository: + fpr:::::::::F36A89E33CC1BD0F71079007327574EE02A818DD: + sub:-:2048:16:84080586D1CA74A1:2009-04-22:::: + EOF + let(:node) { Chef::Node.new } let(:events) { Chef::EventDispatch::Dispatcher.new } let(:run_context) { Chef::RunContext.new(node, {}, events) } @@ -61,7 +61,7 @@ describe "Chef::Provider::AptRepository" do end let(:gpg_finger) do - double("shell_out", stdout: GPG_FINGER, exitstatus: 0, error?: false) + double("shell_out", stdout: APG_GPG_FINGER, exitstatus: 0, error?: false) end let(:gpg_shell_out_success) do diff --git a/spec/unit/provider/zypper_repository_spec.rb b/spec/unit/provider/zypper_repository_spec.rb index 724a29dc2b..83ed83d297 100644 --- a/spec/unit/provider/zypper_repository_spec.rb +++ b/spec/unit/provider/zypper_repository_spec.rb @@ -18,22 +18,22 @@ require "spec_helper" -# Output of the command: -# => rpm -qa gpg-pubkey* -RPM_KEYS = <<~EOF.freeze - gpg-pubkey-307e3d54-4be01a65 - gpg-pubkey-3dbdc284-53674dd4 -EOF - -# Output of the command: -# => gpg --with-fingerprint [FILE] -GPG_FINGER = <<~EOF.freeze - pub 2048R/3DBDC284 2011-08-19 [expires: 2024-06-14] - Key fingerprint = 573B FD6B 3D8F BC64 1079 A6AB ABF5 BD82 7BD9 BF62 - uid nginx signing key <signing-key@nginx.com> -EOF - describe Chef::Provider::ZypperRepository do + # Output of the command: + # => rpm -qa gpg-pubkey* + ZYPPER_RPM_KEYS = <<~EOF.freeze + gpg-pubkey-307e3d54-4be01a65 + gpg-pubkey-3dbdc284-53674dd4 + EOF + + # Output of the command: + # => gpg --with-fingerprint [FILE] + ZYPPER_GPG_FINGER = <<~EOF.freeze + pub 2048R/3DBDC284 2011-08-19 [expires: 2024-06-14] + Key fingerprint = 573B FD6B 3D8F BC64 1079 A6AB ABF5 BD82 7BD9 BF62 + uid nginx signing key <signing-key@nginx.com> + EOF + let(:new_resource) { Chef::Resource::ZypperRepository.new("Nginx Repository") } let(:logger) { double("Mixlib::Log::Child").as_null_object } let(:provider) do @@ -45,11 +45,11 @@ describe Chef::Provider::ZypperRepository do end let(:rpm_key_finger) do - double("shell_out", stdout: RPM_KEYS, exitstatus: 0, error?: false) + double("shell_out", stdout: ZYPPER_RPM_KEYS, exitstatus: 0, error?: false) end let(:gpg_finger) do - double("shell_out", stdout: GPG_FINGER, exitstatus: 0, error?: false) + double("shell_out", stdout: ZYPPER_GPG_FINGER, exitstatus: 0, error?: false) end it "responds to load_current_resource" do |