Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package yast2-storage-ng for openSUSE:Factory checked in at 2022-01-25 17:35:52 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/yast2-storage-ng (Old) and /work/SRC/openSUSE:Factory/.yast2-storage-ng.new.1938 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "yast2-storage-ng" Tue Jan 25 17:35:52 2022 rev:118 rq:947980 version:4.4.33 Changes: -------- --- /work/SRC/openSUSE:Factory/yast2-storage-ng/yast2-storage-ng.changes 2022-01-14 23:13:51.378655604 +0100 +++ /work/SRC/openSUSE:Factory/.yast2-storage-ng.new.1938/yast2-storage-ng.changes 2022-01-25 17:36:48.894026567 +0100 @@ -0,0 +1,11 @@ +------------------------------------------------------------------- +Fri Jan 21 15:33:45 UTC 2022 - Jos?? Iv??n L??pez Gonz??lez <jlo...@suse.com> + +- Fix tests according to new Md size reported by libstorage-ng + (related to bsc#1168914). +- 4.4.33 + +------------------------------------------------------------------- +Tue Jan 18 15:59:33 UTC 2022 - Ladislav Slez??k <lsle...@suse.cz> + +- Enable RSpec verifying doubles (bsc#1194784) Old: ---- yast2-storage-ng-4.4.32.tar.bz2 New: ---- yast2-storage-ng-4.4.33.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ yast2-storage-ng.spec ++++++ --- /var/tmp/diff_new_pack.5Fo2F4/_old 2022-01-25 17:36:51.314009900 +0100 +++ /var/tmp/diff_new_pack.5Fo2F4/_new 2022-01-25 17:36:51.318009872 +0100 @@ -17,7 +17,7 @@ Name: yast2-storage-ng -Version: 4.4.32 +Version: 4.4.33 Release: 0 Summary: YaST2 - Storage Configuration License: GPL-2.0-only OR GPL-3.0-only @@ -26,14 +26,14 @@ Source: %{name}-%{version}.tar.bz2 -# Storage::Luks.reset_activation_infos -BuildRequires: libstorage-ng-ruby >= 4.4.69 +# New Md size calculation +BuildRequires: libstorage-ng-ruby >= 4.4.76 BuildRequires: update-desktop-files # Yast::Kernel.propose_hibernation? BuildRequires: yast2 >= 4.3.41 BuildRequires: yast2-devtools >= 4.2.2 -# for AbortException and handle direct abort -BuildRequires: yast2-ruby-bindings >= 4.0.6 +# yast/rspec/helpers.rb +BuildRequires: yast2-ruby-bindings >= 4.4.7 # yast2-xml dependency is added by yast2 but ignored in the # openSUSE:Factory project config BuildRequires: yast2-xml @@ -48,8 +48,8 @@ # findutils for xargs Requires: findutils -# Storage::Luks.reset_activation_infos -Requires: libstorage-ng-ruby >= 4.4.69 +# New Md size calculation +Requires: libstorage-ng-ruby >= 4.4.76 # Yast::Kernel.propose_hibernation? Requires: yast2 >= 4.3.41 # Y2Packager::Repository ++++++ yast2-storage-ng-4.4.32.tar.bz2 -> yast2-storage-ng-4.4.33.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-storage-ng-4.4.32/package/yast2-storage-ng.changes new/yast2-storage-ng-4.4.33/package/yast2-storage-ng.changes --- old/yast2-storage-ng-4.4.32/package/yast2-storage-ng.changes 2022-01-13 14:52:55.000000000 +0100 +++ new/yast2-storage-ng-4.4.33/package/yast2-storage-ng.changes 2022-01-21 16:48:18.000000000 +0100 @@ -1,3 +1,14 @@ +------------------------------------------------------------------- +Fri Jan 21 15:33:45 UTC 2022 - Jos?? Iv??n L??pez Gonz??lez <jlo...@suse.com> + +- Fix tests according to new Md size reported by libstorage-ng + (related to bsc#1168914). +- 4.4.33 + +------------------------------------------------------------------- +Tue Jan 18 15:59:33 UTC 2022 - Ladislav Slez??k <lsle...@suse.cz> + +- Enable RSpec verifying doubles (bsc#1194784) ------------------------------------------------------------------- Wed Jan 12 11:12:13 UTC 2022 - Jos?? Iv??n L??pez Gonz??lez <jlo...@suse.com> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-storage-ng-4.4.32/package/yast2-storage-ng.spec new/yast2-storage-ng-4.4.33/package/yast2-storage-ng.spec --- old/yast2-storage-ng-4.4.32/package/yast2-storage-ng.spec 2022-01-13 14:52:55.000000000 +0100 +++ new/yast2-storage-ng-4.4.33/package/yast2-storage-ng.spec 2022-01-21 16:48:18.000000000 +0100 @@ -16,7 +16,7 @@ # Name: yast2-storage-ng -Version: 4.4.32 +Version: 4.4.33 Release: 0 Summary: YaST2 - Storage Configuration License: GPL-2.0-only OR GPL-3.0-only @@ -25,14 +25,14 @@ Source: %{name}-%{version}.tar.bz2 -# Storage::Luks.reset_activation_infos -BuildRequires: libstorage-ng-ruby >= 4.4.69 +# New Md size calculation +BuildRequires: libstorage-ng-ruby >= 4.4.76 BuildRequires: update-desktop-files # Yast::Kernel.propose_hibernation? BuildRequires: yast2 >= 4.3.41 BuildRequires: yast2-devtools >= 4.2.2 -# for AbortException and handle direct abort -BuildRequires: yast2-ruby-bindings >= 4.0.6 +# yast/rspec/helpers.rb +BuildRequires: yast2-ruby-bindings >= 4.4.7 # yast2-xml dependency is added by yast2 but ignored in the # openSUSE:Factory project config BuildRequires: yast2-xml @@ -47,8 +47,8 @@ # findutils for xargs Requires: findutils -# Storage::Luks.reset_activation_infos -Requires: libstorage-ng-ruby >= 4.4.69 +# New Md size calculation +Requires: libstorage-ng-ruby >= 4.4.76 # Yast::Kernel.propose_hibernation? Requires: yast2 >= 4.3.41 # Y2Packager::Repository diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-storage-ng-4.4.32/test/spec_helper.rb new/yast2-storage-ng-4.4.33/test/spec_helper.rb --- old/yast2-storage-ng-4.4.32/test/spec_helper.rb 2022-01-13 14:52:55.000000000 +0100 +++ new/yast2-storage-ng-4.4.33/test/spec_helper.rb 2022-01-21 16:48:18.000000000 +0100 @@ -85,10 +85,25 @@ # The Installation::ProposalStore and Installation::ProposalRunner classes are not loaded in the # tests to avoid cyclic dependencies with yast2-installation at build time. class ProposalStore; end - class ProposalRunner; end + + class ProposalRunner + def initialize(_runner); end + def run; end + end end +# Yast::Profile, AutoinstStorage and AutoinstConfig might be missing in RPM +# build to avoid cyclic dependencies with the autoyast2-installation package at build time. +Yast::RSpec::Helpers.define_yast_module("Profile", methods: [:current, :ReadXML]) +Yast::RSpec::Helpers.define_yast_module("AutoinstStorage", methods: [:Import]) +Yast::RSpec::Helpers.define_yast_module("AutoinstConfig", methods: [:Confirm=]) + RSpec.configure do |c| + c.mock_with :rspec do |config| + # verify that the mocked methods actually exist + config.verify_partial_doubles = true + end + c.include Yast::RSpec::StorageHelpers c.before do @@ -98,16 +113,6 @@ stub_const("Y2Packager::Repository", double("Y2Packager::Repository")) allow(Y2Packager::Repository).to receive(:all).and_return([]) - allow(Yast).to receive(:import).and_call_original - # Yast::Profile, AutoinstStorage and AutoinstConfig are not loaded in the tests to avoid cyclic - # dependencies with the yast-installation package at build time. - allow(Yast).to receive(:import).with("Profile") - allow(Yast).to receive(:import).with("AutoinstStorage") - allow(Yast).to receive(:import).with("AutoinstConfig") - stub_const("Yast::Profile", double("Yast::Profile")) - stub_const("Yast::AutoinstStorage", double("Yast::AutoinstStorage")) - stub_const("Yast::AutoinstConfig", double("Yast::AutoinstConfig")) - allow(Y2Storage::DumpManager.instance).to receive(:dump) if respond_to?(:architecture) # Match mocked architecture in Arch module @@ -146,8 +151,8 @@ # imported features (i.e., when control.xml is not found). # # The product features could be modified during testing. Due to there are - # tests reling on settings with pristine default values, it is necessary to - # reset the product features to not interfer in the results. + # tests relying on settings with pristine default values, it is necessary to + # reset the product features to not interfere in the results. c.after(:all) do Yast::ProductFeatures.Import({}) end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-storage-ng-4.4.32/test/y2partitioner/widgets/btrfs_devices_selector_test.rb new/yast2-storage-ng-4.4.33/test/y2partitioner/widgets/btrfs_devices_selector_test.rb --- old/yast2-storage-ng-4.4.32/test/y2partitioner/widgets/btrfs_devices_selector_test.rb 2022-01-13 14:52:55.000000000 +0100 +++ new/yast2-storage-ng-4.4.33/test/y2partitioner/widgets/btrfs_devices_selector_test.rb 2022-01-21 16:48:18.000000000 +0100 @@ -236,14 +236,14 @@ describe "#contents" do it "does not display the selected size" do - expect(Yast).to_not receive(:Id).with(:selected_size) + expect(subject).to_not receive(:Id).with(:selected_size) expect(Yast::UI).to_not receive(:ReplaceWidget) subject.refresh end it "does not display the unselected size" do - expect(Yast).to_not receive(:Id).with(:unselected_size) + expect(subject).to_not receive(:Id).with(:unselected_size) expect(Yast::UI).to_not receive(:ReplaceWidget) subject.refresh diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-storage-ng-4.4.32/test/y2partitioner/widgets/columns/format_test.rb new/yast2-storage-ng-4.4.33/test/y2partitioner/widgets/columns/format_test.rb --- old/yast2-storage-ng-4.4.32/test/y2partitioner/widgets/columns/format_test.rb 2022-01-13 14:52:55.000000000 +0100 +++ new/yast2-storage-ng-4.4.33/test/y2partitioner/widgets/columns/format_test.rb 2022-01-21 16:48:18.000000000 +0100 @@ -39,6 +39,7 @@ describe "#value_for" do context "when the device responds to #to_be_formatted?" do before do + allow(device).to receive(:respond_to?).and_call_original allow(device).to receive(:respond_to?).with(:to_be_formatted?).and_return(true) allow(device).to receive(:to_be_formatted?).and_return(to_be_formatted) end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-storage-ng-4.4.32/test/y2partitioner/widgets/columns/size_test.rb new/yast2-storage-ng-4.4.33/test/y2partitioner/widgets/columns/size_test.rb --- old/yast2-storage-ng-4.4.32/test/y2partitioner/widgets/columns/size_test.rb 2022-01-13 14:52:55.000000000 +0100 +++ new/yast2-storage-ng-4.4.33/test/y2partitioner/widgets/columns/size_test.rb 2022-01-21 16:48:18.000000000 +0100 @@ -1,4 +1,5 @@ #!/usr/bin/env rspec + # Copyright (c) [2020] SUSE LLC # # All Rights Reserved. @@ -40,12 +41,6 @@ end shared_examples "value for size" do - let(:disk_size) { Y2Storage::DiskSize.new(60.GiB) } - - before do - allow(device).to receive(:size).and_return(disk_size) - end - it "returns a Yast::Term" do expect(subject.value_for(device)).to be_a(Yast::Term) end @@ -67,8 +62,10 @@ end describe "#value_for" do + let(:disk_size) { Y2Storage::DiskSize.new(60.GiB) } + context "when no device is given" do - let(:device_name) { "unknonw" } + let(:device_name) { "unknown" } it "returns an empty string" do expect(subject.value_for(device)).to eq("") @@ -76,6 +73,10 @@ end context "when the device responds to #size method" do + before do + allow(device).to receive(:size).and_return(disk_size) + end + include_examples "value for size" end @@ -90,18 +91,30 @@ end context "when a fstab entry is given" do + let(:device) { fstab } + + let(:fstab) { fstab_entry(fstab_device_name, "/", btrfs, ["subvol=@/"], 0, 0) } + + let(:fstab_device) { devicegraph.find_by_name(fstab_device_name) } + let(:btrfs) { Y2Storage::Filesystems::Type::BTRFS } - let(:root_fstab_entry) { fstab_entry("/dev/sdb2", "/", btrfs, ["subvol=@/"], 0, 0) } - let(:unknown_fstab_entry) { fstab_entry("/dev/vdz", "/home", btrfs, [], 0, 0) } - context "and the device is found in the system" do - let(:device) { root_fstab_entry } + before do + allow(fstab).to receive(:device).and_return(fstab_device) + end + + context "and the device in the fstab entry is found in the system" do + let(:fstab_device_name) { "/dev/sdb2" } + + before do + allow(fstab_device).to receive(:size).and_return(disk_size) + end include_examples "value for size" end context "but the device is not found in the system" do - let(:device) { unknown_fstab_entry } + let(:fstab_device_name) { "/dev/vdz" } it "returns an empty string" do expect(subject.value_for(device)).to eq("") diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-storage-ng-4.4.32/test/y2partitioner/widgets/device_buttons_set_test.rb new/yast2-storage-ng-4.4.33/test/y2partitioner/widgets/device_buttons_set_test.rb --- old/yast2-storage-ng-4.4.32/test/y2partitioner/widgets/device_buttons_set_test.rb 2022-01-13 14:52:55.000000000 +0100 +++ new/yast2-storage-ng-4.4.33/test/y2partitioner/widgets/device_buttons_set_test.rb 2022-01-21 16:48:18.000000000 +0100 @@ -46,7 +46,9 @@ describe "#device=" do before do - allow(device).to receive(:formatted_as?).with(:btrfs).and_return(btrfs) + if device.respond_to?(:formatted_as?) + allow(device).to receive(:formatted_as?).with(:btrfs).and_return(btrfs) + end end let(:btrfs) { false } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-storage-ng-4.4.32/test/y2partitioner/widgets/pages/nfs_mounts_test.rb new/yast2-storage-ng-4.4.33/test/y2partitioner/widgets/pages/nfs_mounts_test.rb --- old/yast2-storage-ng-4.4.32/test/y2partitioner/widgets/pages/nfs_mounts_test.rb 2022-01-13 14:52:55.000000000 +0100 +++ new/yast2-storage-ng-4.4.33/test/y2partitioner/widgets/pages/nfs_mounts_test.rb 2022-01-21 16:48:18.000000000 +0100 @@ -27,6 +27,10 @@ describe Y2Partitioner::Widgets::Pages::NfsMounts do before do devicegraph_stub("nfs1.xml") + + # do not read the real NFS settings (including the firewall) from the system + allow(Yast::WFM).to receive(:CallFunction).and_call_original + allow(Yast::WFM).to receive(:CallFunction).with("nfs-client4part", ["Read"]) end let(:device_graph) { Y2Partitioner::DeviceGraphs.instance.current } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-storage-ng-4.4.32/test/y2storage/boot_requirements_duplicate_test.rb new/yast2-storage-ng-4.4.33/test/y2storage/boot_requirements_duplicate_test.rb --- old/yast2-storage-ng-4.4.32/test/y2storage/boot_requirements_duplicate_test.rb 2022-01-13 14:52:55.000000000 +0100 +++ new/yast2-storage-ng-4.4.33/test/y2storage/boot_requirements_duplicate_test.rb 2022-01-21 16:48:18.000000000 +0100 @@ -159,7 +159,7 @@ context "and a suitable PReP is already in the list of planned partitions" do let(:planned_prep_partitions) { [planned_prep_partition] } - let(:planned_prep_partition) { [planned_partition] } + let(:planned_prep_partition) { planned_partition } before do allow(planned_prep_partition).to receive(:match_volume?).and_return(true) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-storage-ng-4.4.32/test/y2storage/dialogs/guided_setup/select_scheme_test.rb new/yast2-storage-ng-4.4.33/test/y2storage/dialogs/guided_setup/select_scheme_test.rb --- old/yast2-storage-ng-4.4.32/test/y2storage/dialogs/guided_setup/select_scheme_test.rb 2022-01-13 14:52:55.000000000 +0100 +++ new/yast2-storage-ng-4.4.33/test/y2storage/dialogs/guided_setup/select_scheme_test.rb 2022-01-21 16:48:18.000000000 +0100 @@ -72,80 +72,64 @@ describe "checkbox for #separate_vgs" do before do - allow(settings).to receive(:ng_format?).and_return ng_format allow(subject).to receive(:CheckBox) + allow(settings).to receive(:volumes).and_return volumes end - context "when legacy settings are used" do - let(:ng_format) { false } + let(:volumes) do + [ + double("VolumeSpecification", mount_point: "/", separate_vg_name: separate_vg_name), + double("VolumeSpecification", mount_point: "swap", separate_vg_name: separate_vg_name) + ] + end + + context "and no volume specifies a separate_vg_name" do + let(:separate_vg_name) { nil } it "does not include an option for separate LVM groups" do expect(subject).to_not receive(:CheckBox).with(Id(:separate_vgs), any_args) subject.run end - end - context "when ng settings are used" do - let(:ng_format) { true } + it "does not includes a clarification in the label used for the :lvm option" do + expect(subject).to_not receive(:CheckBox).with(Id(:lvm), /for the Base System/) - before { allow(settings).to receive(:volumes).and_return volumes } - - let(:volumes) do - [ - double("VolumeSpecification", mount_point: "/", separate_vg_name: separate_vg_name), - double("VolumeSpecification", mount_point: "swap", separate_vg_name: separate_vg_name) - ] + subject.run end + end - context "and no volume specifies a separate_vg_name" do - let(:separate_vg_name) { nil } + context "and some volume specifies a separate_vg_name" do + let(:separate_vg_name) { "fake_separate_vg_name" } - it "does not include an option for separate LVM groups" do - expect(subject).to_not receive(:CheckBox).with(Id(:separate_vgs), any_args) + it "includes an option to use separate LVM volumes" do + expect(subject).to receive(:CheckBox).with(Id(:separate_vgs), any_args) - subject.run - end + subject.run + end - it "does not includes a clarification in the label used for the :lvm option" do - expect(subject).to_not receive(:CheckBox).with(Id(:lvm), /for the Base System/) + it "includes a clarification in the label used for the :lvm option" do + expect(subject).to receive(:CheckBox).with(Id(:lvm), /for the Base System/) - subject.run - end + subject.run end - context "and some volume specifies a separate_vg_name" do - let(:separate_vg_name) { "fake_separate_vg_name" } - - it "includes an option to use separate LVM volumes" do - expect(subject).to receive(:CheckBox).with(Id(:separate_vgs), any_args) + context "and settings does not set separate volume groups" do + before { settings.separate_vgs = false } + it "does not select separate_vgs by default" do + expect_not_select(:separate_vgs) subject.run end + end - it "includes a clarification in the label used for the :lvm option" do - expect(subject).to receive(:CheckBox).with(Id(:lvm), /for the Base System/) + context "and settings sets separate volume groups" do + before { settings.separate_vgs = true } + it "selects separate_vgs by default" do + expect_select(:separate_vgs) subject.run end - - context "and settings does not set separate volume groups" do - before { settings.separate_vgs = false } - - it "does not select separate_vgs by default" do - expect_not_select(:separate_vgs) - subject.run - end - end - - context "and settings sets separate volume groups" do - before { settings.separate_vgs = true } - - it "selects separate_vgs by default" do - expect_select(:separate_vgs) - subject.run - end - end end end end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-storage-ng-4.4.32/test/y2storage/encryption_method_test.rb new/yast2-storage-ng-4.4.33/test/y2storage/encryption_method_test.rb --- old/yast2-storage-ng-4.4.32/test/y2storage/encryption_method_test.rb 2022-01-13 14:52:55.000000000 +0100 +++ new/yast2-storage-ng-4.4.33/test/y2storage/encryption_method_test.rb 2022-01-21 16:48:18.000000000 +0100 @@ -184,7 +184,8 @@ context "if secure swap is not available" do before do - allow(Y2Storage::EncryptionMethod::SecureSwap).to receive(:available?).and_return(false) + allow_any_instance_of(Y2Storage::EncryptionMethod::SecureSwap).to receive(:available?) + .and_return(false) end it "does not include secure swap method" do diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-storage-ng-4.4.32/test/y2storage/md_test.rb new/yast2-storage-ng-4.4.33/test/y2storage/md_test.rb --- old/yast2-storage-ng-4.4.32/test/y2storage/md_test.rb 2022-01-13 14:52:55.000000000 +0100 +++ new/yast2-storage-ng-4.4.33/test/y2storage/md_test.rb 2022-01-21 16:48:18.000000000 +0100 @@ -1,4 +1,5 @@ #!/usr/bin/env rspec + # Copyright (c) [2017] SUSE LLC # # All Rights Reserved. @@ -184,7 +185,7 @@ describe "#inspect" do it "inspects a MD object" do - expect(md.inspect).to eq "<Md /dev/md0 15875 MiB (15.50 GiB) raid0>" + expect(md.inspect).to eq "<Md /dev/md0 16220688 KiB (15.47 GiB) raid0>" end end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-storage-ng-4.4.32/test/y2storage/yaml_writer_test.rb new/yast2-storage-ng-4.4.33/test/y2storage/yaml_writer_test.rb --- old/yast2-storage-ng-4.4.32/test/y2storage/yaml_writer_test.rb 2022-01-13 14:52:55.000000000 +0100 +++ new/yast2-storage-ng-4.4.33/test/y2storage/yaml_writer_test.rb 2022-01-21 16:48:18.000000000 +0100 @@ -1,4 +1,5 @@ #!/usr/bin/env rspec + # Copyright (c) 2016 SUSE LLC # # All Rights Reserved. @@ -673,7 +674,7 @@ type: primary id: linux - free: - size: 19659744 KiB (18.75 GiB) + size: 19637506 KiB (18.73 GiB) start: 1025 MiB (1.00 GiB) md_devices: - md_device: