~launchpad-pqm/launchpad/devel

« back to all changes in this revision

Viewing changes to lib/lp/codehosting/codeimport/tests/test_worker.py

  • Committer: Launchpad Patch Queue Manager
  • Date: 2011-08-19 03:58:35 UTC
  • mfrom: (13604.2.16 proper-codeimport-servers)
  • Revision ID: launchpad@pqm.canonical.com-20110819035835-jzfzwb2a3mg7485y
[r=henninge][no-qa] Run actual git and mercurial servers when testing
        code imports rather than importing from local paths.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1070
1070
 
1071
1071
    def makeForeignCommit(self, source_details):
1072
1072
        """Change the foreign tree, generating exactly one commit."""
1073
 
        repo = GitRepo(source_details.url)
 
1073
        repo = GitRepo(local_path_from_url(source_details.url))
1074
1074
        repo.do_commit(message=self.factory.getUniqueString(),
1075
1075
            committer="Joe Random Hacker <joe@example.com>")
1076
1076
        self.foreign_commit_count += 1
1087
1087
        self.foreign_commit_count = 1
1088
1088
 
1089
1089
        return self.factory.makeCodeImportSourceDetails(
1090
 
            rcstype='git', url=repository_path)
1091
 
 
 
1090
            rcstype='git', url=git_server.get_url())
1092
1091
 
1093
1092
 
1094
1093
class TestMercurialImport(WorkerTest, TestActualImportMixin,
1123
1122
        """Change the foreign tree, generating exactly one commit."""
1124
1123
        from mercurial.ui import ui
1125
1124
        from mercurial.localrepo import localrepository
1126
 
        repo = localrepository(ui(), source_details.url)
 
1125
        repo = localrepository(ui(), local_path_from_url(source_details.url))
1127
1126
        repo.commit(text="hello world!", user="Jane Random Hacker", force=1)
1128
1127
        self.foreign_commit_count += 1
1129
1128
 
1139
1138
        self.foreign_commit_count = 1
1140
1139
 
1141
1140
        return self.factory.makeCodeImportSourceDetails(
1142
 
            rcstype='hg', url=repository_path)
 
1141
            rcstype='hg', url=hg_server.get_url())
1143
1142
 
1144
1143
 
1145
1144
class TestBzrSvnImport(WorkerTest, SubversionImportHelpers,