Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package yast2-registration for 
openSUSE:Factory checked in at 2021-12-13 20:42:19
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/yast2-registration (Old)
 and      /work/SRC/openSUSE:Factory/.yast2-registration.new.2520 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "yast2-registration"

Mon Dec 13 20:42:19 2021 rev:77 rq:939170 version:4.4.6

Changes:
--------
--- /work/SRC/openSUSE:Factory/yast2-registration/yast2-registration.changes    
2021-11-20 02:38:36.568885227 +0100
+++ 
/work/SRC/openSUSE:Factory/.yast2-registration.new.2520/yast2-registration.changes
  2021-12-13 20:47:01.320505398 +0100
@@ -1,0 +2,7 @@
+Thu Dec  9 15:08:57 UTC 2021 - Ladislav Slez??k <[email protected]>
+
+- Improve the self-update process, do not read the products from
+  the installation medium (bsc#1193536)
+- 4.4.6
+
+-------------------------------------------------------------------

Old:
----
  yast2-registration-4.4.5.tar.bz2

New:
----
  yast2-registration-4.4.6.tar.bz2

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ yast2-registration.spec ++++++
--- /var/tmp/diff_new_pack.SrHqbX/_old  2021-12-13 20:47:01.832505725 +0100
+++ /var/tmp/diff_new_pack.SrHqbX/_new  2021-12-13 20:47:01.848505735 +0100
@@ -17,7 +17,7 @@
 
 
 Name:           yast2-registration
-Version:        4.4.5
+Version:        4.4.6
 Release:        0
 Summary:        YaST2 - Registration Module
 License:        GPL-2.0-only

++++++ yast2-registration-4.4.5.tar.bz2 -> yast2-registration-4.4.6.tar.bz2 
++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-registration-4.4.5/package/yast2-registration.changes 
new/yast2-registration-4.4.6/package/yast2-registration.changes
--- old/yast2-registration-4.4.5/package/yast2-registration.changes     
2021-11-15 15:53:38.000000000 +0100
+++ new/yast2-registration-4.4.6/package/yast2-registration.changes     
2021-12-10 16:21:19.000000000 +0100
@@ -1,4 +1,11 @@
 -------------------------------------------------------------------
+Thu Dec  9 15:08:57 UTC 2021 - Ladislav Slez??k <[email protected]>
+
+- Improve the self-update process, do not read the products from
+  the installation medium (bsc#1193536)
+- 4.4.6
+
+-------------------------------------------------------------------
 Fri Nov 12 14:51:45 UTC 2021 - Imobach Gonzalez Sosa <[email protected]>
 
 - Adapt to the ProductSpec API (bsc#1192626).
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-registration-4.4.5/package/yast2-registration.spec 
new/yast2-registration-4.4.6/package/yast2-registration.spec
--- old/yast2-registration-4.4.5/package/yast2-registration.spec        
2021-11-15 15:53:38.000000000 +0100
+++ new/yast2-registration-4.4.6/package/yast2-registration.spec        
2021-12-10 16:21:19.000000000 +0100
@@ -17,7 +17,7 @@
 
 
 Name:           yast2-registration
-Version:        4.4.5
+Version:        4.4.6
 Release:        0
 Summary:        YaST2 - Registration Module
 License:        GPL-2.0-only
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-registration-4.4.5/src/lib/registration/registration.rb 
new/yast2-registration-4.4.6/src/lib/registration/registration.rb
--- old/yast2-registration-4.4.5/src/lib/registration/registration.rb   
2021-11-15 15:53:38.000000000 +0100
+++ new/yast2-registration-4.4.6/src/lib/registration/registration.rb   
2021-12-10 16:21:19.000000000 +0100
@@ -203,23 +203,25 @@
       migration_paths
     end
 
-    # Get the list of updates for a base product or self_update_id if defined
+    # Get the list of installer updates for self_update_id and 
self_update_version
+    # (the fallback version is read from the /etc/os-release file).
     #
     # @return [Array<String>] List of URLs of updates repositories.
     #
-    # @see SwMgmt.base_product_to_register
-    # @see SwMgmt.remote_product
+    # @see SwMgmt.installer_update_base_product
     # @see SUSE::Connect::Yast.list_installer_updates
     def get_updates_list
       id = Yast::ProductFeatures.GetStringFeature("globals", "self_update_id")
-      product = SwMgmt.installer_update_base_product(id) || 
SwMgmt.base_product_to_register
-      return [] unless product
+      return [] if id.empty?
+      version = Yast::ProductFeatures.GetStringFeature("globals", 
"self_update_version")
+      version = Yast::OSRelease.ReleaseVersion if version.empty?
+      product = SwMgmt.installer_update_base_product(id, version)
 
-      log.info "Reading available updates for product: #{product["name"]}"
+      log.info "Reading available installer updates for product: #{product}"
       remote_product = SwMgmt.remote_product(product)
       updates = SUSE::Connect::YaST.list_installer_updates(remote_product, 
connect_params)
 
-      log.info "Updates for '#{product["name"]}' are available at '#{updates}'"
+      log.info "Installer updates for '#{product["name"]}' are available at 
'#{updates}'"
       updates
     end
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-registration-4.4.5/src/lib/registration/sw_mgmt.rb 
new/yast2-registration-4.4.6/src/lib/registration/sw_mgmt.rb
--- old/yast2-registration-4.4.5/src/lib/registration/sw_mgmt.rb        
2021-11-15 15:53:38.000000000 +0100
+++ new/yast2-registration-4.4.6/src/lib/registration/sw_mgmt.rb        
2021-12-10 16:21:19.000000000 +0100
@@ -40,6 +40,7 @@
 require "y2packager/resolvable"
 
 module Registration
+  Yast.import "Arch"
   Yast.import "AddOnProduct"
   Yast.import "Mode"
   Yast.import "Stage"
@@ -48,6 +49,7 @@
   Yast.import "PackageLock"
   Yast.import "Installation"
   Yast.import "PackageCallbacks"
+  Yast.import "OSRelease"
   Yast.import "Popup"
   Yast.import "Product"
 
@@ -123,27 +125,19 @@
       true
     end
 
-    # Prepare a pkg-binding product hash using the first base product available
-    # as a template and with the given self_update_id as the product name.
-    #
-    # With a media containing multiple products it is expected that all the
-    # products use the same version and arch.
+    # Prepare a pkg-binding product hash using the requested name and version,
+    # if the version is empty the fallback from the /etc/os-release file is 
used.
     #
     # @param self_update_id [String] product name to be used for get the 
installer updates
     # @return [Hash,nil] with pkg-binding format; return nil if the
-    # given self_update_id is empty or there is no base product available
-    def self.installer_update_base_product(self_update_id)
+    # given self_update_id is empty
+    def self.installer_update_base_product(self_update_id, version = "")
       return if self_update_id.empty?
 
-      # TODO: does offline makes sense for self update?
-      base_product = Y2Packager::ProductSpec.base_products.first
-      return unless base_product
-
-      # filter out not needed data
       product_info = {
         "name"         => self_update_id,
-        "arch"         => base_product.arch,
-        "version"      => version_without_release(base_product),
+        "arch"         => Yast::Arch.rpm_arch,
+        "version"      => version,
         "release_type" => nil
       }
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-registration-4.4.5/test/factories.rb 
new/yast2-registration-4.4.6/test/factories.rb
--- old/yast2-registration-4.4.5/test/factories.rb      2021-11-15 
15:53:38.000000000 +0100
+++ new/yast2-registration-4.4.6/test/factories.rb      2021-12-10 
16:21:19.000000000 +0100
@@ -22,12 +22,12 @@
 end
 
 def addon_generator(params = {})
-  SUSE::Connect::Remote::Product.new(suse_connect_product_generator(params))
+  OpenStruct.new(suse_connect_product_generator(params))
 end
 
 def addon_with_child_generator(parent_params = {})
-  prod_child = suse_connect_product_generator
-  SUSE::Connect::Remote::Product.new(
+  prod_child = OpenStruct.new(suse_connect_product_generator)
+  OpenStruct.new(
     suse_connect_product_generator(parent_params.merge("extensions" => 
[prod_child]))
   )
 end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-registration-4.4.5/test/fixtures/activated_products.yml 
new/yast2-registration-4.4.6/test/fixtures/activated_products.yml
--- old/yast2-registration-4.4.5/test/fixtures/activated_products.yml   
2021-11-15 15:53:38.000000000 +0100
+++ new/yast2-registration-4.4.6/test/fixtures/activated_products.yml   
2021-12-10 16:21:19.000000000 +0100
@@ -1,5 +1,5 @@
 ---
-- !ruby/object:SUSE::Connect::Remote::Product
+- !ruby/object:OpenStruct
   table:
     :id: 1157
     :name: SUSE Linux Enterprise High Availability GEO Extension
@@ -34,7 +34,7 @@
       enabled: true
       autorefresh: true
   modifiable: true
-- !ruby/object:SUSE::Connect::Remote::Product
+- !ruby/object:OpenStruct
   table:
     :id: 1245
     :name: SUSE Linux Enterprise High Availability Extension
@@ -53,7 +53,7 @@
     - 1539
     - 1500
     :extensions:
-    - !ruby/object:SUSE::Connect::Remote::Product
+    - !ruby/object:OpenStruct
       table:
         :id: 1157
         :name: SUSE Linux Enterprise High Availability GEO Extension
@@ -105,7 +105,7 @@
       enabled: true
       autorefresh: true
   modifiable: true
-- !ruby/object:SUSE::Connect::Remote::Product
+- !ruby/object:OpenStruct
   table:
     :id: 1117
     :name: SUSE Linux Enterprise Server
@@ -128,7 +128,7 @@
     - 1219
     - 1478
     :extensions:
-    - !ruby/object:SUSE::Connect::Remote::Product
+    - !ruby/object:OpenStruct
       table:
         :id: 1222
         :name: SUSE Linux Enterprise Workstation Extension
@@ -189,7 +189,7 @@
           enabled: true
           autorefresh: true
       modifiable: true
-    - !ruby/object:SUSE::Connect::Remote::Product
+    - !ruby/object:OpenStruct
       table:
         :id: 1223
         :name: SUSE Linux Enterprise Software Development Kit
@@ -233,7 +233,7 @@
           enabled: true
           autorefresh: true
       modifiable: true
-    - !ruby/object:SUSE::Connect::Remote::Product
+    - !ruby/object:OpenStruct
       table:
         :id: 1150
         :name: Legacy Module
@@ -276,7 +276,7 @@
           enabled: true
           autorefresh: true
       modifiable: true
-    - !ruby/object:SUSE::Connect::Remote::Product
+    - !ruby/object:OpenStruct
       table:
         :id: 1153
         :name: Web and Scripting Module
@@ -320,7 +320,7 @@
           enabled: true
           autorefresh: true
       modifiable: true
-    - !ruby/object:SUSE::Connect::Remote::Product
+    - !ruby/object:OpenStruct
       table:
         :id: 1220
         :name: Public Cloud Module
@@ -362,7 +362,7 @@
           enabled: true
           autorefresh: true
       modifiable: true
-    - !ruby/object:SUSE::Connect::Remote::Product
+    - !ruby/object:OpenStruct
       table:
         :id: 1212
         :name: Advanced Systems Management Module
@@ -402,7 +402,7 @@
           enabled: true
           autorefresh: true
       modifiable: true
-    - !ruby/object:SUSE::Connect::Remote::Product
+    - !ruby/object:OpenStruct
       table:
         :id: 1245
         :name: SUSE Linux Enterprise High Availability Extension
@@ -421,7 +421,7 @@
         - 1539
         - 1500
         :extensions:
-        - !ruby/object:SUSE::Connect::Remote::Product
+        - !ruby/object:OpenStruct
           table:
             :id: 1157
             :name: SUSE Linux Enterprise High Availability GEO Extension
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-registration-4.4.5/test/fixtures/available_addons.yml 
new/yast2-registration-4.4.6/test/fixtures/available_addons.yml
--- old/yast2-registration-4.4.5/test/fixtures/available_addons.yml     
2021-11-15 15:53:38.000000000 +0100
+++ new/yast2-registration-4.4.6/test/fixtures/available_addons.yml     
2021-12-10 16:21:19.000000000 +0100
@@ -213,7 +213,7 @@
       :successor_ids:
       - 1324
       :extensions:
-      - &1 !ruby/object:SUSE::Connect::Remote::Product
+      - &1 !ruby/object:OpenStruct
         table:
           :id: 1157
           :name: SUSE Linux Enterprise High Availability GEO Extension
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-registration-4.4.5/test/fixtures/available_unknown_addons.yml 
new/yast2-registration-4.4.6/test/fixtures/available_unknown_addons.yml
--- old/yast2-registration-4.4.5/test/fixtures/available_unknown_addons.yml     
2021-11-15 15:53:38.000000000 +0100
+++ new/yast2-registration-4.4.6/test/fixtures/available_unknown_addons.yml     
2021-12-10 16:21:19.000000000 +0100
@@ -1,6 +1,6 @@
 ---
 - !ruby/object:Registration::Addon
-  pure_addon: !ruby/object:SUSE::Connect::Remote::Product
+  pure_addon: !ruby/object:OpenStruct
     table:
       :id: 1153
       :name: Web and Scripting Module
@@ -43,7 +43,7 @@
     modifiable: true
   children: []
 - !ruby/object:Registration::Addon
-  pure_addon: !ruby/object:SUSE::Connect::Remote::Product
+  pure_addon: !ruby/object:OpenStruct
     table:
       :id: 1212
       :name: Advanced Systems Management Module
@@ -84,7 +84,7 @@
     modifiable: true
   children: []
 - !ruby/object:Registration::Addon
-  pure_addon: !ruby/object:SUSE::Connect::Remote::Product
+  pure_addon: !ruby/object:OpenStruct
     table:
       :id: 1223
       :name: SUSE Linux Enterprise Software Development Kit
@@ -128,7 +128,7 @@
     modifiable: true
   children: []
 - !ruby/object:Registration::Addon
-  pure_addon: !ruby/object:SUSE::Connect::Remote::Product
+  pure_addon: !ruby/object:OpenStruct
     table:
       :id: 1150
       :name: Legacy Module
@@ -171,7 +171,7 @@
     modifiable: true
   children: []
 - !ruby/object:Registration::Addon
-  pure_addon: !ruby/object:SUSE::Connect::Remote::Product
+  pure_addon: !ruby/object:OpenStruct
     table:
       :id: 1220
       :name: Public Cloud Module
@@ -213,7 +213,7 @@
     modifiable: true
   children: []
 - !ruby/object:Registration::Addon
-  pure_addon: !ruby/object:SUSE::Connect::Remote::Product
+  pure_addon: !ruby/object:OpenStruct
     table:
       :id: 1222
       :name: SUSE Linux Enterprise Workstation Extension
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-registration-4.4.5/test/fixtures/installed_sles12_product.yml 
new/yast2-registration-4.4.6/test/fixtures/installed_sles12_product.yml
--- old/yast2-registration-4.4.5/test/fixtures/installed_sles12_product.yml     
2021-11-15 15:53:38.000000000 +0100
+++ new/yast2-registration-4.4.6/test/fixtures/installed_sles12_product.yml     
2021-12-10 16:21:19.000000000 +0100
@@ -1,5 +1,5 @@
 ---
-- !ruby/object:SUSE::Connect::Remote::Product
+- !ruby/object:OpenStruct
   table:
     :arch: x86_64
     :identifier: SLES
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-registration-4.4.5/test/fixtures/legacy_module_services.yml 
new/yast2-registration-4.4.6/test/fixtures/legacy_module_services.yml
--- old/yast2-registration-4.4.5/test/fixtures/legacy_module_services.yml       
2021-11-15 15:53:38.000000000 +0100
+++ new/yast2-registration-4.4.6/test/fixtures/legacy_module_services.yml       
2021-12-10 16:21:19.000000000 +0100
@@ -1,10 +1,10 @@
 ---
-- !ruby/object:SUSE::Connect::Remote::Service
+- !ruby/object:OpenStruct
   table:
     :id: 1140
     :name: Legacy_Module_12_x86_64
     :url: 
https://scc.suse.com/access/services/1140?credentials=Legacy_Module_12_x86_64
-    :product: !ruby/object:SUSE::Connect::Remote::Product
+    :product: !ruby/object:OpenStruct
       table:
         :id: 1150
         :name: Legacy Module
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-registration-4.4.5/test/fixtures/migration_service.yml 
new/yast2-registration-4.4.6/test/fixtures/migration_service.yml
--- old/yast2-registration-4.4.5/test/fixtures/migration_service.yml    
2021-11-15 15:53:38.000000000 +0100
+++ new/yast2-registration-4.4.6/test/fixtures/migration_service.yml    
2021-12-10 16:21:19.000000000 +0100
@@ -1,9 +1,9 @@
---- !ruby/object:SUSE::Connect::Remote::Service
+--- !ruby/object:OpenStruct
 table:
   :id: 1311
   :name: SUSE_Linux_Enterprise_Server_12_SP1_12.1_x86_64
   :url: 
https://scc.suse.com/access/services/1311?credentials=SUSE_Linux_Enterprise_Server_12_SP1_12.1_x86_64
-  :product: !ruby/object:SUSE::Connect::Remote::Product
+  :product: !ruby/object:OpenStruct
     table:
       :id: 1322
       :name: SUSE Linux Enterprise Server 12 SP1
@@ -54,7 +54,7 @@
         autorefresh: false
       :product_type: base
       :extensions:
-      - !ruby/object:SUSE::Connect::Remote::Product
+      - !ruby/object:OpenStruct
         table:
           :id: 1323
           :name: SUSE Linux Enterprise Software Development Kit
@@ -110,7 +110,7 @@
           :product_type: extension
           :extensions: []
         modifiable: true
-      - !ruby/object:SUSE::Connect::Remote::Product
+      - !ruby/object:OpenStruct
         table:
           :id: 1324
           :name: SUSE Linux Enterprise High Availability Extension
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-registration-4.4.5/test/fixtures/migration_sles15_activated_products.yml
 
new/yast2-registration-4.4.6/test/fixtures/migration_sles15_activated_products.yml
--- 
old/yast2-registration-4.4.5/test/fixtures/migration_sles15_activated_products.yml
  2021-11-15 15:53:38.000000000 +0100
+++ 
new/yast2-registration-4.4.6/test/fixtures/migration_sles15_activated_products.yml
  2021-12-10 16:21:19.000000000 +0100
@@ -1,5 +1,5 @@
 ---
-- !ruby/object:SUSE::Connect::Remote::Product
+- !ruby/object:OpenStruct
   table:
     :id: 1421
     :name: SUSE Linux Enterprise Server
@@ -56,7 +56,7 @@
       autorefresh: true
     :product_type: base
     :extensions:
-    - !ruby/object:SUSE::Connect::Remote::Product
+    - !ruby/object:OpenStruct
       table:
         :id: 1574
         :name: SUSE Manager for Retail
@@ -110,7 +110,7 @@
         :product_type: extension
         :extensions: []
       modifiable: true
-    - !ruby/object:SUSE::Connect::Remote::Product
+    - !ruby/object:OpenStruct
       table:
         :id: 1536
         :name: SUSE Linux Enterprise Live Patching
@@ -161,7 +161,7 @@
         :product_type: extension
         :extensions: []
       modifiable: true
-    - !ruby/object:SUSE::Connect::Remote::Product
+    - !ruby/object:OpenStruct
       table:
         :id: 1153
         :name: Web and Scripting Module
@@ -224,7 +224,7 @@
         :product_type: module
         :extensions: []
       modifiable: true
-    - !ruby/object:SUSE::Connect::Remote::Product
+    - !ruby/object:OpenStruct
       table:
         :id: 1518
         :name: SUSE Manager Server
@@ -280,7 +280,7 @@
         :product_type: extension
         :extensions: []
       modifiable: true
-    - !ruby/object:SUSE::Connect::Remote::Product
+    - !ruby/object:OpenStruct
       table:
         :id: 1678
         :name: SUSE Cloud Application Platform Tools Module
@@ -340,7 +340,7 @@
         :product_type: module
         :extensions: []
       modifiable: true
-    - !ruby/object:SUSE::Connect::Remote::Product
+    - !ruby/object:OpenStruct
       table:
         :id: 1427
         :name: SUSE Linux Enterprise Software Development Kit
@@ -403,7 +403,7 @@
         :product_type: extension
         :extensions: []
       modifiable: true
-    - !ruby/object:SUSE::Connect::Remote::Product
+    - !ruby/object:OpenStruct
       table:
         :id: 1617
         :name: SUSE OpenStack Cloud
@@ -457,7 +457,7 @@
         :product_type: extension
         :extensions: []
       modifiable: true
-    - !ruby/object:SUSE::Connect::Remote::Product
+    - !ruby/object:OpenStruct
       table:
         :id: 1220
         :name: Public Cloud Module
@@ -518,7 +518,7 @@
         :product_type: module
         :extensions: []
       modifiable: true
-    - !ruby/object:SUSE::Connect::Remote::Product
+    - !ruby/object:OpenStruct
       table:
         :id: 1526
         :name: SUSE Enterprise Storage
@@ -573,7 +573,7 @@
         :product_type: extension
         :extensions: []
       modifiable: true
-    - !ruby/object:SUSE::Connect::Remote::Product
+    - !ruby/object:OpenStruct
       table:
         :id: 1529
         :name: SUSE Package Hub
@@ -624,7 +624,7 @@
         :product_type: extension
         :extensions: []
       modifiable: true
-    - !ruby/object:SUSE::Connect::Remote::Product
+    - !ruby/object:OpenStruct
       table:
         :id: 1725
         :name: SUSE Manager Proxy
@@ -680,7 +680,7 @@
         :product_type: extension
         :extensions: []
       modifiable: true
-    - !ruby/object:SUSE::Connect::Remote::Product
+    - !ruby/object:OpenStruct
       table:
         :id: 1729
         :name: SUSE OpenStack Cloud Crowbar
@@ -734,7 +734,7 @@
         :product_type: extension
         :extensions: []
       modifiable: true
-    - !ruby/object:SUSE::Connect::Remote::Product
+    - !ruby/object:OpenStruct
       table:
         :id: 1431
         :name: SUSE Linux Enterprise Workstation Extension
@@ -799,7 +799,7 @@
         :product_type: extension
         :extensions: []
       modifiable: true
-    - !ruby/object:SUSE::Connect::Remote::Product
+    - !ruby/object:OpenStruct
       table:
         :id: 1212
         :name: Advanced Systems Management Module
@@ -858,7 +858,7 @@
         :product_type: module
         :extensions: []
       modifiable: true
-    - !ruby/object:SUSE::Connect::Remote::Product
+    - !ruby/object:OpenStruct
       table:
         :id: 1520
         :name: SUSE Manager Proxy
@@ -914,7 +914,7 @@
         :product_type: extension
         :extensions: []
       modifiable: true
-    - !ruby/object:SUSE::Connect::Remote::Product
+    - !ruby/object:OpenStruct
       table:
         :id: 1618
         :name: SUSE Linux Enterprise Server BCL
@@ -973,7 +973,7 @@
         :product_type: extension
         :extensions: []
       modifiable: true
-    - !ruby/object:SUSE::Connect::Remote::Product
+    - !ruby/object:OpenStruct
       table:
         :id: 1150
         :name: Legacy Module
@@ -1035,7 +1035,7 @@
         :product_type: module
         :extensions: []
       modifiable: true
-    - !ruby/object:SUSE::Connect::Remote::Product
+    - !ruby/object:OpenStruct
       table:
         :id: 1724
         :name: SUSE Manager Server
@@ -1091,7 +1091,7 @@
         :product_type: extension
         :extensions: []
       modifiable: true
-    - !ruby/object:SUSE::Connect::Remote::Product
+    - !ruby/object:OpenStruct
       table:
         :id: 1730
         :name: HPE Helion OpenStack Cloud
@@ -1145,7 +1145,7 @@
         :product_type: extension
         :extensions: []
       modifiable: true
-    - !ruby/object:SUSE::Connect::Remote::Product
+    - !ruby/object:OpenStruct
       table:
         :id: 1432
         :name: SUSE Linux Enterprise High Availability Extension
@@ -1198,7 +1198,7 @@
           autorefresh: true
         :product_type: extension
         :extensions:
-        - !ruby/object:SUSE::Connect::Remote::Product
+        - !ruby/object:OpenStruct
           table:
             :id: 1435
             :name: SUSE Linux Enterprise High Availability GEO Extension
@@ -1255,7 +1255,7 @@
             :extensions: []
           modifiable: true
       modifiable: true
-    - !ruby/object:SUSE::Connect::Remote::Product
+    - !ruby/object:OpenStruct
       table:
         :id: 1349
         :name: SUSE Manager Server
@@ -1311,7 +1311,7 @@
         :product_type: extension
         :extensions: []
       modifiable: true
-    - !ruby/object:SUSE::Connect::Remote::Product
+    - !ruby/object:OpenStruct
       table:
         :id: 1352
         :name: SUSE Manager Proxy
@@ -1367,7 +1367,7 @@
         :product_type: extension
         :extensions: []
       modifiable: true
-    - !ruby/object:SUSE::Connect::Remote::Product
+    - !ruby/object:OpenStruct
       table:
         :id: 1440
         :name: HPC Module
@@ -1427,7 +1427,7 @@
         :product_type: module
         :extensions: []
       modifiable: true
-    - !ruby/object:SUSE::Connect::Remote::Product
+    - !ruby/object:OpenStruct
       table:
         :id: 1332
         :name: Containers Module
@@ -1482,7 +1482,7 @@
         :product_type: module
         :extensions: []
       modifiable: true
-    - !ruby/object:SUSE::Connect::Remote::Product
+    - !ruby/object:OpenStruct
       table:
         :id: 1341
         :name: Toolchain Module
@@ -1533,7 +1533,7 @@
         :product_type: module
         :extensions: []
       modifiable: true
-    - !ruby/object:SUSE::Connect::Remote::Product
+    - !ruby/object:OpenStruct
       table:
         :id: 1619
         :name: SUSE Linux Enterprise Real Time
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-registration-4.4.5/test/fixtures/migration_to_sles12_sp1.yml 
new/yast2-registration-4.4.6/test/fixtures/migration_to_sles12_sp1.yml
--- old/yast2-registration-4.4.5/test/fixtures/migration_to_sles12_sp1.yml      
2021-11-15 15:53:38.000000000 +0100
+++ new/yast2-registration-4.4.6/test/fixtures/migration_to_sles12_sp1.yml      
2021-12-10 16:21:19.000000000 +0100
@@ -1,5 +1,5 @@
 ---
-- - !ruby/object:SUSE::Connect::Remote::Product
+- - !ruby/object:OpenStruct
     table:
       :identifier: SLES
       :version: '12.1'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-registration-4.4.5/test/fixtures/migration_to_sles15.yml 
new/yast2-registration-4.4.6/test/fixtures/migration_to_sles15.yml
--- old/yast2-registration-4.4.5/test/fixtures/migration_to_sles15.yml  
2021-11-15 15:53:38.000000000 +0100
+++ new/yast2-registration-4.4.6/test/fixtures/migration_to_sles15.yml  
2021-12-10 16:21:19.000000000 +0100
@@ -1,5 +1,5 @@
 ---
-- - !ruby/object:SUSE::Connect::Remote::Product
+- - !ruby/object:OpenStruct
     table:
       :identifier: SLES
       :version: '15-0'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-registration-4.4.5/test/fixtures/pure_addons.yml 
new/yast2-registration-4.4.6/test/fixtures/pure_addons.yml
--- old/yast2-registration-4.4.5/test/fixtures/pure_addons.yml  2021-11-15 
15:53:38.000000000 +0100
+++ new/yast2-registration-4.4.6/test/fixtures/pure_addons.yml  2021-12-10 
16:21:19.000000000 +0100
@@ -1,5 +1,5 @@
 ---
-- !ruby/object:SUSE::Connect::Remote::Product
+- !ruby/object:OpenStruct
   table:
     :id: 1222
     :name: SUSE Linux Enterprise Workstation Extension
@@ -60,7 +60,7 @@
       enabled: true
       autorefresh: true
   modifiable: true
-- !ruby/object:SUSE::Connect::Remote::Product
+- !ruby/object:OpenStruct
   table:
     :id: 1223
     :name: SUSE Linux Enterprise Software Development Kit
@@ -103,7 +103,7 @@
       enabled: true
       autorefresh: true
   modifiable: true
-- !ruby/object:SUSE::Connect::Remote::Product
+- !ruby/object:OpenStruct
   table:
     :id: 1150
     :name: Legacy Module
@@ -146,7 +146,7 @@
       enabled: true
       autorefresh: true
   modifiable: true
-- !ruby/object:SUSE::Connect::Remote::Product
+- !ruby/object:OpenStruct
   table:
     :id: 1153
     :name: Web and Scripting Module
@@ -190,7 +190,7 @@
       enabled: true
       autorefresh: true
   modifiable: true
-- !ruby/object:SUSE::Connect::Remote::Product
+- !ruby/object:OpenStruct
   table:
     :id: 1220
     :name: Public Cloud Module
@@ -231,7 +231,7 @@
       enabled: true
       autorefresh: true
   modifiable: true
-- !ruby/object:SUSE::Connect::Remote::Product
+- !ruby/object:OpenStruct
   table:
     :id: 1212
     :name: Advanced Systems Management Module
@@ -271,7 +271,7 @@
       enabled: true
       autorefresh: true
   modifiable: true
-- !ruby/object:SUSE::Connect::Remote::Product
+- !ruby/object:OpenStruct
   table:
     :id: 1245
     :name: SUSE Linux Enterprise High Availability Extension
@@ -290,7 +290,7 @@
     - 1539
     - 1500
     :extensions:
-    - !ruby/object:SUSE::Connect::Remote::Product
+    - !ruby/object:OpenStruct
       table:
         :id: 1157
         :name: SUSE Linux Enterprise High Availability GEO Extension
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-registration-4.4.5/test/fixtures/remote_product.yml 
new/yast2-registration-4.4.6/test/fixtures/remote_product.yml
--- old/yast2-registration-4.4.5/test/fixtures/remote_product.yml       
2021-11-15 15:53:38.000000000 +0100
+++ new/yast2-registration-4.4.6/test/fixtures/remote_product.yml       
2021-12-10 16:21:19.000000000 +0100
@@ -1,4 +1,4 @@
---- !ruby/object:SUSE::Connect::Remote::Product
+--- !ruby/object:OpenStruct
 table:
   :id: 1117
   :name: SUSE Linux Enterprise Server
@@ -21,7 +21,7 @@
   - 1219
   - 1478
   :extensions:
-  - !ruby/object:SUSE::Connect::Remote::Product
+  - !ruby/object:OpenStruct
     table:
       :id: 1222
       :name: SUSE Linux Enterprise Workstation Extension
@@ -67,7 +67,7 @@
         enabled: true
         autorefresh: true
     modifiable: true
-  - !ruby/object:SUSE::Connect::Remote::Product
+  - !ruby/object:OpenStruct
     table:
       :id: 1223
       :name: SUSE Linux Enterprise Software Development Kit
@@ -110,7 +110,7 @@
         enabled: true
         autorefresh: true
     modifiable: true
-  - !ruby/object:SUSE::Connect::Remote::Product
+  - !ruby/object:OpenStruct
     table:
       :id: 1150
       :name: Legacy Module
@@ -143,7 +143,7 @@
         enabled: true
         autorefresh: false
     modifiable: true
-  - !ruby/object:SUSE::Connect::Remote::Product
+  - !ruby/object:OpenStruct
     table:
       :id: 1153
       :name: Web and Scripting Module
@@ -176,7 +176,7 @@
         enabled: true
         autorefresh: false
     modifiable: true
-  - !ruby/object:SUSE::Connect::Remote::Product
+  - !ruby/object:OpenStruct
     table:
       :id: 1220
       :name: Public Cloud Module
@@ -209,7 +209,7 @@
         enabled: true
         autorefresh: false
     modifiable: true
-  - !ruby/object:SUSE::Connect::Remote::Product
+  - !ruby/object:OpenStruct
     table:
       :id: 1212
       :name: Advanced Systems Management Module
@@ -239,7 +239,7 @@
         enabled: true
         autorefresh: false
     modifiable: true
-  - !ruby/object:SUSE::Connect::Remote::Product
+  - !ruby/object:OpenStruct
     table:
       :id: 1155
       :name: SUSE Linux Enterprise High Availability Extension
@@ -258,7 +258,7 @@
       - 1242
       - 1500
       :extensions:
-      - !ruby/object:SUSE::Connect::Remote::Product
+      - !ruby/object:OpenStruct
         table:
           :id: 1157
           :name: SUSE Linux Enterprise High Availability GEO Extension
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-registration-4.4.5/test/fixtures/sle15_addons.yaml 
new/yast2-registration-4.4.6/test/fixtures/sle15_addons.yaml
--- old/yast2-registration-4.4.5/test/fixtures/sle15_addons.yaml        
2021-11-15 15:53:38.000000000 +0100
+++ new/yast2-registration-4.4.6/test/fixtures/sle15_addons.yaml        
2021-12-10 16:21:19.000000000 +0100
@@ -65,7 +65,7 @@
       :shortname: Basesystem-Module
       :recommended: true
       :extensions:
-      - &1 !ruby/object:SUSE::Connect::Remote::Product
+      - &1 !ruby/object:OpenStruct
         table:
           :id: 1578
           :name: Desktop Applications Module
@@ -130,7 +130,7 @@
           :shortname: Desktop-Applications-Module
           :recommended: false
           :extensions:
-          - &6 !ruby/object:SUSE::Connect::Remote::Product
+          - &6 !ruby/object:OpenStruct
             table:
               :id: 1579
               :name: Development Tools Module
@@ -197,7 +197,7 @@
               :recommended: false
               :extensions: []
             modifiable: true
-          - &8 !ruby/object:SUSE::Connect::Remote::Product
+          - &8 !ruby/object:OpenStruct
             table:
               :id: 1580
               :name: Server Applications Module
@@ -264,7 +264,7 @@
               :recommended: false
               :extensions: []
             modifiable: true
-          - &9 !ruby/object:SUSE::Connect::Remote::Product
+          - &9 !ruby/object:OpenStruct
             table:
               :id: 1583
               :name: SUSE Linux Enterprise Workstation Extension
@@ -332,7 +332,7 @@
               :recommended: false
               :extensions: []
             modifiable: true
-          - &10 !ruby/object:SUSE::Connect::Remote::Product
+          - &10 !ruby/object:OpenStruct
             table:
               :id: 15831
               :name: SUSE Linux Enterprise Workstation Extension
@@ -401,7 +401,7 @@
               :extensions: []
             modifiable: true
         modifiable: true
-      - &3 !ruby/object:SUSE::Connect::Remote::Product
+      - &3 !ruby/object:OpenStruct
         table:
           :id: 1581
           :name: Legacy Module
@@ -471,7 +471,7 @@
           :recommended: false
           :extensions: []
         modifiable: true
-      - &4 !ruby/object:SUSE::Connect::Remote::Product
+      - &4 !ruby/object:OpenStruct
         table:
           :id: 1611
           :name: Public Cloud Module
@@ -533,7 +533,7 @@
           :recommended: false
           :extensions: []
         modifiable: true
-      - &5 !ruby/object:SUSE::Connect::Remote::Product
+      - &5 !ruby/object:OpenStruct
         table:
           :id: 1582
           :name: SUSE Linux Enterprise High Availability Extension
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-registration-4.4.5/test/migration_repos_workflow_spec.rb 
new/yast2-registration-4.4.6/test/migration_repos_workflow_spec.rb
--- old/yast2-registration-4.4.5/test/migration_repos_workflow_spec.rb  
2021-11-15 15:53:38.000000000 +0100
+++ new/yast2-registration-4.4.6/test/migration_repos_workflow_spec.rb  
2021-12-10 16:21:19.000000000 +0100
@@ -281,7 +281,7 @@
 
     it "asks for confirmation if the system was already migrated" do
       # pretend SLES15 is already activated
-      sles15 = SUSE::Connect::Remote::Product.new(
+      sles15 = OpenStruct.new(
         arch:       "x86_64",
         identifier: "SLES",
         version:    "15"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-registration-4.4.5/test/registration/clients/scc_auto_test.rb 
new/yast2-registration-4.4.6/test/registration/clients/scc_auto_test.rb
--- old/yast2-registration-4.4.5/test/registration/clients/scc_auto_test.rb     
2021-11-15 15:53:38.000000000 +0100
+++ new/yast2-registration-4.4.6/test/registration/clients/scc_auto_test.rb     
2021-12-10 16:21:19.000000000 +0100
@@ -91,6 +91,8 @@
       allow(Y2Packager::ProductSpec).to receive(:base_products).and_return([])
       # clean cache
       ::Registration::Storage::Cache.instance.addon_services = []
+      allow(Registration::UrlHelpers).to 
receive(:slp_discovery_feedback).and_return([])
+      allow(::Registration::SwMgmt).to receive(:init)
     end
 
     it "just returns true if config is not set to register and mode is not 
update" do
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-registration-4.4.5/test/registration/package_search_test.rb 
new/yast2-registration-4.4.6/test/registration/package_search_test.rb
--- old/yast2-registration-4.4.5/test/registration/package_search_test.rb       
2021-11-15 15:53:38.000000000 +0100
+++ new/yast2-registration-4.4.6/test/registration/package_search_test.rb       
2021-12-10 16:21:19.000000000 +0100
@@ -118,7 +118,9 @@
 
     it "limits the search to the given product" do
       expect(SUSE::Connect::PackageSearch).to receive(:search) do |_name, 
product:|
-        expect(product.to_triplet).to eq("SLES/15.2/x86_64")
+        expect(product.identifier).to eq("SLES")
+        expect(product.version).to eq("15.2")
+        expect(product.arch).to eq("x86_64")
         packages
       end
       subject.packages
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-registration-4.4.5/test/registration/storage/config_test.rb 
new/yast2-registration-4.4.6/test/registration/storage/config_test.rb
--- old/yast2-registration-4.4.5/test/registration/storage/config_test.rb       
2021-11-15 15:53:38.000000000 +0100
+++ new/yast2-registration-4.4.6/test/registration/storage/config_test.rb       
2021-12-10 16:21:19.000000000 +0100
@@ -158,34 +158,34 @@
     end
 
     let(:sles_activation) do
-      SUSE::Connect::Remote::Activation.new(
+      OpenStruct.new(
         "regcode" => "0123456789",
-        "service" => {
-          "product" => {
+        "service" => OpenStruct.new(
+          "product" => OpenStruct.new(
             "name" => "SUSE Linux Enteprise Server", "identifier" => "SLES", 
"isbase" => true
-          }
-        }
+          )
+        )
       )
     end
 
     let(:basesystem_activation) do
-      SUSE::Connect::Remote::Activation.new(
-        "service" => {
-          "product" => {
+      OpenStruct.new(
+        "service" => OpenStruct.new(
+          "product" => OpenStruct.new(
             "name" => "Basesystem Module", "identifier" => "sle-basesystem"
-          }
-        }
+          )
+        )
       )
     end
 
     let(:workstation_activation) do
-      SUSE::Connect::Remote::Activation.new(
+      OpenStruct.new(
         "regcode" => "ABCDEFGHIJ",
-        "service" => {
-          "product" => {
+        "service" => OpenStruct.new(
+          "product" => OpenStruct.new(
             "name" => "Workstation Extension", "identifier" => "sle-we"
-          }
-        }
+          )
+        )
       )
     end
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-registration-4.4.5/test/registration_spec.rb 
new/yast2-registration-4.4.6/test/registration_spec.rb
--- old/yast2-registration-4.4.5/test/registration_spec.rb      2021-11-15 
15:53:38.000000000 +0100
+++ new/yast2-registration-4.4.6/test/registration_spec.rb      2021-12-10 
16:21:19.000000000 +0100
@@ -16,7 +16,7 @@
       reg_code = "reg_code"
       target_distro = "sles-12-x86_64"
 
-      expect_any_instance_of(SUSE::Connect::Credentials).to receive(:write)
+      expect(SUSE::Connect::YaST).to receive(:create_credentials_file)
       expect(SUSE::Connect::YaST).to(receive(:announce_system)
         .with(hash_including(token: reg_code), target_distro)
         .and_return([username, password]))
@@ -45,11 +45,11 @@
       {
         "name"    => "service",
         "url"     => "https://example.com";,
-        "product" => product
+        "product" => OpenStruct.new(product)
       }
     end
 
-    let(:service) { SUSE::Connect::Remote::Service.new(service_data) }
+    let(:service) { OpenStruct.new(service_data) }
     let(:destdir) { "/foo" }
 
     before do
@@ -65,11 +65,9 @@
       expect(Registration::SwMgmt).to receive(:update_product_renames)
         .with("SUSE_SLES_SAP" => "SLES_SAP")
 
-      allow(File).to 
receive(:exist?).with(SUSE::Connect::YaST::GLOBAL_CREDENTIALS_FILE)
-        .and_return(true)
-
-      allow(File).to 
receive(:read).with(SUSE::Connect::YaST::GLOBAL_CREDENTIALS_FILE)
-        .and_return("username=SCC_foo\npassword=bar")
+      allow(SUSE::Connect::YaST).to receive(:credentials)
+        .with(SUSE::Connect::YaST::GLOBAL_CREDENTIALS_FILE)
+        .and_return(OpenStruct.new(username: "SCC_foo", password: "bar"))
     end
 
     it "adds the selected product and returns added zypp services" do
@@ -82,12 +80,6 @@
       allow(Yast::Stage).to receive(:initial).and_return(false)
       expect(Yast::Installation).to_not receive(:destdir)
 
-      expect(File).to 
receive(:exist?).with(SUSE::Connect::YaST::GLOBAL_CREDENTIALS_FILE)
-        .and_return(true)
-
-      expect(File).to 
receive(:read).with(SUSE::Connect::YaST::GLOBAL_CREDENTIALS_FILE)
-        .and_return("username=SCC_foo\npassword=bar")
-
       subject.send(yast_method, product)
     end
   end
@@ -223,6 +215,7 @@
 
   describe "#get_updates_list" do
     let(:self_update_id) { "SLES" }
+    let(:self_update_version) { "15.4" }
     let(:base_product) { { "name" => "base" } }
     let(:installer_update_base_product) { { "name" => self_update_id } }
     let(:remote_product) { { "name" => "base" } }
@@ -241,34 +234,26 @@
     end
 
     context "when the control file defines a self_update_id" do
-      it "returns updates list from the server for the self update id" do
+      it "returns updates list from the server for the self update id and 
version" do
         allow(Yast::ProductFeatures).to receive(:GetStringFeature)
           .with("globals", "self_update_id").and_return(self_update_id)
-        expect(Registration::SwMgmt).to receive(:installer_update_base_product)
-          .with(self_update_id).and_return(installer_update_base_product)
-        expect(Registration::SwMgmt).to receive(:remote_product)
-          
.with(installer_update_base_product).and_return(installer_update_base_product)
-        expect(suse_connect).to receive(:list_installer_updates)
-          .with(installer_update_base_product, anything)
-          .and_return(updates)
-        expect(subject.get_updates_list).to eq(updates)
-      end
-    end
-
-    context "when the control file does not define a self_update_id" do
-      it "returns updates list from the server for the base product" do
         allow(Yast::ProductFeatures).to receive(:GetStringFeature)
-          .with("globals", "self_update_id").and_return("")
-        expect(Registration::SwMgmt).to 
receive(:remote_product).with(base_product)
-          .and_return(remote_product)
-        expect(suse_connect).to 
receive(:list_installer_updates).with(remote_product, anything)
-          .and_return(updates)
+          .with("globals", 
"self_update_version").and_return(self_update_version)
+        expect(suse_connect).to receive(:list_installer_updates) do |product, 
_options|
+          expect(product.identifier).to eq("SLES")
+          expect(product.version).to eq("15.4")
+          updates
+        end
         expect(subject.get_updates_list).to eq(updates)
       end
     end
 
     context "when an exception connecting to the server takes place" do
       before do
+        allow(Yast::ProductFeatures).to receive(:GetStringFeature)
+          .with("globals", "self_update_id").and_return(self_update_id)
+        allow(Yast::ProductFeatures).to receive(:GetStringFeature)
+          .with("globals", 
"self_update_version").and_return(self_update_version)
         allow(suse_connect).to 
receive(:list_installer_updates).and_raise(Timeout::Error)
       end
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-registration-4.4.5/test/scc_test.rb 
new/yast2-registration-4.4.6/test/scc_test.rb
--- old/yast2-registration-4.4.5/test/scc_test.rb       2021-11-15 
15:53:38.000000000 +0100
+++ new/yast2-registration-4.4.6/test/scc_test.rb       2021-12-10 
16:21:19.000000000 +0100
@@ -19,6 +19,7 @@
     allow(Registration::SwMgmt).to receive(:init)
     allow(Registration::SwMgmt).to 
receive(:find_base_product).and_return("name" => "SLES")
     allow(Registration::Registration).to receive(:is_registered?)
+    allow(Registration::UrlHelpers).to 
receive(:slp_discovery_feedback).and_return([])
   end
 
   context "the system is already registered" do
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-registration-4.4.5/test/sw_mgmt_spec.rb 
new/yast2-registration-4.4.6/test/sw_mgmt_spec.rb
--- old/yast2-registration-4.4.5/test/sw_mgmt_spec.rb   2021-11-15 
15:53:38.000000000 +0100
+++ new/yast2-registration-4.4.6/test/sw_mgmt_spec.rb   2021-12-10 
16:21:19.000000000 +0100
@@ -123,42 +123,15 @@
   end
 
   describe ".installer_update_base_product" do
-    let(:base_product) do
-      instance_double(Y2Packager::ProductSpec, name: "dummy", version: "15.0", 
arch: "x86_64")
-    end
-    let(:base_products) { [base_product] }
-
-    before do
-      allow(Y2Packager::ProductSpec).to 
receive(:base_products).and_return(base_products)
-      allow(Y2Packager::MediumType).to receive(:online?).and_return(false)
-      allow(Y2Packager::MediumType).to receive(:offline?).and_return(false)
-    end
-
     it "returns nil if the given self_update_id is empty" do
       expect(subject.installer_update_base_product("")).to eq(nil)
     end
 
-    context "when there is no base product available" do
-      let(:base_products) { [] }
-
-      it "returns nil" do
-        allow(Y2Packager::ProductSpec).to 
receive(:base_products).and_return([])
-        expect(subject.installer_update_base_product("self_update_id")).to 
eq(nil)
-      end
-    end
-
-    context "when there is some product available" do
-      it "returns a hash with the product keys 'name', 'version', 'arch' and 
'release_type' " do
-        product = subject.installer_update_base_product("self_update_id")
-        expect(product).to be_a(Hash)
-        expect(product.keys.size).to eq(4)
-        expect(product).to include("name", "version", "arch", "release_type")
-      end
-
-      it "uses the given self_update_id as the product name returned" do
-        product = subject.installer_update_base_product("self_update_id")
-        expect(product["name"]).to eq("self_update_id")
-      end
+    it "returns the product hash" do
+      expect(subject.installer_update_base_product("SLES", "15.4")).to include(
+        "name"    => "SLES",
+        "version" => "15.4"
+      )
     end
   end
 
@@ -181,9 +154,9 @@
 
   describe ".add_services" do
     let(:service_url) { 
"https://example.com/foo/bar?credentials=TEST_credentials"; }
-    let(:credentials) { SUSE::Connect::Credentials.new("user", "password", 
"file") }
+    let(:credentials) { OpenStruct.new(username: "user", password: "password", 
file: "file") }
     let(:product_service) do
-      SUSE::Connect::Remote::Service.new(
+      OpenStruct.new(
         "name"    => service_name,
         "url"     => service_url,
         "product" => {}
@@ -194,7 +167,7 @@
       expect(Yast::Pkg).to receive(:SourceSaveAll).and_return(true).twice
       expect(Yast::Pkg).to 
receive(:ServiceForceRefresh).with(service_name).and_return(true)
       expect(Yast::Pkg).to 
receive(:ServiceSave).with(service_name).and_return(true)
-      expect_any_instance_of(SUSE::Connect::Credentials).to receive(:write)
+      expect(SUSE::Connect::YaST).to receive(:create_credentials_file)
 
       allow(Yast::Pkg).to 
receive(:SourceGetCurrent).with(false).and_return(repos.keys)
       repos.each do |id, repo|
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-registration-4.4.5/test/url_helpers_spec.rb 
new/yast2-registration-4.4.6/test/url_helpers_spec.rb
--- old/yast2-registration-4.4.5/test/url_helpers_spec.rb       2021-11-15 
15:53:38.000000000 +0100
+++ new/yast2-registration-4.4.6/test/url_helpers_spec.rb       2021-12-10 
16:21:19.000000000 +0100
@@ -110,15 +110,6 @@
           .and_return(false)
         expect(Registration::UrlHelpers.registration_url).to be_nil
       end
-
-      it "reads the URL from config file if present" do
-        # stub config file reading
-        url = "https://example.com";
-        expect(File).to 
receive(:exist?).with(SUSE::Connect::YaST::DEFAULT_CONFIG_FILE)
-          .and_return(true).twice
-        expect(YAML).to receive(:load_file).and_return("url" => url, 
"insecure" => false)
-        expect(Registration::UrlHelpers.registration_url).to eq(url)
-      end
     end
 
     context "at upgrade" do
@@ -166,7 +157,7 @@
         end
 
         it "returns URL of RMT server" do
-          expect(File).to 
receive(:exist?).with(fixtures_file("SUSEConnect")).and_return(true)
+          allow(File).to 
receive(:exist?).with(fixtures_file("SUSEConnect")).and_return(true)
           expect(SUSE::Connect::Config).to receive(:new).with(suse_connect)
             
.and_return(SUSE::Connect::Config.new(fixtures_file("SUSEConnect")))
           expect(Registration::UrlHelpers.registration_url).to 
eq("https://myserver.com";)

Reply via email to