Exemplo n.º 1
0
 def integration_test_2b_execute_dry(self):
     actor = rollbar.Deploy('Unit Test Action', {
         'environment': 'kingpin-integration-testing',
         'revision': version.__version__,
         'local_username': '******',
         'comment': 'This should never appear in Rollbar'
     },
                            dry=True)
     res = yield actor.execute()
     self.assertEqual(res, None)
Exemplo n.º 2
0
    def integration_test_2c_execute_real(self):
        actor = rollbar.Deploy(
            'Unit Test Action', {
                'environment': 'kingpin-integration-testing',
                'revision': version.__version__,
                'local_username': '******',
                'comment': 'Integration Tests Are Good, MmmKay'
            })

        res = yield actor.execute()
        self.assertEqual(res, None)
Exemplo n.º 3
0
    def integration_test_2d_execute_real_with_rollbar_username(self):
        actor = rollbar.Deploy(
            'Unit Test Action', {
                'environment': 'kingpin-integration-testing',
                'revision': version.__version__,
                'local_username': '******',
                'rollbar_username': '******',
                'comment': 'Now, with a rollbar_username too!'
            })

        res = yield actor.execute()
        self.assertEqual(res, None)
Exemplo n.º 4
0
    def integration_test_2a_execute_with_invalid_creds(self):
        actor = rollbar.Deploy('Unit Test Action', {
            'environment': 'kingpin-integration-testing',
            'revision': version.__version__,
            'local_username': '******',
            'comment': 'Integration Tests Are Good, MmmKay'
        },
                               dry=True)

        # Valid response test
        actor._token = 'Invalid'
        with self.assertRaises(exceptions.InvalidCredentials):
            yield actor.execute()
Exemplo n.º 5
0
    def integration_test_1a_init_without_environment_creds(self):
        # Un-set the token now and make sure the init fails
        rollbar.TOKEN = None
        with self.assertRaises(exceptions.InvalidCredentials):
            rollbar.Deploy(
                'Unit Test Action', {
                    'environment': 'kingpin-integration-testing',
                    'revision': version.__version__,
                    'local_username': '******',
                    'comment': 'Integration Tests Are Good, MmmKay'
                })

        # Reload the rollbar package so it gets our environment variable back.
        importlib.reload(rollbar)
Exemplo n.º 6
0
    def test_deploy(self):
        actor = rollbar.Deploy(
            'Unit Test Action',
            {'environment': 'unittest',
             'revision': '0001a',
             'local_username': '******',
             'comment': 'weeee'})

        @gen.coroutine
        def fake_fetch_wrapper(*args, **kwargs):
            raise gen.Return('123')
        actor._fetch_wrapper = fake_fetch_wrapper
        res = yield actor._deploy()
        self.assertEquals(res, '123')
Exemplo n.º 7
0
    def test_execute(self):
        actor = rollbar.Deploy(
            'Unit Test Action',
            {'environment': 'unittest',
             'revision': '0001a',
             'local_username': '******',
             'rollbar_username': '******',
             'comment': 'weeee'})

        @gen.coroutine
        def fake_deploy(*args, **kwargs):
            raise gen.Return('123')
        actor._deploy = fake_deploy
        res = yield actor._execute()
        self.assertEquals(res, None)