Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package yast2-installation for openSUSE:Factory checked in at 2022-01-25 17:35:46 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/yast2-installation (Old) and /work/SRC/openSUSE:Factory/.yast2-installation.new.1938 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "yast2-installation" Tue Jan 25 17:35:46 2022 rev:491 rq:947704 version:4.4.35 Changes: -------- --- /work/SRC/openSUSE:Factory/yast2-installation/yast2-installation.changes 2022-01-14 23:13:47.482653092 +0100 +++ /work/SRC/openSUSE:Factory/.yast2-installation.new.1938/yast2-installation.changes 2022-01-25 17:36:37.166107342 +0100 @@ -1,0 +2,9 @@ +Thu Jan 20 08:52:18 UTC 2022 - Ladislav Slez??k <lsle...@suse.cz> + +- Enable RSpec verifying doubles in unit tests to ensue that + the mocked methods really exist (bsc#1194784) +- Fixed crash when importing an SSH configuration in AutoYaST + installation +- 4.4.35 + +------------------------------------------------------------------- Old: ---- yast2-installation-4.4.34.tar.bz2 New: ---- yast2-installation-4.4.35.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ yast2-installation.spec ++++++ --- /var/tmp/diff_new_pack.HHPfFa/_old 2022-01-25 17:36:37.826102796 +0100 +++ /var/tmp/diff_new_pack.HHPfFa/_new 2022-01-25 17:36:37.830102768 +0100 @@ -17,7 +17,7 @@ Name: yast2-installation -Version: 4.4.34 +Version: 4.4.35 Release: 0 Summary: YaST2 - Installation Parts License: GPL-2.0-only @@ -41,8 +41,8 @@ BuildRequires: yast2-network >= 4.4.12 # ProductSpec API BuildRequires: yast2-packager >= 4.4.13 -# for AbortException and handle direct abort -BuildRequires: yast2-ruby-bindings >= 4.0.6 +# yast/rspec/helpers.rb +BuildRequires: yast2-ruby-bindings >= 4.4.7 # For LSM classes BuildRequires: yast2-security # using /usr/bin/udevadm ++++++ yast2-installation-4.4.34.tar.bz2 -> yast2-installation-4.4.35.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-installation-4.4.34/package/yast2-installation.changes new/yast2-installation-4.4.35/package/yast2-installation.changes --- old/yast2-installation-4.4.34/package/yast2-installation.changes 2022-01-13 14:49:03.000000000 +0100 +++ new/yast2-installation-4.4.35/package/yast2-installation.changes 2022-01-20 15:36:55.000000000 +0100 @@ -1,4 +1,13 @@ ------------------------------------------------------------------- +Thu Jan 20 08:52:18 UTC 2022 - Ladislav Slez??k <lsle...@suse.cz> + +- Enable RSpec verifying doubles in unit tests to ensue that + the mocked methods really exist (bsc#1194784) +- Fixed crash when importing an SSH configuration in AutoYaST + installation +- 4.4.35 + +------------------------------------------------------------------- Wed Jan 12 13:02:56 UTC 2022 - Josef Reidinger <jreidin...@suse.com> - Show release notes button in progress in Qt interface diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-installation-4.4.34/package/yast2-installation.spec new/yast2-installation-4.4.35/package/yast2-installation.spec --- old/yast2-installation-4.4.34/package/yast2-installation.spec 2022-01-13 14:49:03.000000000 +0100 +++ new/yast2-installation-4.4.35/package/yast2-installation.spec 2022-01-20 15:36:55.000000000 +0100 @@ -17,7 +17,7 @@ Name: yast2-installation -Version: 4.4.34 +Version: 4.4.35 Release: 0 Summary: YaST2 - Installation Parts License: GPL-2.0-only @@ -41,8 +41,8 @@ BuildRequires: yast2-network >= 4.4.12 # ProductSpec API BuildRequires: yast2-packager >= 4.4.13 -# for AbortException and handle direct abort -BuildRequires: yast2-ruby-bindings >= 4.0.6 +# yast/rspec/helpers.rb +BuildRequires: yast2-ruby-bindings >= 4.4.7 # For LSM classes BuildRequires: yast2-security # using /usr/bin/udevadm diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-installation-4.4.34/src/lib/installation/clients/ssh_import_auto.rb new/yast2-installation-4.4.35/src/lib/installation/clients/ssh_import_auto.rb --- old/yast2-installation-4.4.34/src/lib/installation/clients/ssh_import_auto.rb 2022-01-13 14:49:03.000000000 +0100 +++ new/yast2-installation-4.4.35/src/lib/installation/clients/ssh_import_auto.rb 2022-01-20 15:36:55.000000000 +0100 @@ -133,7 +133,7 @@ Popup.Notify _("It makes no sense to write these settings to system.") true else - ssh_importer.write(::Installation.destdir) + ssh_importer.write(Yast::Installation.destdir) end end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-installation-4.4.34/test/inst_update_installer_test.rb new/yast2-installation-4.4.35/test/inst_update_installer_test.rb --- old/yast2-installation-4.4.34/test/inst_update_installer_test.rb 2022-01-13 14:49:03.000000000 +0100 +++ new/yast2-installation-4.4.35/test/inst_update_installer_test.rb 2022-01-20 15:36:55.000000000 +0100 @@ -56,7 +56,6 @@ allow(subject).to receive(:fetch_profile).and_return(ay_profile) allow(subject).to receive(:process_profile) allow(subject).to receive(:valid_repositories?).and_return(true) - allow(finder).to receive(:add_installation_repo) # stub the Profile module to avoid dependency on autoyast2-installation stub_const("Yast::Profile", ay_profile) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-installation-4.4.34/test/lib/clients/inst_complex_welcome_test.rb new/yast2-installation-4.4.35/test/lib/clients/inst_complex_welcome_test.rb --- old/yast2-installation-4.4.34/test/lib/clients/inst_complex_welcome_test.rb 2022-01-13 14:49:03.000000000 +0100 +++ new/yast2-installation-4.4.35/test/lib/clients/inst_complex_welcome_test.rb 2022-01-20 15:36:55.000000000 +0100 @@ -108,7 +108,6 @@ allow(Yast::FileUtils).to receive(:Exists).with("/README.BETA") .and_return(true) allow(Yast::GetInstArgs).to receive(:going_back).and_return(false) - allow(subject).to receive(:event_loop) allow(Yast::ProductLicense).to receive(:AcceptanceNeeded).and_return(false) end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-installation-4.4.34/test/lib/clients/security_finish_test.rb new/yast2-installation-4.4.35/test/lib/clients/security_finish_test.rb --- old/yast2-installation-4.4.34/test/lib/clients/security_finish_test.rb 2022-01-13 14:49:03.000000000 +0100 +++ new/yast2-installation-4.4.35/test/lib/clients/security_finish_test.rb 2022-01-20 15:36:55.000000000 +0100 @@ -108,7 +108,7 @@ end it "skips writting policy kit default privileges" do - allow(proposal_settings).to receive(:polkit_default_privs).and_return("easy") + allow(proposal_settings).to receive(:polkit_default_privileges).and_return("easy") expect(Yast::SCR).to_not receive(:Write).with( path(".sysconfig.security.POLKIT_DEFAULT_PRIVS"), anything ) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-installation-4.4.34/test/lib/security_settings_test.rb new/yast2-installation-4.4.35/test/lib/security_settings_test.rb --- old/yast2-installation-4.4.34/test/lib/security_settings_test.rb 2022-01-13 14:49:03.000000000 +0100 +++ new/yast2-installation-4.4.35/test/lib/security_settings_test.rb 2022-01-20 15:36:55.000000000 +0100 @@ -142,7 +142,7 @@ lsm_config.configurable = true allow(Yast::PackagesProposal).to receive("SetResolvables") .with("LSM", :pattern, anything) - allow(subject).to receive(:propose_default) + allow(lsm_config).to receive(:propose_default) end context "but there is already a module selected" do diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-installation-4.4.34/test/lib/update_repositories_finder_test.rb new/yast2-installation-4.4.35/test/lib/update_repositories_finder_test.rb --- old/yast2-installation-4.4.34/test/lib/update_repositories_finder_test.rb 2022-01-13 14:49:03.000000000 +0100 +++ new/yast2-installation-4.4.35/test/lib/update_repositories_finder_test.rb 2022-01-20 15:36:55.000000000 +0100 @@ -77,8 +77,6 @@ allow(Yast::ProductFeatures).to receive(:GetStringFeature) .with("globals", "self_update_url") .and_return(url_from_control) - # TODO: test don't mock! - allow(finder).to receive(:add_installation_repo) allow(Yast::Linuxrc).to receive(:InstallInf).with("regurl") .and_return(nil) end @@ -113,7 +111,7 @@ ) end - let(:regservice_selection) { Class.new } + let(:regservice_selection) { Class.new { def self.run(_arg); end } } let(:url_helpers) do double("url_helpers", registration_url: smt0.slp_url, slp_discovery: []) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-installation-4.4.34/test/lib/widgets/online_repos_test.rb new/yast2-installation-4.4.35/test/lib/widgets/online_repos_test.rb --- old/yast2-installation-4.4.34/test/lib/widgets/online_repos_test.rb 2022-01-13 14:49:03.000000000 +0100 +++ new/yast2-installation-4.4.35/test/lib/widgets/online_repos_test.rb 2022-01-20 15:36:55.000000000 +0100 @@ -7,5 +7,9 @@ describe Installation::Widgets::OnlineRepos do subject { described_class.new } + before do + allow(Yast::WFM).to receive(:CallFunction) + end + include_examples "CWM::PushButton" end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-installation-4.4.34/test/lib/widgets/system_role_reader_test.rb new/yast2-installation-4.4.35/test/lib/widgets/system_role_reader_test.rb --- old/yast2-installation-4.4.34/test/lib/widgets/system_role_reader_test.rb 2022-01-13 14:49:03.000000000 +0100 +++ new/yast2-installation-4.4.35/test/lib/widgets/system_role_reader_test.rb 2022-01-20 15:36:55.000000000 +0100 @@ -8,6 +8,8 @@ class DummySystemRoleReader include Yast::Logger include ::Installation::Widgets::SystemRoleReader + + attr_accessor :value end subject { DummySystemRoleReader.new } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-installation-4.4.34/test/proposal_runner_test.rb new/yast2-installation-4.4.35/test/proposal_runner_test.rb --- old/yast2-installation-4.4.34/test/proposal_runner_test.rb 2022-01-13 14:49:03.000000000 +0100 +++ new/yast2-installation-4.4.35/test/proposal_runner_test.rb 2022-01-20 15:36:55.000000000 +0100 @@ -159,17 +159,19 @@ end context "and it enables soft r/o proposal in case of error" do - PROPERTIES = { - "enable_skip" => "no", - "label" => "Installation Settings", - "mode" => "autoinstallation", - "name" => "initial", - "stage" => "initial", - "unique_id" => "auto_inst_proposal", - "proposal_modules" => [ - { "name" => "software", "presentation_order" => "15", "read_only" => "soft" } - ] - }.freeze + let(:properties) do + { + "enable_skip" => "no", + "label" => "Installation Settings", + "mode" => "autoinstallation", + "name" => "initial", + "stage" => "initial", + "unique_id" => "auto_inst_proposal", + "proposal_modules" => [ + { "name" => "software", "presentation_order" => "15", "read_only" => "soft" } + ] + } + end let(:proposals) { [["software_proposal", 15]] } it "makes a proposal" do diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-installation-4.4.34/test/ssh_import_auto_test.rb new/yast2-installation-4.4.35/test/ssh_import_auto_test.rb --- old/yast2-installation-4.4.34/test/ssh_import_auto_test.rb 2022-01-13 14:49:03.000000000 +0100 +++ new/yast2-installation-4.4.35/test/ssh_import_auto_test.rb 2022-01-20 15:36:55.000000000 +0100 @@ -128,7 +128,7 @@ before do importer.add_config(fixtures_dir("root1"), "dev") - allow(::Installation).to receive(:destdir).and_return("/") + allow(Yast::Installation).to receive(:destdir).and_return("/") end it "writes the keys/configuration to the installation directory" do diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-installation-4.4.34/test/test_helper.rb new/yast2-installation-4.4.35/test/test_helper.rb --- old/yast2-installation-4.4.34/test/test_helper.rb 2022-01-13 14:49:03.000000000 +0100 +++ new/yast2-installation-4.4.35/test/test_helper.rb 2022-01-20 15:36:55.000000000 +0100 @@ -15,32 +15,9 @@ FIXTURES_DIR = Pathname.new(__FILE__).dirname.join("fixtures") -# mock some dependencies, to not increase built dependencies +# mock some dependencies, to not increase build dependencies $LOAD_PATH.unshift(File.join(FIXTURES_DIR.to_s, "stub_libs")) -# stub module to prevent its Import -# Useful for modules from different yast packages, to avoid build dependencies -def stub_module(name) - Yast.const_set(name.to_sym, Class.new { def self.fake_method; end }) -end - -# stub classes from other modules to speed up a build -stub_module("AddOnProduct") -stub_module("AutoinstConfig") -stub_module("AutoinstGeneral") -stub_module("AutoinstSoftware") -stub_module("Console") -stub_module("InstURL") -stub_module("Keyboard") -stub_module("Language") -stub_module("Packages") -stub_module("ProductLicense") -stub_module("Profile") -stub_module("ProfileLocation") -# we cannot depend on this module (circular dependency) -stub_module("NtpClient") -stub_module("Proxy") - if ENV["COVERAGE"] require "simplecov" SimpleCov.start do @@ -73,8 +50,36 @@ config.extend Yast::I18n # available in context/describe config.include Yast::I18n # available in it/let/before/... config.include Helpers # custom helpers + + config.mock_with :rspec do |c| + # verify that the mocked methods actually exist + # https://relishapp.com/rspec/rspec-mocks/v/3-0/docs/verifying-doubles/partial-doubles + c.verify_partial_doubles = true + end end +# stub YaST modules to prevent importing them, +# useful for modules from different yast packages to avoid build dependencies +Yast::RSpec::Helpers.define_yast_module("AddOnProduct", methods: [:selected_installation_products]) +Yast::RSpec::Helpers.define_yast_module("AutoinstConfig", methods: [:cio_ignore, :second_stage]) +Yast::RSpec::Helpers.define_yast_module("AutoinstGeneral", + methods: [:self_update, :self_update_url]) +Yast::RSpec::Helpers.define_yast_module("AutoinstSoftware") +Yast::RSpec::Helpers.define_yast_module("Console") +Yast::RSpec::Helpers.define_yast_module("InstURL", methods: [:installInf2Url]) +Yast::RSpec::Helpers.define_yast_module("Keyboard") +Yast::RSpec::Helpers.define_yast_module("Language", methods: [:language]) +Yast::RSpec::Helpers.define_yast_module("NtpClient", + methods: [:modified=, :ntp_conf, :ntp_selected=, :run_service=, :synchronize_time=]) +Yast::RSpec::Helpers.define_yast_module("Packages", + methods: [:GetBaseSourceID, :Reset, :SelectSystemPackages, :SelectSystemPatterns, + :check_remote_installation_packages, :init_called]) +Yast::RSpec::Helpers.define_yast_module("ProductLicense") +Yast::RSpec::Helpers.define_yast_module("Profile", methods: [:current]) +Yast::RSpec::Helpers.define_yast_module("ProfileLocation") +Yast::RSpec::Helpers.define_yast_module("Proxy", + methods: [:Export, :Import, :WriteCurlrc, :WriteSysconfig, :modified, :to_target]) + # require the "bin/yupdate" script for testing it, unfortunately we cannot use # a simple require/require_relative for it, let's share the workaround in a single place def require_yupdate