Exemplo n.º 1
0
 def setUp(self):
     self.setUpTestReactor()
     self.changeHook = change_hook.ChangeHookResource(
         dialects={'gitea': {
             "onlyIncludePushCommit": True
         }},
         master=fakeMasterForHooks(self))
Exemplo n.º 2
0
 def setUp(self):
     self.setUpTestReactor()
     self.changeHook = change_hook.ChangeHookResource(
         dialects={'gitea': {
             "secret": "test"
         }},
         master=fakeMasterForHooks(self))
Exemplo n.º 3
0
 def setUp(self):
     self.setUpTestReactor()
     self.changeHook = change_hook.ChangeHookResource(
         dialects={'gitea': {
             'class': self.GiteaTestHandler
         }},
         master=fakeMasterForHooks(self))
Exemplo n.º 4
0
 def setUp(self):
     self.setup_test_reactor()
     self.change_hook = change_hook.ChangeHookResource(
         dialects={'bitbucketcloud': {
                 'bitbucket_property_whitelist': ["bitbucket.*"],
         }},
         master=fakeMasterForHooks(self)
     )
Exemplo n.º 5
0
def _prepare_github_change_hook(testcase, **params):
    # License note:
    #    Copied from the original buildbot implementation with
    #    minor changes and additions.
    return ChangeHookResource(
        dialects={
            'github': params
        },
        master=fakeMasterForHooks(testcase)
    )
Exemplo n.º 6
0
    def setUp(self):

        self.master = fakeMasterForHooks(self)

        fakeStorageService = FakeSecretStorage()
        fakeStorageService.reconfigService(secretdict={"secret_key": self._SECRET})

        self.secretService = SecretManager()
        self.secretService.services = [fakeStorageService]
        self.master.addService(self.secretService)

        self.changeHook = change_hook.ChangeHookResource(
            dialects={'gitlab': {'secret': util.Secret("secret_key")}},
            master=self.master)
Exemplo n.º 7
0
    def setUp(self):
        self.setup_test_reactor()
        self.master = fakeMasterForHooks(self)

        fakeStorageService = FakeSecretStorage()
        fakeStorageService.reconfigService(secretdict={"secret_key": self._SECRET})

        self.secretService = SecretManager()
        self.secretService.services = [fakeStorageService]
        self.master.addService(self.secretService)

        self.changeHook = change_hook.ChangeHookResource(
            dialects={'gitlab': {'secret': util.Secret("secret_key")}},
            master=self.master)
    def setUp(self):
        self.request = FakeRequest()
        # Google Code simply transmit the payload as an UTF-8 JSON body
        self.request.content = StringIO.StringIO(googleCodeJsonBody)
        self.request.received_headers = {
            'Google-Code-Project-Hosting-Hook-Hmac': '85910bf93ba5c266402d9328b0c7a856',
            'Content-Length': '509',
            'Accept-Encoding': 'gzip',
            'User-Agent': 'Google Code Project Hosting (+http://code.google.com/p/support/wiki/PostCommitWebHooks)',
            'Host': 'buildbot6-lopter.dotcloud.com:19457',
            'Content-Type': 'application/json; charset=UTF-8'
        }

        self.changeHook = change_hook.ChangeHookResource(dialects={
            'googlecode': {
                'secret_key': 'FSP3p-Ghdn4T0oqX',
                'branch': 'test'
            }
        }, master=fakeMasterForHooks())
    def setUp(self):
        self.request = FakeRequest()
        # Google Code simply transmit the payload as an UTF-8 JSON body
        self.request.content = StringIO.StringIO(googleCodeJsonBody)
        self.request.received_headers = {
            'Google-Code-Project-Hosting-Hook-Hmac': '85910bf93ba5c266402d9328b0c7a856',
            'Content-Length': '509',
            'Accept-Encoding': 'gzip',
            'User-Agent': 'Google Code Project Hosting (+http://code.google.com/p/support/wiki/PostCommitWebHooks)',
            'Host': 'buildbot6-lopter.dotcloud.com:19457',
            'Content-Type': 'application/json; charset=UTF-8'
        }

        self.changeHook = change_hook.ChangeHookResource(dialects={
            'googlecode': {
                'secret_key': 'FSP3p-Ghdn4T0oqX',
                'branch': 'test'
            }
        }, master=fakeMasterForHooks())
