Changeset 44
- Timestamp:
- Feb 23, 2010 3:30:08 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
mergebot/trunk/utils/test.py
r41 r44 52 52 # FIXME: the tc.find( <various actions> ) checks are bogus: any ticket can 53 53 # satisfy them, not just the one we're working on. 54 def __init__(self, *args, **kwargs): 55 FunctionalTester.__init__(self, *args, **kwargs) 54 def __init__(self, trac_url, repo_url): 55 FunctionalTester.__init__(self, trac_url) 56 self.repo_url = repo_url 56 57 self.mergeboturl = self.url + '/mergebot' 57 58 … … 88 89 tc.formvalue('ops-%s' % ticket_id, 'ticket', ticket_id) # Essentially a noop to select the right form 89 90 tc.submit('Branch') 90 self.wait_until_ notfind('Doing branch', timeout)91 self.wait_until_find('Nothing in the queue', timeout) 91 92 tc.find('Rebranch') 92 93 tc.find('Merge') … … 99 100 raise Exception('svn ls failed with exit code %s' % retval) 100 101 101 def rebranch(self, ticket_id, component, timeout=5): 102 """timeout is in seconds.""" 103 self.go_to_mergebot() 104 tc.formvalue('ops-%s' % ticket_id, 'ticket', ticket_id) # Essentially a noop to select the right form 102 def rebranch(self, ticket_id, component, timeout=15): 103 """timeout is in seconds.""" 104 self.go_to_mergebot() 105 tc.formvalue('ops-%s' % ticket_id, 'ticket', ticket_id) # Essentially a noop to select the right form 106 print "submitting rebranch request for %s" % (ticket_id) 105 107 tc.submit('Rebranch') 106 self.wait_until_ notfind('Doing rebranch', timeout)108 self.wait_until_find('Nothing in the queue', timeout) 107 109 tc.find('Rebranch') 108 110 tc.find('Merge') … … 120 122 tc.formvalue('ops-%s' % ticket_id, 'ticket', ticket_id) # Essentially a noop to select the right form 121 123 tc.submit('Merge') 122 self.wait_until_ notfind('Doing merge', timeout)124 self.wait_until_find('Nothing in the queue', timeout) 123 125 tc.find('Branch') 124 126 self.go_to_ticket(ticket_id) … … 135 137 tc.formvalue('ops-%s' % ticket_id, 'ticket', ticket_id) # Essentially a noop to select the right form 136 138 tc.submit('CheckMerge') 137 self.wait_until_ notfind('Doing checkmerge', timeout)139 self.wait_until_find('Nothing in the queue', timeout) 138 140 tc.find('Rebranch') 139 141 tc.find('Merge') … … 158 160 env.config.set('components', 'mergebot.web_ui.mergebotmodule', 'enabled') 159 161 env.config.save() 162 os.mkdir(os.path.join("testenv%s" % port, 'trac', 'mergebot')) 160 163 self._testenv._tracadmin('upgrade') # sets up the bulk of the mergebot config 161 164 env.config.parse_if_needed() … … 166 169 167 170 self._testenv.start() 168 self._tester = MergeBotFunctionalTester(baseurl )171 self._tester = MergeBotFunctionalTester(baseurl, self._testenv.repo_url()) 169 172 self.fixture = (self._testenv, self._tester) 170 173 … … 193 196 tc.url(mergeboturl) 194 197 tc.notfind('No handler matched request to /mergebot') 195 196 197 class MergeBotTestQueueList(FunctionalTwillTestCaseSetup):198 def runTest(self):199 tc.follow('MergeBot')200 for queue in 'branch', 'rebranch', 'checkmerge', 'merge':201 tc.find('%s Queue' % queue)202 198 203 199 … … 281 277 suite = MergeBotTestSuite() 282 278 suite.addTest(MergeBotTestEnabled()) 283 suite.addTest(MergeBotTestQueueList())284 279 suite.addTest(MergeBotTestNoVersion()) 285 280 suite.addTest(MergeBotTestBranch()) 286 suite.addTest(MergeBotTestRebranch()) 287 suite.addTest(MergeBotTestMerge()) 281 #suite.addTest(MergeBotTestRebranch()) 288 282 suite.addTest(MergeBotTestCheckMerge()) 289 283 suite.addTest(MergeBotTestSingleUseCase()) 284 suite.addTest(MergeBotTestMerge()) 290 285 return suite 291 286
Note: See TracChangeset
for help on using the changeset viewer.