def test_suite_fail_with_missing_test(self):
        """Test test_suite method that should fail with missing test."""
        test_views = {
            'SERVER_JOB': 'GOOD',
            'dummy_fail/control.dependency': 'TEST_NA',
        }

        self.stub_out_methods(test_views)
        self.mox.ReplayAll()
        test_push.test_suite(test_push.PUSH_TO_PROD_SUITE,
                             test_views,
                             arguments=test_push.parse_arguments())
        self.mox.VerifyAll()
    def test_suite_success(self):
        """Test test_suite method with matching results."""
        test_views = {
            'SERVER_JOB': 'GOOD',
            'dummy_fail/control.dependency': 'TEST_NA',
            'dummy_Fail.RetryFail': 'FAIL'
        }

        self.stub_out_methods(test_views)
        self.mox.ReplayAll()
        test_push.test_suite(test_push.PUSH_TO_PROD_SUITE,
                             test_views,
                             arguments=test_push.parse_arguments())
        self.mox.VerifyAll()
    def test_suite_fail_with_unexpected_test_results(self):
        """Test test_suite method that should fail with unexpected test results.
        """
        test_views = {
            'SERVER_JOB': 'FAIL',
            'dummy_fail/control.dependency': 'TEST_NA',
            'dummy_Fail.RetryFail': 'FAIL',
        }

        self.stub_out_methods(test_views)
        self.mox.ReplayAll()
        test_push.test_suite(test_push.PUSH_TO_PROD_SUITE,
                             test_views,
                             arguments=test_push.parse_arguments())
        self.mox.VerifyAll()
예제 #4
0
    def test_suite_fail_with_extra_test(self):
        """Test test_suite method that should fail with extra test."""
        test_views = {
            'SERVER_JOB': 'GOOD',
            'dummy_fail/control.dependency': 'TEST_NA',
            'dummy_Fail.RetryFail': 'FAIL',
            'dummy_Fail.ExtraTest': 'GOOD',
        }

        self.stub_out_methods(test_views)
        self.mox.ReplayAll()
        test_push.test_suite(test_push.PUSH_TO_PROD_SUITE,
                             test_views,
                             arguments=test_push.parse_arguments(self._ARGV))
        self.mox.VerifyAll()