Skip to content

Commit

Permalink
fix tests for MasterShellCommand use of WithProperties
Browse files Browse the repository at this point in the history
  • Loading branch information
Dustin J. Mitchell committed Jul 23, 2009
1 parent 19ae471 commit c47a9f5
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions buildbot/test/test_steps.py
Expand Up @@ -749,16 +749,13 @@ def testFailures_NewTestHarness(self):
self.failUnlessEqual(ss.getStatistic('tests-passed'), 264522)

class MasterShellCommand(StepTester, unittest.TestCase):
def setUp(self):
self.props = Properties()

def testMasterShellCommand(self):
self.slavebase = "testMasterShellCommand.slave"
self.masterbase = "testMasterShellCommand.master"
self.props.setProperty("other", "foo", "test")
sb = self.makeSlaveBuilder()
step = self.makeStep(master.MasterShellCommand, command=['echo',
WithProperties("hi build-%(other)s.tar.gz")])
step.build.setProperty("other", "foo", "test")

# we can't invoke runStep until the reactor is started .. hence this
# little dance
Expand All @@ -770,8 +767,7 @@ def _dotest(_):
def _check(results):
self.failUnlessEqual(results, SUCCESS)
logtxt = step.getLog("stdio").getText()
self.failUnlessEqual(self.props.render(logtxt.strip()),
"hi build-foo.tar.gz")
self.failUnlessEqual(logtxt.strip(), "hi build-foo.tar.gz")
d.addCallback(_check)
reactor.callLater(0, d.callback, None)
return d
Expand Down

0 comments on commit c47a9f5

Please sign in to comment.