#269 Do not override conf.ra_config_urls in RawPungiConfig.
Merged 2 months ago by jkaluza. Opened 2 months ago by jkaluza.
jkaluza/odcs remove-raw-config  into  master

file modified
+2 -1

@@ -21,6 +21,7 @@ 

  #

  # Written by Jan Kaluza <jkaluza@redhat.com>

  

+ import copy

  import os

  import shutil

  import tempfile

@@ -65,7 +66,7 @@ 

      def __init__(self, compose_source):

          source_name, source_hash = compose_source.split("#")

  

-         url_data = conf.raw_config_urls[source_name]

+         url_data = copy.deepcopy(conf.raw_config_urls[source_name])

          # Do not override commit hash by hash from ODCS client if it is

          # hardcoded in the config file.

          if "commit" not in url_data:

@@ -581,6 +581,8 @@ 

                                new=fake_raw_config_pungi_koji_args):

                  pungi = Pungi(1, RawPungiConfig('pungi.conf#hash'))

                  pungi.run(self.compose)

+                 # Test that we do not override the conf variable.

+                 self.assertTrue("commit" not in fake_raw_config_urls["pungi.conf"])

  

          conf_topdir = os.path.join(conf.target_dir, "odcs/unique_path")

          self.koji_session.uploadWrapper.assert_has_calls(

no initial comment

Pull-Request has been merged by jkaluza

2 months ago