Commit d1ed4bf0 authored by Rafael Monnerat's avatar Rafael Monnerat

resiliencytests/gitlab: Fix several typos.

parent a8cef189
...@@ -30,11 +30,8 @@ from .slaprunner import SlaprunnerTestSuite ...@@ -30,11 +30,8 @@ from .slaprunner import SlaprunnerTestSuite
import json import json
import random import random
import ssl
import string import string
import time import time
import urllib
import urllib2
import requests import requests
class NotHttpOkException(Exception): class NotHttpOkException(Exception):
...@@ -64,14 +61,14 @@ class GitlabTestSuite(SlaprunnerTestSuite): ...@@ -64,14 +61,14 @@ class GitlabTestSuite(SlaprunnerTestSuite):
request_url += '/' + path request_url += '/' + path
headers = {"PRIVATE-TOKEN" : self.private_token} headers = {"PRIVATE-TOKEN" : self.private_token}
if post_data is None: if post_data is None:
response = requests.get(request_url, params=params, response = requests.get(request_url, params=parameter_dict,
headers=headers, verify=False) headers=headers, verify=False)
elif post_data == {}: elif post_data == {}:
response = requests.post(request_url, params=params, response = requests.post(request_url, params=parameter_dict,
headers=header, verify=False) headers=headers, verify=False)
else: else:
response = requests.post(request_url, params=params, response = requests.post(request_url, params=parameter_dict,
headers=header, data=post_data, verify=False) headers=headers, data=post_data, verify=False)
if not response.ok: if not response.ok:
raise Exception("ERROR connecting to Gitlab: %s: %s \n%s" % ( raise Exception("ERROR connecting to Gitlab: %s: %s \n%s" % (
response.status_code, response.reason, response.text)) response.status_code, response.reason, response.text))
...@@ -79,8 +76,8 @@ class GitlabTestSuite(SlaprunnerTestSuite): ...@@ -79,8 +76,8 @@ class GitlabTestSuite(SlaprunnerTestSuite):
def _createNewProject(self, name, namespace='open'): def _createNewProject(self, name, namespace='open'):
uri = 'api/v3/projects' uri = 'api/v3/projects'
paramameter_dict = {'name': name, 'namespace': namespace} parameter_dict = {'name': name, 'namespace': namespace}
return self._connectToGitlab(uri, post_data={}, parameter_dict=params) return self._connectToGitlab(uri, post_data={}, parameter_dict=parameter_dict)
def _listProjects(self): def _listProjects(self):
path = 'api/v3/projects' path = 'api/v3/projects'
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment