Пример #1
0
    def test_execution_update_testrunner(self):
        cmd = commands.RunTests(dict(project_name='stackforge/xenapi-os-testing', change_ref='CHANGE'))
        cmd()

        self.maxDiff = 4096

        expected = [
                SSH_TO_NODE + instructions.check_out_testrunner()]
        for instruction in instructions.update_testrunner('CHANGE'):
            expected.append(SSH_TO_NODE + instruction)
        expected.extend([
                SSH_TO_NODE + environment.get_environment('stackforge/xenapi-os-testing', 'CHANGE')
                + instructions.execute_test_runner()
            ])

        self.assertEquals(expected, cmd.executor.executed_commands)
Пример #2
0
    def test_execution_with_explicit_test_runner(self):
        cmd = commands.RunTests(dict(
            project_name='PROJECT', change_ref='CHANGE', test_runner_url='AA'))
        cmd()

        self.maxDiff = 4096

        self.assertEquals(
            [
                SSH_TO_NODE + instructions.check_out_testrunner('AA'),
                SSH_TO_NODE
                + environment.get_environment('PROJECT', 'CHANGE')
                + instructions.execute_test_runner()
            ],
            cmd.executor.executed_commands
        )
Пример #3
0
 def test_node_created(self):
     cmd = commands.RunTests()
     self.assertIsNotNone(cmd.node)
Пример #4
0
 def test_default_executor(self):
     cmd = commands.RunTests()
     self.assertEquals('FakeExecutor', cmd.executor.__class__.__name__)
Пример #5
0
 def test_create_executor(self):
     cmd = commands.RunTests(dict(executor='print'))
     self.assertEquals('PrintExecutor', cmd.executor.__class__.__name__)
Пример #6
0
 def test_changeref_parsing(self):
     cmd = commands.RunTests(dict(change_ref='ref'))
     self.assertEquals('ref', cmd.change_ref)
Пример #7
0
 def test_test_runner_parsing(self):
     cmd = commands.RunTests(dict(test_runner_url='testrunner'))
     self.assertEquals('testrunner', cmd.test_runner_url)