Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos.toolbox
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
6
Merge Requests
6
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
slapos.toolbox
Commits
d1ed4bf0
Commit
d1ed4bf0
authored
May 17, 2017
by
Rafael Monnerat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
resiliencytests/gitlab: Fix several typos.
parent
a8cef189
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
10 deletions
+7
-10
slapos/resiliencytest/suites/gitlab.py
slapos/resiliencytest/suites/gitlab.py
+7
-10
No files found.
slapos/resiliencytest/suites/gitlab.py
View file @
d1ed4bf0
...
@@ -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
=
param
s
,
response
=
requests
.
get
(
request_url
,
params
=
param
eter_dict
,
headers
=
headers
,
verify
=
False
)
headers
=
headers
,
verify
=
False
)
elif
post_data
==
{}:
elif
post_data
==
{}:
response
=
requests
.
post
(
request_url
,
params
=
param
s
,
response
=
requests
.
post
(
request_url
,
params
=
param
eter_dict
,
headers
=
header
,
verify
=
False
)
headers
=
header
s
,
verify
=
False
)
else
:
else
:
response
=
requests
.
post
(
request_url
,
params
=
param
s
,
response
=
requests
.
post
(
request_url
,
params
=
param
eter_dict
,
headers
=
header
,
data
=
post_data
,
verify
=
False
)
headers
=
header
s
,
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'
param
am
eter_dict
=
{
'name'
:
name
,
'namespace'
:
namespace
}
parameter_dict
=
{
'name'
:
name
,
'namespace'
:
namespace
}
return
self
.
_connectToGitlab
(
uri
,
post_data
=
{},
parameter_dict
=
param
s
)
return
self
.
_connectToGitlab
(
uri
,
post_data
=
{},
parameter_dict
=
param
eter_dict
)
def
_listProjects
(
self
):
def
_listProjects
(
self
):
path
=
'api/v3/projects'
path
=
'api/v3/projects'
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment