Hello community,
here is the log from the commit of package yast2-registration for
openSUSE:Factory checked in at 2018-11-10 16:48:43
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/yast2-registration (Old)
and /work/SRC/openSUSE:Factory/.yast2-registration.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "yast2-registration"
Sat Nov 10 16:48:43 2018 rev:24 rq:646689 version:4.1.6
Changes:
--------
--- /work/SRC/openSUSE:Factory/yast2-registration/yast2-registration.changes
2018-11-01 18:57:22.529979362 +0100
+++
/work/SRC/openSUSE:Factory/.yast2-registration.new/yast2-registration.changes
2018-11-10 16:48:50.524533901 +0100
@@ -1,0 +2,8 @@
+Tue Nov 6 13:56:48 UTC 2018 - [email protected]
+
+- Do not display a connection error when automatically trying to
+ use the base product registration code for the extensions
+ (bsc#1091825).
+- 4.1.6
+
+-------------------------------------------------------------------
Old:
----
yast2-registration-4.1.5.tar.bz2
New:
----
yast2-registration-4.1.6.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ yast2-registration.spec ++++++
--- /var/tmp/diff_new_pack.86xLFR/_old 2018-11-10 16:48:51.800532284 +0100
+++ /var/tmp/diff_new_pack.86xLFR/_new 2018-11-10 16:48:51.800532284 +0100
@@ -17,7 +17,7 @@
Name: yast2-registration
-Version: 4.1.5
+Version: 4.1.6
Release: 0
BuildRoot: %{_tmppath}/%{name}-%{version}-build
++++++ yast2-registration-4.1.5.tar.bz2 -> yast2-registration-4.1.6.tar.bz2
++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/yast2-registration-4.1.5/package/yast2-registration.changes
new/yast2-registration-4.1.6/package/yast2-registration.changes
--- old/yast2-registration-4.1.5/package/yast2-registration.changes
2018-10-16 17:43:09.000000000 +0200
+++ new/yast2-registration-4.1.6/package/yast2-registration.changes
2018-11-06 16:14:40.000000000 +0100
@@ -1,4 +1,12 @@
-------------------------------------------------------------------
+Tue Nov 6 13:56:48 UTC 2018 - [email protected]
+
+- Do not display a connection error when automatically trying to
+ use the base product registration code for the extensions
+ (bsc#1091825).
+- 4.1.6
+
+-------------------------------------------------------------------
Tue Oct 16 15:35:43 CEST 2018 - [email protected]
- Added license file to spec.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/yast2-registration-4.1.5/package/yast2-registration.spec
new/yast2-registration-4.1.6/package/yast2-registration.spec
--- old/yast2-registration-4.1.5/package/yast2-registration.spec
2018-10-16 17:43:09.000000000 +0200
+++ new/yast2-registration-4.1.6/package/yast2-registration.spec
2018-11-06 16:14:40.000000000 +0100
@@ -17,7 +17,7 @@
Name: yast2-registration
-Version: 4.1.5
+Version: 4.1.6
Release: 0
BuildRoot: %{_tmppath}/%{name}-%{version}-build
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/yast2-registration-4.1.5/src/lib/registration/connect_helpers.rb
new/yast2-registration-4.1.6/src/lib/registration/connect_helpers.rb
--- old/yast2-registration-4.1.5/src/lib/registration/connect_helpers.rb
2018-10-16 17:43:09.000000000 +0200
+++ new/yast2-registration-4.1.6/src/lib/registration/connect_helpers.rb
2018-11-06 16:14:40.000000000 +0100
@@ -103,9 +103,8 @@
check_smt_api(error_msg)
report_error(message_prefix + _("Connection to registration server
failed."), error_msg)
when 422
- if silent_reg_code_mismatch && e.response.body["error"] =~
- /does not include the requested product/
- log.info "Reg code does not work for this product, that's OK"
+ if silent_reg_code_mismatch
+ log.info "Reg code does not work for this product."
else
# Error popup
report_error(message_prefix + _("Connection to registration server
failed."), error_msg)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/yast2-registration-4.1.5/test/connect_helpers_spec.rb
new/yast2-registration-4.1.6/test/connect_helpers_spec.rb
--- old/yast2-registration-4.1.5/test/connect_helpers_spec.rb 2018-10-16
17:43:09.000000000 +0200
+++ new/yast2-registration-4.1.6/test/connect_helpers_spec.rb 2018-11-06
16:14:40.000000000 +0100
@@ -113,29 +113,49 @@
include_examples "old registration server",
JSON::ParserError.new("error message")
end
- context "error 404 is received" do
- include_examples "old registration server", api_error(code: 404)
- end
+ [400, 401, 500, 42].each do |error_code|
+ exception = api_error(code: error_code)
- [400, 401, 422, 500, 42].each do |error_code|
context "error #{error_code} is received" do
- include_examples "reports error and returns false", api_error(code:
error_code)
+ include_examples "reports error and returns false", exception
+
+ it "logs the exception" do
+ expect(helpers.log).to
receive(:error).with(/#{exception.response.inspect}/)
+
+ helpers.catch_registration_errors { raise exception }
+ end
end
end
- context "'silent_reg_code_mismatch' parameter is set and a mismatch error
occurs" do
- before do
- allow(Registration::UrlHelpers).to receive(:registration_url)
- .and_return(SUSE::Connect::YaST::DEFAULT_URL)
+ context "error 404 is received" do
+ include_examples "old registration server", api_error(code: 404)
+ end
+
+ context "error 422 is received" do
+ context "and 'silent_reg_code_mismatch' param is not set" do
+ include_examples "reports error and returns false", api_error(code:
422)
end
- it "does not report an error and returns false" do
- msg = "Subscription does not include the requested product 'Fountain
Wristwatch'"
- exc = api_error(code: 422, body: { "error" => msg })
-
- expect(Yast::Report).to_not receive(:Error)
- expect(helpers.catch_registration_errors(silent_reg_code_mismatch:
true) { raise exc })
- .to eq(false)
+ context "and 'silent_reg_code_mismatch' param is set" do
+ let(:error_msg) { "Something went wrong" }
+ let(:exception) { api_error(code: 422, body: { "error" => error_msg })
}
+
+ before do
+ allow(Registration::UrlHelpers).to receive(:registration_url)
+ .and_return(SUSE::Connect::YaST::DEFAULT_URL)
+ end
+
+ it "does not report an error" do
+ expect(Yast::Report).to_not receive(:Error)
+
+ helpers.catch_registration_errors(silent_reg_code_mismatch: true) {
raise exception }
+ end
+
+ it "returns false" do
+ expect(
+ helpers.catch_registration_errors(silent_reg_code_mismatch: true)
{ raise exception }
+ ).to eq(false)
+ end
end
end