Ejemplo n.º 1
0
def install_sentry_plugins():
    # Sentry's pytest plugin explicitly doesn't load plugins, so let's load all of them
    # and ignore the fact that we're not *just* testing our own
    # Note: We could manually register/configure INSTALLED_APPS by traversing our entry points
    # or package directories, but this is easier assuming Sentry doesn't change APIs.
    # Note: Order of operations matters here.
    from sentry.runner.importer import install_plugin_apps
    from django.conf import settings

    install_plugin_apps("sentry.apps", settings)

    from sentry.runner.initializer import register_plugins

    register_plugins(settings, raise_on_plugin_load_failure=True)

    settings.ASANA_CLIENT_ID = "abc"
    settings.ASANA_CLIENT_SECRET = "123"
    settings.BITBUCKET_CONSUMER_KEY = "abc"
    settings.BITBUCKET_CONSUMER_SECRET = "123"
    settings.GITHUB_APP_ID = "abc"
    settings.GITHUB_API_SECRET = "123"
    settings.GITHUB_APPS_APP_ID = "abc"
    settings.GITHUB_APPS_API_SECRET = "123"
    # this isn't the real secret
    settings.SENTRY_OPTIONS["github.integration-hook-secret"] = "b3002c3e321d4b7880360d397db2ccfd"
Ejemplo n.º 2
0
def pytest_configure(config):
    # Sentry's pytest plugin explicitly doesn't load plugins, so let's load all of them
    # and ignore the fact that we're not *just* testing our own
    # Note: We could manually register/configure INSTALLED_APPS by traversing our entry points
    # or package directories, but this is easier assuming Sentry doesn't change APIs.
    # Note: Order of operations matters here.
    from sentry.runner.importer import install_plugin_apps
    install_plugin_apps('sentry.apps', settings)

    from sentry.runner.initializer import register_plugins
    register_plugins(settings)
Ejemplo n.º 3
0
def pytest_configure(config):
    # Sentry's pytest plugin explicitly doesn't load plugins, so let's load all of them
    # and ignore the fact that we're not *just* testing our own
    # Note: We could manually register/configure INSTALLED_APPS by traversing our entry points
    # or package directories, but this is easier assuming Sentry doesn't change APIs.
    # Note: Order of operations matters here.
    from sentry.runner.importer import install_plugin_apps
    install_plugin_apps('sentry.apps', settings)

    from sentry.runner.initializer import register_plugins
    register_plugins(settings)

    settings.ASANA_CLIENT_ID = 'abc'
    settings.ASANA_CLIENT_SECRET = '123'
    settings.BITBUCKET_CONSUMER_KEY = 'abc'
    settings.BITBUCKET_CONSUMER_SECRET = '123'
    settings.GITHUB_APP_ID = 'abc'
    settings.GITHUB_API_SECRET = '123'
    settings.GITHUB_APPS_APP_ID = 'abc'
    settings.GITHUB_APPS_API_SECRET = '123'
    # this isn't the real secret
    settings.SENTRY_OPTIONS['github.integration-hook-secret'
                            ] = 'b3002c3e321d4b7880360d397db2ccfd'