Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package yast2-network for openSUSE:Factory checked in at 2021-03-08 15:16:11 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/yast2-network (Old) and /work/SRC/openSUSE:Factory/.yast2-network.new.2378 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "yast2-network" Mon Mar 8 15:16:11 2021 rev:446 rq:877270 version:4.3.54 Changes: -------- --- /work/SRC/openSUSE:Factory/yast2-network/yast2-network.changes 2021-02-26 21:59:07.467803590 +0100 +++ /work/SRC/openSUSE:Factory/.yast2-network.new.2378/yast2-network.changes 2021-03-08 15:17:57.493969490 +0100 @@ -1,0 +2,29 @@ +Fri Mar 5 15:46:19 UTC 2021 - Ladislav Slez??k <lsle...@suse.cz> + +- Define the network configuration buttons for the installer + console (related to jsc#PM-1895, jsc#SLE-16263) +- 4.3.54 + +------------------------------------------------------------------- +Thu Mar 4 15:41:04 UTC 2021 - Imobach Gonzalez Sosa <igonzalezs...@suse.com> + +- Do not consider proposing 'nfsroot' as startmode when running on + installation (bsc#1182818). +- 4.3.53 + +------------------------------------------------------------------- +Wed Mar 3 12:11:39 UTC 2021 - Knut Anderssen <kanders...@suse.com> + +- Do not filter ethernet cards when configuring a bond in s390 + (bsc#1182911). +- Only propose a 1492 MTU size when configuring an LCS interface. +- 4.3.52 + +------------------------------------------------------------------- +Tue Mar 2 11:48:59 UTC 2021 - Imobach Gonzalez Sosa <igonzalezs...@suse.com> + +- Support both 'bridge_forwarddelay' and 'bridge_forward_delay'. + The latter takes precedence (bsc#1180944). +- 4.3.51 + +------------------------------------------------------------------- Old: ---- yast2-network-4.3.50.tar.bz2 New: ---- yast2-network-4.3.54.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ yast2-network.spec ++++++ --- /var/tmp/diff_new_pack.qW3AQP/_old 2021-03-08 15:17:59.077970651 +0100 +++ /var/tmp/diff_new_pack.qW3AQP/_new 2021-03-08 15:17:59.077970651 +0100 @@ -17,7 +17,7 @@ Name: yast2-network -Version: 4.3.50 +Version: 4.3.54 Release: 0 Summary: YaST2 - Network Configuration License: GPL-2.0-only ++++++ yast2-network-4.3.50.tar.bz2 -> yast2-network-4.3.54.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-network-4.3.50/package/yast2-network.changes new/yast2-network-4.3.54/package/yast2-network.changes --- old/yast2-network-4.3.50/package/yast2-network.changes 2021-02-26 14:45:25.000000000 +0100 +++ new/yast2-network-4.3.54/package/yast2-network.changes 2021-03-05 17:27:53.000000000 +0100 @@ -1,4 +1,33 @@ ------------------------------------------------------------------- +Fri Mar 5 15:46:19 UTC 2021 - Ladislav Slez??k <lsle...@suse.cz> + +- Define the network configuration buttons for the installer + console (related to jsc#PM-1895, jsc#SLE-16263) +- 4.3.54 + +------------------------------------------------------------------- +Thu Mar 4 15:41:04 UTC 2021 - Imobach Gonzalez Sosa <igonzalezs...@suse.com> + +- Do not consider proposing 'nfsroot' as startmode when running on + installation (bsc#1182818). +- 4.3.53 + +------------------------------------------------------------------- +Wed Mar 3 12:11:39 UTC 2021 - Knut Anderssen <kanders...@suse.com> + +- Do not filter ethernet cards when configuring a bond in s390 + (bsc#1182911). +- Only propose a 1492 MTU size when configuring an LCS interface. +- 4.3.52 + +------------------------------------------------------------------- +Tue Mar 2 11:48:59 UTC 2021 - Imobach Gonzalez Sosa <igonzalezs...@suse.com> + +- Support both 'bridge_forwarddelay' and 'bridge_forward_delay'. + The latter takes precedence (bsc#1180944). +- 4.3.51 + +------------------------------------------------------------------- Fri Feb 26 06:41:17 UTC 2021 - Imobach Gonzalez Sosa <igonzalezs...@suse.com> - Improve wireless devices configuration UX (bsc#1177834): diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-network-4.3.50/package/yast2-network.spec new/yast2-network-4.3.54/package/yast2-network.spec --- old/yast2-network-4.3.50/package/yast2-network.spec 2021-02-26 14:45:25.000000000 +0100 +++ new/yast2-network-4.3.54/package/yast2-network.spec 2021-03-05 17:27:53.000000000 +0100 @@ -17,7 +17,7 @@ Name: yast2-network -Version: 4.3.50 +Version: 4.3.54 Release: 0 Summary: YaST2 - Network Configuration License: GPL-2.0-only diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-network-4.3.50/src/autoyast-rnc/networking.rnc new/yast2-network-4.3.54/src/autoyast-rnc/networking.rnc --- old/yast2-network-4.3.50/src/autoyast-rnc/networking.rnc 2021-02-26 14:45:25.000000000 +0100 +++ new/yast2-network-4.3.54/src/autoyast-rnc/networking.rnc 2021-03-05 17:27:53.000000000 +0100 @@ -219,10 +219,12 @@ # Bridge # bridge_settings = ( - element bridge { STRING_ATTR, ("yes" | "no") }? & - element bridge_ports { STRING }? & - element bridge_stp { STRING_ATTR, ("on" | "off") }? & - element bridge_forwarddelay { STRING }? + element bridge { STRING_ATTR, ("yes" | "no") }? & + element bridge_ports { STRING }? & + element bridge_stp { STRING_ATTR, ("on" | "off") }? & + element bridge_forward_delay { STRING }? & + # backward compatibility (bsc#1180944) + element bridge_forwarddelay { STRING }? ) # diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-network-4.3.50/src/lib/installation/console/plugins/network_button.rb new/yast2-network-4.3.54/src/lib/installation/console/plugins/network_button.rb --- old/yast2-network-4.3.50/src/lib/installation/console/plugins/network_button.rb 1970-01-01 01:00:00.000000000 +0100 +++ new/yast2-network-4.3.54/src/lib/installation/console/plugins/network_button.rb 2021-03-05 17:27:53.000000000 +0100 @@ -0,0 +1,57 @@ +# Copyright (c) [2021] SUSE LLC +# +# All Rights Reserved. +# +# This program is free software; you can redistribute it and/or modify it +# under the terms of version 2 of the GNU General Public License as published +# by the Free Software Foundation. +# +# This program is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +# more details. +# +# You should have received a copy of the GNU General Public License along +# with this program; if not, contact SUSE LLC. +# +# To contact SUSE LLC about this file by physical or electronic mail, you may +# find current contact information at www.suse.com. + +require "yast" +require "cwm" + +module Installation + module Console + module Plugins + # define a CWM widget for starting proxy configuration + class NetworkButton < CWM::PushButton + def initialize + textdomain "network" + end + + def label + # TRANSLATORS: a button label, it starts the network configuration + _("Configure Network Devices...") + end + + def help + # TRANSLATORS: help text + _("<p>The <b>Configure Network Devices</b> button starts the network " \ + "configuration module. You can configure your network connection there.</p>") + end + + def handle + Yast::WFM.call("inst_lan", [{ "skip_detection" => true }]) + nil + end + end + + # define a console plugin + class NetworkButtonPlugin < MenuPlugin + def widget + NetworkButton.new + end + end + end + end +end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-network-4.3.50/src/lib/installation/console/plugins/proxy_button.rb new/yast2-network-4.3.54/src/lib/installation/console/plugins/proxy_button.rb --- old/yast2-network-4.3.50/src/lib/installation/console/plugins/proxy_button.rb 1970-01-01 01:00:00.000000000 +0100 +++ new/yast2-network-4.3.54/src/lib/installation/console/plugins/proxy_button.rb 2021-03-05 17:27:53.000000000 +0100 @@ -0,0 +1,57 @@ +# Copyright (c) [2021] SUSE LLC +# +# All Rights Reserved. +# +# This program is free software; you can redistribute it and/or modify it +# under the terms of version 2 of the GNU General Public License as published +# by the Free Software Foundation. +# +# This program is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +# more details. +# +# You should have received a copy of the GNU General Public License along +# with this program; if not, contact SUSE LLC. +# +# To contact SUSE LLC about this file by physical or electronic mail, you may +# find current contact information at www.suse.com. + +require "yast" +require "cwm" + +module Installation + module Console + module Plugins + # define a CWM widget for starting network configuration + class ProxyButton < CWM::PushButton + def initialize + textdomain "network" + end + + def label + # TRANSLATORS: a button label, it starts the proxy configuration + _("Configure Network Proxy...") + end + + def help + # TRANSLATORS: help text + _("<p>Use the <b>Configure Network Proxy</b> button if you need " \ + "a proxy for accessing the Internet servers.</p>") + end + + def handle + Yast::WFM.call("proxy") + nil + end + end + + # define a console plugin + class ProxyButtonPlugin < MenuPlugin + def widget + ProxyButton.new + end + end + end + end +end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-network-4.3.50/src/lib/y2network/autoinst_profile/interface_section.rb new/yast2-network-4.3.54/src/lib/y2network/autoinst_profile/interface_section.rb --- old/yast2-network-4.3.50/src/lib/y2network/autoinst_profile/interface_section.rb 2021-02-26 14:45:25.000000000 +0100 +++ new/yast2-network-4.3.54/src/lib/y2network/autoinst_profile/interface_section.rb 2021-03-05 17:27:53.000000000 +0100 @@ -278,7 +278,8 @@ # Overwrite base method to load also nested aliases def init_from_hashes(hash) - super + hash = rename_key(hash, "bridge_forwarddelay", "bridge_forward_delay") + super(hash) self.aliases = hash["aliases"] if hash["aliases"] end @@ -418,6 +419,23 @@ # peap version not supported yet # on other hand ap scan mode is not in autoyast end + + # Renames a key from the hash + # + # It returns a new hash with the key {old_name} renamed to {new_name}. The rename will + # not happen if the {to} key already exists. + # + # @param hash [Hash] + # @param old_name [String] Original key name + # @param new_name [String] New key name + # @return [Hash] + def rename_key(hash, old_name, new_name) + return hash if hash[new_name] || hash[old_name].nil? + + new_hash = hash.clone + new_hash[new_name] = new_hash.delete(old_name) + new_hash + end end end end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-network-4.3.50/src/lib/y2network/connection_config/base.rb new/yast2-network-4.3.54/src/lib/y2network/connection_config/base.rb --- old/yast2-network-4.3.50/src/lib/y2network/connection_config/base.rb 2021-02-26 14:45:25.000000000 +0100 +++ new/yast2-network-4.3.54/src/lib/y2network/connection_config/base.rb 2021-03-05 17:27:53.000000000 +0100 @@ -25,6 +25,8 @@ require "y2network/startmode" require "y2network/connection_config/ip_config" +Yast.import "Mode" + module Y2Network module ConnectionConfig # This class is reponsible of a connection configuration @@ -116,16 +118,15 @@ # defaults and propose have more tricky config that depends on env, product, etc. def propose propose_startmode - self.mtu = PROPOSED_PPPOE_MTU if Yast::Arch.s390 && (type.lcs? || type.ethernet?) + self.mtu = PROPOSED_PPPOE_MTU if Yast::Arch.s390 && type.lcs? end def propose_startmode Yast.import "ProductFeatures" - # see bsc#176804 - devicegraph = Y2Storage::StorageManager.instance.staging - if devicegraph.filesystem_in_network?("/") - @startmode = Startmode.create("nfsroot") + + if root_filesystem_in_network? log.info "startmode nfsroot" + @startmode = Startmode.create("nfsroot") return end @@ -245,6 +246,14 @@ false # TODO: interface is just string so interface.hardware.hotplug does not work end + + def root_filesystem_in_network? + return false unless Yast::Mode.normal + + # see bsc#176804 + devicegraph = Y2Storage::StorageManager.instance.staging + devicegraph.filesystem_in_network?("/") + end end end end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-network-4.3.50/src/lib/y2network/interface_config_builders/bonding.rb new/yast2-network-4.3.54/src/lib/y2network/interface_config_builders/bonding.rb --- old/yast2-network-4.3.50/src/lib/y2network/interface_config_builders/bonding.rb 2021-02-26 14:45:25.000000000 +0100 +++ new/yast2-network-4.3.54/src/lib/y2network/interface_config_builders/bonding.rb 2021-03-05 17:27:53.000000000 +0100 @@ -97,7 +97,7 @@ Yast.include self, "network/lan/s390.rb" # check if the device is L2 capable on s390 - if Yast::Arch.s390 + if Yast::Arch.s390 && !iface.type.ethernet? s390_config = s390_ReadQethConfig(iface.name) # only devices with L2 support can be enslaved in bond. See bnc#719881 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-network-4.3.50/test/network_button_test.rb new/yast2-network-4.3.54/test/network_button_test.rb --- old/yast2-network-4.3.50/test/network_button_test.rb 1970-01-01 01:00:00.000000000 +0100 +++ new/yast2-network-4.3.54/test/network_button_test.rb 2021-03-05 17:27:53.000000000 +0100 @@ -0,0 +1,40 @@ +# Copyright (c) [2021] SUSE LLC +# +# All Rights Reserved. +# +# This program is free software; you can redistribute it and/or modify it +# under the terms of version 2 of the GNU General Public License as published +# by the Free Software Foundation. +# +# This program is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +# more details. +# +# You should have received a copy of the GNU General Public License along +# with this program; if not, contact SUSE LLC. +# +# To contact SUSE LLC about this file by physical or electronic mail, you may +# find current contact information at www.suse.com. + +require_relative "test_helper" +require "installation/console/plugins/network_button" + +require "cwm/rspec" + +describe Installation::Console::Plugins::NetworkButton do + before do + allow(Yast::WFM).to receive(:call) + end + + include_examples "CWM::PushButton" +end + +describe Installation::Console::Plugins::NetworkButtonPlugin do + context "#widget" do + it "returns a CWM widget" do + w = subject.widget + expect(w).to be_a(CWM::AbstractWidget) + end + end +end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-network-4.3.50/test/proxy_button_test.rb new/yast2-network-4.3.54/test/proxy_button_test.rb --- old/yast2-network-4.3.50/test/proxy_button_test.rb 1970-01-01 01:00:00.000000000 +0100 +++ new/yast2-network-4.3.54/test/proxy_button_test.rb 2021-03-05 17:27:53.000000000 +0100 @@ -0,0 +1,39 @@ +# Copyright (c) [2021] SUSE LLC +# +# All Rights Reserved. +# +# This program is free software; you can redistribute it and/or modify it +# under the terms of version 2 of the GNU General Public License as published +# by the Free Software Foundation. +# +# This program is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +# more details. +# +# You should have received a copy of the GNU General Public License along +# with this program; if not, contact SUSE LLC. +# +# To contact SUSE LLC about this file by physical or electronic mail, you may +# find current contact information at www.suse.com. +require_relative "test_helper" +require "installation/console/plugins/proxy_button" + +require "cwm/rspec" + +describe Installation::Console::Plugins::ProxyButton do + before do + allow(Yast::WFM).to receive(:call) + end + + include_examples "CWM::PushButton" +end + +describe Installation::Console::Plugins::ProxyButtonPlugin do + context "#widget" do + it "returns a CWM widget" do + w = subject.widget + expect(w).to be_a(CWM::AbstractWidget) + end + end +end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-network-4.3.50/test/support/connection_config_examples.rb new/yast2-network-4.3.54/test/support/connection_config_examples.rb --- old/yast2-network-4.3.50/test/support/connection_config_examples.rb 1970-01-01 01:00:00.000000000 +0100 +++ new/yast2-network-4.3.54/test/support/connection_config_examples.rb 2021-03-05 17:27:53.000000000 +0100 @@ -0,0 +1,59 @@ +# Copyright (c) [2021] SUSE LLC +# +# All Rights Reserved. +# +# This program is free software; you can redistribute it and/or modify it +# under the terms of version 2 of the GNU General Public License as published +# by the Free Software Foundation. +# +# This program is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +# more details. +# +# You should have received a copy of the GNU General Public License along +# with this program; if not, contact SUSE LLC. +# +# To contact SUSE LLC about this file by physical or electronic mail, you may +# find current contact information at www.suse.com. + +RSpec.shared_examples "connection configuration" do + describe "#propose" do + context "startmode" do + let(:normal?) { true } + let(:root_in_network?) { false } + + let(:storage_manager) do + instance_double(Y2Storage::StorageManager, staging: devicegraph) + end + + let(:devicegraph) { instance_double(Y2Storage::Devicegraph) } + + before do + allow(Yast::Mode).to receive(:normal).and_return(normal?) + allow(Y2Storage::StorageManager).to receive(:instance) + .and_return(storage_manager) + allow(devicegraph).to receive(:filesystem_in_network?).with("/") + .and_return(root_in_network?) + end + + context "when root filesystem is on a network device" do + let(:root_in_network?) { true } + + it "is set to 'nfsroot'" do + subject.propose + expect(subject.startmode.to_s).to eq("nfsroot") + end + end + + context "when running on installation" do + let(:normal?) { false } + + it "does not check whether the root filesystem is on a network device" do + expect(storage_manager).to_not receive(:staging) + subject.propose + end + end + end + end +end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-network-4.3.50/test/test_helper.rb new/yast2-network-4.3.54/test/test_helper.rb --- old/yast2-network-4.3.50/test/test_helper.rb 2021-02-26 14:45:25.000000000 +0100 +++ new/yast2-network-4.3.54/test/test_helper.rb 2021-03-05 17:27:53.000000000 +0100 @@ -125,3 +125,13 @@ section_hash[key] = value end end + +# mock empty class to avoid build dependency on yast2-installation +module Installation + module Console + module Plugins + class MenuPlugin + end + end + end +end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-network-4.3.50/test/y2network/autoinst_profile/interface_section_test.rb new/yast2-network-4.3.54/test/y2network/autoinst_profile/interface_section_test.rb --- old/yast2-network-4.3.50/test/y2network/autoinst_profile/interface_section_test.rb 2021-02-26 14:45:25.000000000 +0100 +++ new/yast2-network-4.3.54/test/y2network/autoinst_profile/interface_section_test.rb 2021-03-05 17:27:53.000000000 +0100 @@ -89,6 +89,37 @@ section = described_class.new_from_hashes(hash, parent) expect(section.parent).to eq(parent) end + + context "when bridge_forwarddelay is set" do + let(:hash) do + { + "bootproto" => "dhcp4", + "device" => "br0", + "bridge_forwarddelay" => "4" + } + end + + it "sets bridge_forward_delay to the given value" do + section = described_class.new_from_hashes(hash) + expect(section.bridge_forward_delay).to eq("4") + end + end + + context "when bridge_forwarddelay and bridge_forward_delay are both set" do + let(:hash) do + { + "bootproto" => "dhcp4", + "device" => "br0", + "bridge_forwarddelay" => "4", + "bridge_forward_delay" => "5" + } + end + + it "bridge_forward_delay takes precedence" do + section = described_class.new_from_hashes(hash) + expect(section.bridge_forward_delay).to eq("5") + end + end end describe "#to_hashes" do diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-network-4.3.50/test/y2network/connection_config/bonding_test.rb new/yast2-network-4.3.54/test/y2network/connection_config/bonding_test.rb --- old/yast2-network-4.3.50/test/y2network/connection_config/bonding_test.rb 2021-02-26 14:45:25.000000000 +0100 +++ new/yast2-network-4.3.54/test/y2network/connection_config/bonding_test.rb 2021-03-05 17:27:53.000000000 +0100 @@ -18,6 +18,7 @@ # find current contact information at www.suse.com. require_relative "../../test_helper" +require_relative "../../support/connection_config_examples" require "y2network/connection_config/bonding" require "y2network/interface_type" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-network-4.3.50/test/y2network/connection_config/ctc_test.rb new/yast2-network-4.3.54/test/y2network/connection_config/ctc_test.rb --- old/yast2-network-4.3.50/test/y2network/connection_config/ctc_test.rb 2021-02-26 14:45:25.000000000 +0100 +++ new/yast2-network-4.3.54/test/y2network/connection_config/ctc_test.rb 2021-03-05 17:27:53.000000000 +0100 @@ -18,10 +18,13 @@ # find current contact information at www.suse.com. require_relative "../../test_helper" +require_relative "../../support/connection_config_examples" require "y2network/connection_config/ctc" require "y2network/interface_type" describe Y2Network::ConnectionConfig::Ctc do + include_examples "connection configuration" + describe "#type" do it "returns 'ctc'" do expect(subject.type).to eq(Y2Network::InterfaceType::CTC) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-network-4.3.50/test/y2network/connection_config/dummy_test.rb new/yast2-network-4.3.54/test/y2network/connection_config/dummy_test.rb --- old/yast2-network-4.3.50/test/y2network/connection_config/dummy_test.rb 2021-02-26 14:45:25.000000000 +0100 +++ new/yast2-network-4.3.54/test/y2network/connection_config/dummy_test.rb 2021-03-05 17:27:53.000000000 +0100 @@ -18,12 +18,15 @@ # find current contact information at www.suse.com. require_relative "../../test_helper" +require_relative "../../support/connection_config_examples" require "y2network/connection_config/dummy" require "y2network/interface_type" describe Y2Network::ConnectionConfig::Dummy do subject(:config) { described_class.new } + include_examples "connection configuration" + describe "#type" do it "returns 'dummy'" do expect(config.type).to eq(Y2Network::InterfaceType::DUMMY) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-network-4.3.50/test/y2network/connection_config/ethernet_test.rb new/yast2-network-4.3.54/test/y2network/connection_config/ethernet_test.rb --- old/yast2-network-4.3.50/test/y2network/connection_config/ethernet_test.rb 2021-02-26 14:45:25.000000000 +0100 +++ new/yast2-network-4.3.54/test/y2network/connection_config/ethernet_test.rb 2021-03-05 17:27:53.000000000 +0100 @@ -18,12 +18,15 @@ # find current contact information at www.suse.com. require_relative "../../test_helper" +require_relative "../../support/connection_config_examples" require "y2network/connection_config/ethernet" require "y2network/interface_type" describe Y2Network::ConnectionConfig::Ethernet do subject(:config) { described_class.new } + include_examples "connection configuration" + describe "#type" do it "returns 'ethernet'" do expect(config.type).to eq(Y2Network::InterfaceType::ETHERNET) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-network-4.3.50/test/y2network/connection_config/hsi_test.rb new/yast2-network-4.3.54/test/y2network/connection_config/hsi_test.rb --- old/yast2-network-4.3.50/test/y2network/connection_config/hsi_test.rb 2021-02-26 14:45:25.000000000 +0100 +++ new/yast2-network-4.3.54/test/y2network/connection_config/hsi_test.rb 2021-03-05 17:27:53.000000000 +0100 @@ -18,10 +18,14 @@ # find current contact information at www.suse.com. require_relative "../../test_helper" +require_relative "../../support/connection_config_examples" require "y2network/connection_config/hsi" require "y2network/interface_type" describe Y2Network::ConnectionConfig::Hsi do + + include_examples "connection configuration" + describe "#type" do it "returns 'hsi'" do expect(subject.type).to eq(Y2Network::InterfaceType::HSI) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-network-4.3.50/test/y2network/connection_config/lcs_test.rb new/yast2-network-4.3.54/test/y2network/connection_config/lcs_test.rb --- old/yast2-network-4.3.50/test/y2network/connection_config/lcs_test.rb 2021-02-26 14:45:25.000000000 +0100 +++ new/yast2-network-4.3.54/test/y2network/connection_config/lcs_test.rb 2021-03-05 17:27:53.000000000 +0100 @@ -18,10 +18,14 @@ # find current contact information at www.suse.com. require_relative "../../test_helper" +require_relative "../../support/connection_config_examples" require "y2network/connection_config/lcs" require "y2network/interface_type" describe Y2Network::ConnectionConfig::Lcs do + + include_examples "connection configuration" + describe "#type" do it "returns 'lcs'" do expect(subject.type).to eq(Y2Network::InterfaceType::LCS) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-network-4.3.50/test/y2network/connection_config/qeth_test.rb new/yast2-network-4.3.54/test/y2network/connection_config/qeth_test.rb --- old/yast2-network-4.3.50/test/y2network/connection_config/qeth_test.rb 2021-02-26 14:45:25.000000000 +0100 +++ new/yast2-network-4.3.54/test/y2network/connection_config/qeth_test.rb 2021-03-05 17:27:53.000000000 +0100 @@ -18,10 +18,14 @@ # find current contact information at www.suse.com. require_relative "../../test_helper" +require_relative "../../support/connection_config_examples" require "y2network/connection_config/qeth" require "y2network/interface_type" describe Y2Network::ConnectionConfig::Qeth do + + include_examples "connection configuration" + describe "#type" do it "returns 'qeth'" do expect(subject.type).to eq(Y2Network::InterfaceType::QETH) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-network-4.3.50/test/y2network/connection_config/tap_test.rb new/yast2-network-4.3.54/test/y2network/connection_config/tap_test.rb --- old/yast2-network-4.3.50/test/y2network/connection_config/tap_test.rb 2021-02-26 14:45:25.000000000 +0100 +++ new/yast2-network-4.3.54/test/y2network/connection_config/tap_test.rb 2021-03-05 17:27:53.000000000 +0100 @@ -18,12 +18,15 @@ # find current contact information at www.suse.com. require_relative "../../test_helper" +require_relative "../../support/connection_config_examples" require "y2network/connection_config/tap" require "y2network/interface_type" describe Y2Network::ConnectionConfig::Tap do subject(:config) { described_class.new } + include_examples "connection configuration" + describe "#type" do it "returns 'tap'" do expect(config.type).to eq(Y2Network::InterfaceType::TAP) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-network-4.3.50/test/y2network/connection_config/tun_test.rb new/yast2-network-4.3.54/test/y2network/connection_config/tun_test.rb --- old/yast2-network-4.3.50/test/y2network/connection_config/tun_test.rb 2021-02-26 14:45:25.000000000 +0100 +++ new/yast2-network-4.3.54/test/y2network/connection_config/tun_test.rb 2021-03-05 17:27:53.000000000 +0100 @@ -18,12 +18,15 @@ # find current contact information at www.suse.com. require_relative "../../test_helper" +require_relative "../../support/connection_config_examples" require "y2network/connection_config/tun" require "y2network/interface_type" describe Y2Network::ConnectionConfig::Tun do subject(:config) { described_class.new } + include_examples "connection configuration" + describe "#type" do it "returns 'tun'" do expect(config.type).to eq(Y2Network::InterfaceType::TUN) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-network-4.3.50/test/y2network/connection_config/usb_test.rb new/yast2-network-4.3.54/test/y2network/connection_config/usb_test.rb --- old/yast2-network-4.3.50/test/y2network/connection_config/usb_test.rb 2021-02-26 14:45:25.000000000 +0100 +++ new/yast2-network-4.3.54/test/y2network/connection_config/usb_test.rb 2021-03-05 17:27:53.000000000 +0100 @@ -18,12 +18,15 @@ # find current contact information at www.suse.com. require_relative "../../test_helper" +require_relative "../../support/connection_config_examples" require "y2network/connection_config/usb" require "y2network/interface_type" describe Y2Network::ConnectionConfig::Usb do subject(:config) { described_class.new } + include_examples "connection configuration" + describe "#type" do it "returns 'usb'" do expect(config.type).to eq(Y2Network::InterfaceType::USB) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-network-4.3.50/test/y2network/connection_config/vlan_test.rb new/yast2-network-4.3.54/test/y2network/connection_config/vlan_test.rb --- old/yast2-network-4.3.50/test/y2network/connection_config/vlan_test.rb 2021-02-26 14:45:25.000000000 +0100 +++ new/yast2-network-4.3.54/test/y2network/connection_config/vlan_test.rb 2021-03-05 17:27:53.000000000 +0100 @@ -18,12 +18,15 @@ # find current contact information at www.suse.com. require_relative "../../test_helper" +require_relative "../../support/connection_config_examples" require "y2network/connection_config/vlan" require "y2network/interface_type" describe Y2Network::ConnectionConfig::Vlan do subject(:config) { described_class.new } + include_examples "connection configuration" + describe "#type" do it "returns 'vlan'" do expect(config.type).to eq(Y2Network::InterfaceType::VLAN) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-network-4.3.50/test/y2network/connection_config/wireless_test.rb new/yast2-network-4.3.54/test/y2network/connection_config/wireless_test.rb --- old/yast2-network-4.3.50/test/y2network/connection_config/wireless_test.rb 2021-02-26 14:45:25.000000000 +0100 +++ new/yast2-network-4.3.54/test/y2network/connection_config/wireless_test.rb 2021-03-05 17:27:53.000000000 +0100 @@ -18,12 +18,15 @@ # find current contact information at www.suse.com. require_relative "../../test_helper" +require_relative "../../support/connection_config_examples" require "y2network/connection_config/wireless" require "y2network/interface_type" describe Y2Network::ConnectionConfig::Wireless do subject(:config) { described_class.new } + include_examples "connection configuration" + describe "#type" do it "returns 'wireless'" do expect(config.type).to eq(Y2Network::InterfaceType::WIRELESS) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-network-4.3.50/test/y2network/interface_config_builders/bonding_test.rb new/yast2-network-4.3.54/test/y2network/interface_config_builders/bonding_test.rb --- old/yast2-network-4.3.50/test/y2network/interface_config_builders/bonding_test.rb 2021-02-26 14:45:25.000000000 +0100 +++ new/yast2-network-4.3.54/test/y2network/interface_config_builders/bonding_test.rb 2021-03-05 17:27:53.000000000 +0100 @@ -72,7 +72,7 @@ describe "#bondable_interfaces" do shared_examples "interface filters" do - context "when an interface does not have a connection config yet" do + context "and the interface does not have a connection config yet" do let(:connection_name) { "iface2" } # only iface2 has a config it "includes the interface without a connection config" do @@ -80,7 +80,7 @@ end end - context "when an interface has a connection config" do + context "and the interface has a connection config" do let(:connection_name) { "iface1" } context "and there already is a master connection" do @@ -109,6 +109,8 @@ context "when the architecture is s390" do let(:s390) { true } + let(:interface1) { Y2Network::Interface.new("iface1", type: Y2Network::InterfaceType::QETH) } + let(:interface2) { Y2Network::Interface.new("iface2", type: Y2Network::InterfaceType::QETH) } before do allow(Yast::FileUtils).to receive(:IsDirectory).and_return(true) @@ -133,7 +135,7 @@ end end - context "when the architecture is not s390" do + context "when the architecture is not s390 or the interface is an ethernet one" do let(:s390) { false } include_examples "interface filters"