Skip to content

Commit

Permalink
Updated testsuite - removed tests for dropped methods
Browse files Browse the repository at this point in the history
  • Loading branch information
mchf committed Sep 19, 2018
1 parent d6825a0 commit f31ddf9
Showing 1 changed file with 0 additions and 63 deletions.
63 changes: 0 additions & 63 deletions library/network/test/network_interfaces_helpers_test.rb
Expand Up @@ -6,69 +6,6 @@

module Yast
describe NetworkInterfaces do
context "Parsing device name" do
DEVICE_DESCS = [
{
name: "",
alias_id: "",
type_by_regex: ""
},
{
name: "eth0",
alias_id: "",
type_by_regex: "eth"
},
{
name: "eth-pcmcia-0",
alias_id: "",
type_by_regex: "eth"
},
{
name: "tr-pcmcia-1#0",
alias_id: "0",
type_by_regex: "tr"
},
{
name: "enp0s3",
alias_id: "",
type_by_regex: "enp"
},
{
name: "eth0#1",
alias_id: "1",
type_by_regex: "eth"
},
{
name: "enp0s3#0",
alias_id: "0",
type_by_regex: "enp"
},
{
name: "eth-id-00:07:e9:d5:8e:e8",
alias_id: "",
type_by_regex: "eth"
}
].freeze

DEVICE_DESCS.each do |device_desc|
device_name = device_desc[:name]
alias_id = device_desc[:alias_id]
type_by_regex = device_desc[:type_by_regex]

describe "#alias_num" do
it "returns alias_id: <#{alias_id}> for name: <#{device_name}>" do
expect(NetworkInterfaces.alias_num(device_name)).to be_eql alias_id
end
end

describe "#device_type" do
it "returns type by regex: <#{type_by_regex}> for name: <#{device_name}>" do
expect(NetworkInterfaces.device_type(device_name)).to be_eql type_by_regex
end
end
end
end

describe "NetworkInterfaces#filter_interfacetype" do
it "drops interface type if present and not set to \"lo\" or \"dummy\"" do
devmap = { "INTERFACETYPE" => "eth" }
Expand Down

0 comments on commit f31ddf9

Please sign in to comment.