Exemplo n.º 10
0
 def setUp(self):
     self.changeHook = change_hook.ChangeHookResource(
         dialects={'gitlab': {
             'secret': self._SECRET
         }},
         master=fakeMasterForHooks(self))
Exemplo n.º 11
0
 def setUp(self):
     dialects = {'gitorious': True}
     self.changeHook = change_hook.ChangeHookResource(
         dialects=dialects, master=fakeMasterForHooks())
Exemplo n.º 12
0
 def setUp(self):
     self.change_hook = change_hook.ChangeHookResource(
         dialects={'bitbucketcloud': {}}, master=fakeMasterForHooks(self))
Exemplo n.º 13
0
 def setUp(self):
     self.changeHook = change_hook.ChangeHookResource(dialects={'gitlab': True}, master=fakeMasterForHooks())
Exemplo n.º 14
0
def _prepare_base_change_hook():
    return ChangeHookResource(dialects={
        'base': True
    }, master=fakeMasterForHooks())
Exemplo n.º 15
0
 def setUp(self):
     self.changeHook = change_hook.ChangeHookResource(
         dialects={'gitlab': {'secret': self._SECRET}},
         master=fakeMasterForHooks())
Exemplo n.º 16
0
 def setUp(self):
     self.setUpTestReactor()
     self.change_hook = change_hook.ChangeHookResource(
         dialects={'bitbucket': True}, master=fakeMasterForHooks(self))
Exemplo n.º 17
0
def _prepare_base_change_hook(testcase, **options):
    return ChangeHookResource(dialects={'base': options},
                              master=fakeMasterForHooks(testcase))
Exemplo n.º 18
0
    def setUp(self):
        self.request = FakeRequest()
        # Google Code simply transmit the payload as an UTF-8 JSON body
        self.request.content = StringIO.StringIO(googleCodeJsonBody)
        self.request.received_headers = {
            "Google-Code-Project-Hosting-Hook-Hmac": "85910bf93ba5c266402d9328b0c7a856",
            "Content-Length": "509",
            "Accept-Encoding": "gzip",
            "User-Agent": "Google Code Project Hosting (+http://code.google.com/p/support/wiki/PostCommitWebHooks)",
            "Host": "buildbot6-lopter.dotcloud.com:19457",
            "Content-Type": "application/json; charset=UTF-8",
        }

        self.changeHook = change_hook.ChangeHookResource(
            dialects={"googlecode": {"secret_key": "FSP3p-Ghdn4T0oqX", "branch": "test"}}, master=fakeMasterForHooks()
        )
Exemplo n.º 19
0
def _prepare_base_change_hook():
    return ChangeHookResource(dialects={
        'base': True
    }, master=fakeMasterForHooks())
Exemplo n.º 20
0
 def setUp(self):
     self.changeHook = change_hook.ChangeHookResource(
         dialects={'gitlab': True}, master=fakeMasterForHooks(self))
Exemplo n.º 21
0
def _prepare_base_change_hook(**options):
    return ChangeHookResource(dialects={
        'base': options
    }, master=fakeMasterForHooks())
Exemplo n.º 22
0
 def setUp(self):
     self.setup_test_reactor()
     dialects = {'gitorious': True}
     self.changeHook = change_hook.ChangeHookResource(
         dialects=dialects, master=fakeMasterForHooks(self))
Exemplo n.º 23
0
 def setUp(self):
     self.setUpTestReactor()
     self.change_hook = change_hook.ChangeHookResource(
         dialects={'bitbucket': True}, master=fakeMasterForHooks(self))
Exemplo n.º 24
0
def _prepare_github_change_hook(**params):
    return ChangeHookResource(dialects={
        'github': params
    }, master=fakeMasterForHooks())