Skip to content

Commit

Permalink
Merge pull request #448 from yast/fix_autoyast_config_crash
Browse files Browse the repository at this point in the history
Fix autoyast config crash
  • Loading branch information
jreidinger committed Oct 10, 2019
2 parents e25b04d + 544a2f2 commit 63e6791
Show file tree
Hide file tree
Showing 4 changed files with 50 additions and 1 deletion.
6 changes: 6 additions & 0 deletions package/yast2-registration.changes
@@ -1,3 +1,9 @@
-------------------------------------------------------------------
Thu Oct 10 13:39:18 UTC 2019 - Josef Reidinger <jreidinger@suse.com>

- fix crash of autoyast config dialog (bsc#1152913)
- 3.2.19

-------------------------------------------------------------------
Mon Feb 18 13:11:12 UTC 2019 - lslezak@suse.cz

Expand Down
2 changes: 1 addition & 1 deletion package/yast2-registration.spec
Expand Up @@ -17,7 +17,7 @@


Name: yast2-registration
Version: 3.2.18
Version: 3.2.19
Release: 0

BuildRoot: %{_tmppath}/%{name}-%{version}-build
Expand Down
2 changes: 2 additions & 0 deletions src/lib/registration/ui/autoyast_addon_dialog.rb
Expand Up @@ -92,6 +92,8 @@ def refresh_buttons
# the main event loop
# @return [Symbol] the user input
def handle_dialog
ret = nil

loop do
refresh_buttons

Expand Down
41 changes: 41 additions & 0 deletions test/registration/ui/autoyast_addon_dialog_rest.rb
@@ -0,0 +1,41 @@
#!/usr/bin/env rspec
# ------------------------------------------------------------------------------
# Copyright (c) 2019 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.
# ------------------------------------------------------------------------------

require_relative "../../spec_helper"
require "registration/ui/autoyast_addon_dialog"

describe Registration::UI::AutoyastAddonDialog do
subject(:dialog) { described_class.new(addons) }

let(:addons) { [addon] }

let(:addon) do
{
"name" => "free_cool_in_addon",
"version" => "666",
"arch" => "s390x",
"release_type" => nil,
"reg_code" => "hell_driven_delevopment"
}
end

describe "#run" do
before do
allow(Yast::UI).to receive(:UserInput).and_return(:next)
end

it "does not crash" do
expect { dialog.run }.to_not raise_error
end
end
end

0 comments on commit 63e6791

Please sign in to comment.