Skip to content

Commit

Permalink
Merge pull request #2533 from tardyp/marathonFix
Browse files Browse the repository at this point in the history
fix for trailing slash in marathon test
  • Loading branch information
tardyp committed Dec 9, 2016
2 parents 5483f7a + 9d38459 commit 0683989
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 deletions.
6 changes: 5 additions & 1 deletion master/buildbot/db/migrate/versions/047_cascading_deletes.py
Expand Up @@ -15,6 +15,7 @@

import sqlalchemy as sa
from migrate.changeset.constraint import ForeignKeyConstraint
from migrate.exceptions import NotSupportedError

from buildbot.util import sautils

Expand Down Expand Up @@ -47,5 +48,8 @@ def upgrade(migrate_engine):
for table, args, kwargs in fks_to_change:
fk = ForeignKeyConstraint(*args, **kwargs)
table.append_constraint(fk)
fk.drop()
try:
fk.drop()
except NotSupportedError:
pass # some versions of sqlite do not support drop, but will still update the fk
fk.create()
8 changes: 4 additions & 4 deletions master/buildbot/test/unit/test_worker_marathon.py
Expand Up @@ -45,7 +45,7 @@ def loseConnection(self):
self.n()


class TestHyperLatentWorker(unittest.SynchronousTestCase):
class TestMarathonLatentWorker(unittest.SynchronousTestCase):
def setUp(self):
self.reactor = TestReactor()
_setReactor(self.reactor)
Expand All @@ -62,19 +62,19 @@ class FakeResult(object):
_setReactor(None)

def test_constructor_normal(self):
worker = MarathonLatentWorker('bot', 'tcp://marathon.local/', 'foo',
worker = MarathonLatentWorker('bot', 'tcp://marathon.local', 'foo',
'bar', 'debian:wheezy')
# class instanciation configures nothing
self.assertEqual(worker._http, None)

def makeWorker(self, **kwargs):
kwargs.setdefault('image', 'debian:wheezy')
worker = MarathonLatentWorker('bot', 'tcp://marathon.local/', **kwargs)
worker = MarathonLatentWorker('bot', 'tcp://marathon.local', **kwargs)
self.worker = worker
master = fakemaster.make_master(testcase=self, wantData=True)
self._http = self.successResultOf(
fakehttpclientservice.HTTPClientService.getFakeService(
master, self, 'tcp://marathon.local/', auth=kwargs.get(
master, self, 'tcp://marathon.local', auth=kwargs.get(
'auth')))
worker.setServiceParent(master)
worker.reactor = self.reactor
Expand Down
1 change: 1 addition & 0 deletions master/setup.py
Expand Up @@ -497,6 +497,7 @@ def define_plugin_entries(groups):
'idna >= 0.6',
],
'docs': [
'docutils<0.13.0'
'sphinx>1.4.0',
'sphinxcontrib-blockdiag',
'sphinxcontrib-spelling',
Expand Down

0 comments on commit 0683989

Please sign in to comment.