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
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Xiaowu Zhang
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
Hide 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
import
json
import
random
import
ssl
import
string
import
time
import
urllib
import
urllib2
import
requests
class
NotHttpOkException
(
Exception
):
...
...
@@ -64,14 +61,14 @@ class GitlabTestSuite(SlaprunnerTestSuite):
request_url
+=
'/'
+
path
headers
=
{
"PRIVATE-TOKEN"
:
self
.
private_token
}
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
)
elif
post_data
==
{}:
response
=
requests
.
post
(
request_url
,
params
=
param
s
,
headers
=
header
,
verify
=
False
)
response
=
requests
.
post
(
request_url
,
params
=
param
eter_dict
,
headers
=
header
s
,
verify
=
False
)
else
:
response
=
requests
.
post
(
request_url
,
params
=
param
s
,
headers
=
header
,
data
=
post_data
,
verify
=
False
)
response
=
requests
.
post
(
request_url
,
params
=
param
eter_dict
,
headers
=
header
s
,
data
=
post_data
,
verify
=
False
)
if
not
response
.
ok
:
raise
Exception
(
"ERROR connecting to Gitlab: %s: %s
\
n
%s"
%
(
response
.
status_code
,
response
.
reason
,
response
.
text
))
...
...
@@ -79,8 +76,8 @@ class GitlabTestSuite(SlaprunnerTestSuite):
def
_createNewProject
(
self
,
name
,
namespace
=
'open'
):
uri
=
'api/v3/projects'
param
am
eter_dict
=
{
'name'
:
name
,
'namespace'
:
namespace
}
return
self
.
_connectToGitlab
(
uri
,
post_data
=
{},
parameter_dict
=
param
s
)
parameter_dict
=
{
'name'
:
name
,
'namespace'
:
namespace
}
return
self
.
_connectToGitlab
(
uri
,
post_data
=
{},
parameter_dict
=
param
eter_dict
)
def
_listProjects
(
self
):
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