예제 #1
0
 def test_synchronize_dynamic_repos(self):
     self.makeFile(FEDORA_DYNAMIC_REPO,
                   dirname=self.repos_dir,
                   basename="fedora.repo")
     syncYumRepos(self.repos_dir)
     self.assertEquals(
         sysconf.get("channels")["yumsync-fedora"]["name"],
         "Fedora %s - %s" % (RELEASEVER, BASEARCH))
 def test_synchronize_media_repo(self):
     self.makeFile(CENTOS_MEDIA_REPO, dirname=self.repos_dir, basename="c4-media.repo")
     syncYumRepos(self.repos_dir)
     self.assertEquals(sysconf.get("channels"), {
                       "yumsync-c4-media":
                           {"disabled": True,
                            "type": "rpm-md",
                            "name": "CentOS-%s - Media" % RELEASEVER,
                            "baseurl": "localmedia://"},
                      })
 def test_synchronize_repos_directory(self):
     self.makeFile(FEDORA_BASE_REPO, dirname=self.repos_dir, basename="fedora-base.repo")
     syncYumRepos(self.repos_dir)
     self.assertEquals(sysconf.get("channels"), {
                       "yumsync-base":
                           {"disabled": False,
                            "type": "rpm-md",
                            "name": "Fedora 8 - i386 - Base",
                            "baseurl": "http://mirrors.kernel.org/fedora/releases/8/Everything/i386/os/"},
                      })
 def test_cleanup_removed_entries(self):
     self.makeFile(FEDORA_BASE_REPO, dirname=self.repos_dir, basename="fedora-base.repo")
     syncYumRepos(self.repos_dir)
     os.unlink(os.path.join(self.repos_dir, "fedora-base.repo"))
     self.makeFile(FEDORA_DEBUG_REPO, dirname=self.repos_dir, basename="fedora-debug.repo")
     syncYumRepos(self.repos_dir)
     self.assertEquals(sysconf.get("channels"), {
                       "yumsync-debug":
                           {"disabled": True,
                            "type": "rpm-md",
                            "name": "Fedora 8 - i386 - Debug",
                            "baseurl": "http://mirrors.kernel.org/fedora/releases/8/Everything/i386/debug/"},
                      })
예제 #5
0
 def test_synchronize_media_repo(self):
     self.makeFile(CENTOS_MEDIA_REPO,
                   dirname=self.repos_dir,
                   basename="c4-media.repo")
     syncYumRepos(self.repos_dir)
     self.assertEquals(
         sysconf.get("channels"), {
             "yumsync-c4-media": {
                 "disabled": True,
                 "type": "rpm-md",
                 "name": "CentOS-%s - Media" % RELEASEVER,
                 "baseurl": "localmedia://"
             },
         })
예제 #6
0
 def test_synchronize_repos_directory(self):
     self.makeFile(FEDORA_BASE_REPO,
                   dirname=self.repos_dir,
                   basename="fedora-base.repo")
     syncYumRepos(self.repos_dir)
     self.assertEquals(
         sysconf.get("channels"), {
             "yumsync-base": {
                 "disabled":
                 False,
                 "type":
                 "rpm-md",
                 "name":
                 "Fedora 8 - i386 - Base",
                 "baseurl":
                 "http://mirrors.kernel.org/fedora/releases/8/Everything/i386/os/"
             },
         })
예제 #7
0
 def test_cleanup_removed_entries(self):
     self.makeFile(FEDORA_BASE_REPO,
                   dirname=self.repos_dir,
                   basename="fedora-base.repo")
     syncYumRepos(self.repos_dir)
     os.unlink(os.path.join(self.repos_dir, "fedora-base.repo"))
     self.makeFile(FEDORA_DEBUG_REPO,
                   dirname=self.repos_dir,
                   basename="fedora-debug.repo")
     syncYumRepos(self.repos_dir)
     self.assertEquals(
         sysconf.get("channels"), {
             "yumsync-debug": {
                 "disabled":
                 True,
                 "type":
                 "rpm-md",
                 "name":
                 "Fedora 8 - i386 - Debug",
                 "baseurl":
                 "http://mirrors.kernel.org/fedora/releases/8/Everything/i386/debug/"
             },
         })
 def test_synchronize_dynamic_repos(self):
     self.makeFile(FEDORA_DYNAMIC_REPO, dirname=self.repos_dir, basename="fedora.repo")
     syncYumRepos(self.repos_dir)
     self.assertEquals(sysconf.get("channels")["yumsync-fedora"]["name"],
                       "Fedora %s - %s" % (RELEASEVER, BASEARCH))