Skip to content

Commit

Permalink
Merge e1d17c5 into c6dc531
Browse files Browse the repository at this point in the history
  • Loading branch information
jreidinger committed Jan 2, 2022
2 parents c6dc531 + e1d17c5 commit 29b8940
Show file tree
Hide file tree
Showing 19 changed files with 13 additions and 140 deletions.
6 changes: 6 additions & 0 deletions package/yast2-registration.changes
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
-------------------------------------------------------------------
Fri Dec 31 16:11:06 UTC 2021 - Josef Reidinger <jreidinger@suse.com>

- Adapt to ruby3.1 (bsc#1193192)
- 4.4.10

-------------------------------------------------------------------
Tue Dec 21 09:40:12 UTC 2021 - Josef Reidinger <jreidinger@suse.com>

Expand Down
2 changes: 1 addition & 1 deletion package/yast2-registration.spec
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@


Name: yast2-registration
Version: 4.4.9
Version: 4.4.10
Release: 0
Summary: YaST2 - Registration Module
License: GPL-2.0-only
Expand Down
8 changes: 0 additions & 8 deletions test/addon_selection_dialog_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -113,10 +113,6 @@
end

it "works in textmode" do
if RUBY_VERSION.start_with?("3.0.")
pending "YaML loading of older OpenStruct is broken in ruby 3.0"
end

allow(Yast::UI).to receive(:TextMode).and_return(true)
addons = load_yaml_fixture("sle15_addons.yaml")
allow(Registration::Addon).to receive(:find_all).and_return(addons)
Expand All @@ -130,10 +126,6 @@
end

it "recomputes auto_selection after each widget change" do
if RUBY_VERSION.start_with?("3.0.")
pending "YaML loading of older OpenStruct is broken in ruby 3.0"
end

addons = load_yaml_fixture("sle15_addons.yaml")
allow(Registration::Addon).to receive(:find_all).and_return(addons)

Expand Down
8 changes: 0 additions & 8 deletions test/addon_sorter_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,6 @@
let(:unknown_addons) { load_yaml_fixture("available_unknown_addons.yml") }

it "sorts the addons in display order" do
if RUBY_VERSION.start_with?("3.0.")
pending "YaML loading of older OpenStruct is broken in ruby 3.0"
end

expected = [
"SUSE Cloud for SLE 12 Compute Nodes 5 x86_64",
"SUSE Enterprise Storage 1 x86_64",
Expand All @@ -33,10 +29,6 @@
end

it "moves the unknown product types at the end" do
if RUBY_VERSION.start_with?("3.0.")
pending "YaML loading of older OpenStruct is broken in ruby 3.0"
end

# AdvMgmt and Legacy have undefined type => at the end
expected = [
"sle-sdk", "sle-we", "sle-module-public-cloud",
Expand Down
16 changes: 0 additions & 16 deletions test/addon_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,6 @@
end

it "sets the registration status for dependent addons" do
if RUBY_VERSION.start_with?("3.0.")
pending "YaML loading of older OpenStruct is broken in ruby 3.0"
end

registration = double(
activated_products: load_yaml_fixture("activated_products.yml"),
get_addon_list: load_yaml_fixture("pure_addons.yml")
Expand All @@ -92,10 +88,6 @@
end

it "returns the addon witht the given ID" do
if RUBY_VERSION.start_with?("3.0.")
pending "YaML loading of older OpenStruct is broken in ruby 3.0"
end

addon = described_class.find_by_id(1222)
expect(addon.identifier).to eq("sle-we")
end
Expand All @@ -118,10 +110,6 @@

describe ".registration_order" do
it "returns addons sorted in the registration order" do
if RUBY_VERSION.start_with?("3.0.")
pending "YaML loading of older OpenStruct is broken in ruby 3.0"
end

addons = load_yaml_fixture("sle15_addons.yaml")
sorted_addons = Registration::Addon.registration_order(addons)
expected_output = [
Expand Down Expand Up @@ -406,10 +394,6 @@
end

it "returns all addon dependencies" do
if RUBY_VERSION.start_with?("3.0.")
pending "YaML loading of older OpenStruct is broken in ruby 3.0"
end

expect(addon.dependencies.map(&:identifier)).to eq(["sle-ha"])
end
end
Expand Down
16 changes: 0 additions & 16 deletions test/autoyast_addons_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -52,21 +52,13 @@

describe "#select" do
it "sorts the addons according to their dependencies" do
if RUBY_VERSION.start_with?("3.0.")
pending "YaML loading of older OpenStruct is broken in ruby 3.0"
end

ayaddons = Registration::AutoyastAddons.new(unsorted_addons, registration)
ayaddons.select

expect(ayaddons.selected_addons.map(&:identifier)).to eq(expected_registration_order)
end

it "automatically selects the dependent addons" do
if RUBY_VERSION.start_with?("3.0.")
pending "YaML loading of older OpenStruct is broken in ruby 3.0"
end

ayaddons = Registration::AutoyastAddons.new(incomplete_addons, registration)
ayaddons.select

Expand All @@ -81,10 +73,6 @@
end

it "selects the newest available addon" do
if RUBY_VERSION.start_with?("3.0.")
pending "YaML loading of older OpenStruct is broken in ruby 3.0"
end

expect(Yast::Arch).to receive(:architecture).twice.and_return("x86_64")
ayaddons = Registration::AutoyastAddons.new(addons_only_name, registration)
ayaddons.select
Expand All @@ -97,10 +85,6 @@

describe "#register" do
it "registers the selected addons" do
if RUBY_VERSION.start_with?("3.0.")
pending "YaML loading of older OpenStruct is broken in ruby 3.0"
end

expect(registration).to receive(:register_product).with(
"name" => "sle-module-basesystem", "reg_code" => nil, "arch" => "x86_64",
"version" => "15"
Expand Down
12 changes: 0 additions & 12 deletions test/fixtures/activated_products.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
url: https://nu.novell.com/SUSE:/Updates:/SLE-HA-GEO:/12:/x86_64/standard
enabled: true
autorefresh: true
modifiable: true
- !ruby/object:OpenStruct
table:
:id: 1245
Expand Down Expand Up @@ -88,7 +87,6 @@
url: https://nu.novell.com/SUSE:/Updates:/SLE-HA-GEO:/12:/x86_64/standard
enabled: true
autorefresh: true
modifiable: true
:repositories:
- id: 1500
name: SLE-HA12-Pool
Expand All @@ -104,7 +102,6 @@
url: https://nu.novell.com/SUSE:/Updates:/SLE-HA:/12:/x86_64/standard
enabled: true
autorefresh: true
modifiable: true
- !ruby/object:OpenStruct
table:
:id: 1117
Expand Down Expand Up @@ -188,7 +185,6 @@
url: https://nu.novell.com/SUSE:/Updates:/SLE-WE:/12:/x86_64/standard
enabled: true
autorefresh: true
modifiable: true
- !ruby/object:OpenStruct
table:
:id: 1223
Expand Down Expand Up @@ -232,7 +228,6 @@
url: https://nu.novell.com/SUSE:/Updates:/SLE-SDK:/12:/x86_64/standard
enabled: true
autorefresh: true
modifiable: true
- !ruby/object:OpenStruct
table:
:id: 1150
Expand Down Expand Up @@ -275,7 +270,6 @@
url: https://nu.novell.com/SUSE:/Updates:/SLE-Module-Legacy:/12:/x86_64/standard
enabled: true
autorefresh: true
modifiable: true
- !ruby/object:OpenStruct
table:
:id: 1153
Expand Down Expand Up @@ -319,7 +313,6 @@
url: https://nu.novell.com/SUSE:/Updates:/SLE-Module-Web-Scripting:/12:/x86_64/standard
enabled: true
autorefresh: true
modifiable: true
- !ruby/object:OpenStruct
table:
:id: 1220
Expand Down Expand Up @@ -361,7 +354,6 @@
url: https://nu.novell.com/SUSE:/Updates:/SLE-Module-Public-Cloud:/12:/x86_64/standard
enabled: true
autorefresh: true
modifiable: true
- !ruby/object:OpenStruct
table:
:id: 1212
Expand Down Expand Up @@ -401,7 +393,6 @@
url: https://nu.novell.com/SUSE:/Updates:/SLE-Module-Adv-Systems-Management:/12:/x86_64/standard
enabled: true
autorefresh: true
modifiable: true
- !ruby/object:OpenStruct
table:
:id: 1245
Expand Down Expand Up @@ -457,7 +448,6 @@
url: https://nu.novell.com/SUSE:/Updates:/SLE-HA-GEO:/12:/x86_64/standard
enabled: true
autorefresh: true
modifiable: true
:repositories:
- id: 1500
name: SLE-HA12-Pool
Expand All @@ -473,7 +463,6 @@
url: https://nu.novell.com/SUSE:/Updates:/SLE-HA:/12:/x86_64/standard
enabled: true
autorefresh: true
modifiable: true
:repositories:
- id: 1537
name: SLES12-Debuginfo-Pool
Expand Down Expand Up @@ -503,4 +492,3 @@
url: https://nu.novell.com/SUSE:/Updates:/SLE-SERVER:/12:/x86_64/standard
enabled: true
autorefresh: true
modifiable: true
1 change: 0 additions & 1 deletion test/fixtures/available_addons.yml
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,6 @@
:successor_ids:
- 1337
:extensions: []
modifiable: true
children:
- &3 !ruby/object:Registration::Addon
pure_addon: *1
Expand Down
6 changes: 0 additions & 6 deletions test/fixtures/available_unknown_addons.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@
autorefresh: true
:product_type: module
:extensions: []
modifiable: true
children: []
- !ruby/object:Registration::Addon
pure_addon: !ruby/object:OpenStruct
Expand Down Expand Up @@ -81,7 +80,6 @@
autorefresh: true
:product_type: ''
:extensions: []
modifiable: true
children: []
- !ruby/object:Registration::Addon
pure_addon: !ruby/object:OpenStruct
Expand Down Expand Up @@ -125,7 +123,6 @@
autorefresh: true
:product_type: extension
:extensions: []
modifiable: true
children: []
- !ruby/object:Registration::Addon
pure_addon: !ruby/object:OpenStruct
Expand Down Expand Up @@ -168,7 +165,6 @@
autorefresh: true
:product_type:
:extensions: []
modifiable: true
children: []
- !ruby/object:Registration::Addon
pure_addon: !ruby/object:OpenStruct
Expand Down Expand Up @@ -210,7 +206,6 @@
autorefresh: true
:product_type: module
:extensions: []
modifiable: true
children: []
- !ruby/object:Registration::Addon
pure_addon: !ruby/object:OpenStruct
Expand Down Expand Up @@ -271,5 +266,4 @@
autorefresh: true
:product_type: extension
:extensions: []
modifiable: true
children: []
2 changes: 0 additions & 2 deletions test/fixtures/legacy_module_services.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,5 +37,3 @@
url: https://nu.novell.com/SUSE:/Products:/SLE-12/images/repo/SLE-12-module-legacy-POOL-x86_64-Media1
enabled: true
autorefresh: false
modifiable: true
modifiable: true
4 changes: 0 additions & 4 deletions test/fixtures/migration_service.yml
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,6 @@ table:
autorefresh: false
:product_type: extension
:extensions: []
modifiable: true
- !ruby/object:OpenStruct
table:
:id: 1324
Expand Down Expand Up @@ -156,6 +155,3 @@ table:
autorefresh: false
:product_type: extension
:extensions: []
modifiable: true
modifiable: true
modifiable: true

0 comments on commit 29b8940

Please sign in to comment.