diff options
Diffstat (limited to 'spec/unit/provider/package/ips_spec.rb')
-rw-r--r-- | spec/unit/provider/package/ips_spec.rb | 138 |
1 files changed, 69 insertions, 69 deletions
diff --git a/spec/unit/provider/package/ips_spec.rb b/spec/unit/provider/package/ips_spec.rb index 46f0c72399..b5fb05f7ec 100644 --- a/spec/unit/provider/package/ips_spec.rb +++ b/spec/unit/provider/package/ips_spec.rb @@ -35,27 +35,27 @@ describe Chef::Provider::Package::Ips do def local_output stdin = StringIO.new stdout = "" - 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 + 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) end def remote_output - stdout = <<-PKG_STATUS - Name: security/sudo - Summary: sudo - authority delegation tool - State: Not Installed - Publisher: omnios - Version: 1.8.4.1 (1.8.4p1) - Build Release: 5.11 - Branch: 0.151002 -Packaging Date: April 1, 2012 05:55:52 PM - Size: 2.57 MB - FMRI: pkg://omnios/security/sudo@1.8.4.1,5.11-0.151002:20120401T175552Z + stdout = <<~PKG_STATUS + Name: security/sudo + Summary: sudo - authority delegation tool + State: Not Installed + Publisher: omnios + Version: 1.8.4.1 (1.8.4p1) + Build Release: 5.11 + Branch: 0.151002 + Packaging Date: April 1, 2012 05:55:52 PM + Size: 2.57 MB + FMRI: pkg://omnios/security/sudo@1.8.4.1,5.11-0.151002:20120401T175552Z PKG_STATUS stdin = StringIO.new stderr = "" @@ -92,20 +92,20 @@ PKG_STATUS it "should set the installed version if package has one" do local = local_output - local.stdout = <<-INSTALLED - Name: crypto/gnupg - Summary: GNU Privacy Guard - Description: A complete and free implementation of the OpenPGP Standard as - defined by RFC4880. - Category: Applications/System Utilities - State: Installed - Publisher: solaris - Version: 2.0.17 - Build Release: 5.11 - Branch: 0.175.0.0.0.2.537 -Packaging Date: October 19, 2011 09:14:50 AM - Size: 8.07 MB - FMRI: pkg://solaris/crypto/gnupg@2.0.17,5.11-0.175.0.0.0.2.537:20111019T091450Z + local.stdout = <<~INSTALLED + Name: crypto/gnupg + Summary: GNU Privacy Guard + Description: A complete and free implementation of the OpenPGP Standard as + defined by RFC4880. + Category: Applications/System Utilities + State: Installed + Publisher: solaris + Version: 2.0.17 + Build Release: 5.11 + Branch: 0.175.0.0.0.2.537 + Packaging Date: October 19, 2011 09:14:50 AM + Size: 8.07 MB + FMRI: pkg://solaris/crypto/gnupg@2.0.17,5.11-0.175.0.0.0.2.537:20111019T091450Z INSTALLED expect(@provider).to receive(:shell_out_compacted).with("pkg", "info", @new_resource.package_name, timeout: 900).and_return(local) expect(@provider).to receive(:shell_out_compacted!).with("pkg", "info", "-r", @new_resource.package_name, timeout: 900).and_return(remote_output) @@ -140,17 +140,17 @@ INSTALLED it "should not include the human-readable version in the candidate_version" do remote = remote_output - remote.stdout = <<-PKG_STATUS - Name: security/sudo - Summary: sudo - authority delegation tool - State: Not Installed - Publisher: omnios - Version: 1.8.4.1 (1.8.4p1) - Build Release: 5.11 - Branch: 0.151002 -Packaging Date: April 1, 2012 05:55:52 PM - Size: 2.57 MB - FMRI: pkg://omnios/security/sudo@1.8.4.1,5.11-0.151002:20120401T175552Z + remote.stdout = <<~PKG_STATUS + Name: security/sudo + Summary: sudo - authority delegation tool + State: Not Installed + Publisher: omnios + Version: 1.8.4.1 (1.8.4p1) + Build Release: 5.11 + Branch: 0.151002 + Packaging Date: April 1, 2012 05:55:52 PM + Size: 2.57 MB + FMRI: pkg://omnios/security/sudo@1.8.4.1,5.11-0.151002:20120401T175552Z PKG_STATUS expect(@provider).to receive(:shell_out_compacted).with("pkg", "info", @new_resource.package_name, timeout: 900).and_return(local_output) expect(@provider).to receive(:shell_out_compacted!).with("pkg", "info", "-r", @new_resource.package_name, timeout: 900).and_return(remote) @@ -161,36 +161,36 @@ PKG_STATUS it "should not upgrade the package if it is already installed" do local = local_output - local.stdout = <<-INSTALLED - Name: crypto/gnupg - Summary: GNU Privacy Guard - Description: A complete and free implementation of the OpenPGP Standard as - defined by RFC4880. - Category: Applications/System Utilities - State: Installed - Publisher: solaris - Version: 2.0.17 - Build Release: 5.11 - Branch: 0.175.0.0.0.2.537 -Packaging Date: October 19, 2011 09:14:50 AM - Size: 8.07 MB - FMRI: pkg://solaris/crypto/gnupg@2.0.17,5.11-0.175.0.0.0.2.537:20111019T091450Z + local.stdout = <<~INSTALLED + Name: crypto/gnupg + Summary: GNU Privacy Guard + Description: A complete and free implementation of the OpenPGP Standard as + defined by RFC4880. + Category: Applications/System Utilities + State: Installed + Publisher: solaris + Version: 2.0.17 + Build Release: 5.11 + Branch: 0.175.0.0.0.2.537 + Packaging Date: October 19, 2011 09:14:50 AM + Size: 8.07 MB + FMRI: pkg://solaris/crypto/gnupg@2.0.17,5.11-0.175.0.0.0.2.537:20111019T091450Z INSTALLED remote = remote_output - remote.stdout = <<-REMOTE - Name: crypto/gnupg - Summary: GNU Privacy Guard - Description: A complete and free implementation of the OpenPGP Standard as - defined by RFC4880. - Category: Applications/System Utilities - State: Not Installed - Publisher: solaris - Version: 2.0.18 - Build Release: 5.11 - Branch: 0.175.0.0.0.2.537 -Packaging Date: October 19, 2011 09:14:50 AM - Size: 8.07 MB - FMRI: pkg://solaris/crypto/gnupg@2.0.18,5.11-0.175.0.0.0.2.537:20111019T091450Z + remote.stdout = <<~REMOTE + Name: crypto/gnupg + Summary: GNU Privacy Guard + Description: A complete and free implementation of the OpenPGP Standard as + defined by RFC4880. + Category: Applications/System Utilities + State: Not Installed + Publisher: solaris + Version: 2.0.18 + Build Release: 5.11 + Branch: 0.175.0.0.0.2.537 + Packaging Date: October 19, 2011 09:14:50 AM + Size: 8.07 MB + FMRI: pkg://solaris/crypto/gnupg@2.0.18,5.11-0.175.0.0.0.2.537:20111019T091450Z REMOTE expect(@provider).to receive(:shell_out_compacted).with("pkg", "info", @new_resource.package_name, timeout: 900).and_return(local) |