Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
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
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
4fad0ace
Commit
4fad0ace
authored
6 years ago
by
Sanad Liaquat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use RestClient with verify_ssl: false in api_fabricator
parent
4b2569cb
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
100 additions
and
101 deletions
+100
-101
qa/qa/resource/api_fabricator.rb
qa/qa/resource/api_fabricator.rb
+9
-7
qa/qa/resource/base.rb
qa/qa/resource/base.rb
+1
-0
qa/qa/specs/features/browser_ui/1_manage/ee_group/group_ldap_sync_spec.rb
...ures/browser_ui/1_manage/ee_group/group_ldap_sync_spec.rb
+90
-94
No files found.
qa/qa/resource/api_fabricator.rb
View file @
4fad0ace
# frozen_string_literal: true
require
'airborne'
require
'active_support/core_ext/object/deep_dup'
require
'capybara/dsl'
module
QA
module
Resource
module
ApiFabricator
include
Airborne
include
Capybara
::
DSL
HTTP_STATUS_OK
=
200
...
...
@@ -56,8 +54,10 @@ module QA
end
def
api_get_from
(
get_path
)
url
=
Runtime
::
API
::
Request
.
new
(
api_client
,
get_path
).
url
response
=
get
(
url
)
response
=
RestClient
::
Request
.
execute
(
method: :get
,
url:
Runtime
::
API
::
Request
.
new
(
api_client
,
get_path
).
url
,
verify_ssl:
false
)
unless
response
.
code
==
HTTP_STATUS_OK
raise
ResourceNotFoundError
,
"Resource at
#{
url
}
could not be found (
#{
response
.
code
}
): `
#{
response
}
`."
...
...
@@ -67,9 +67,11 @@ module QA
end
def
api_post
response
=
post
(
Runtime
::
API
::
Request
.
new
(
api_client
,
api_post_path
).
url
,
api_post_body
)
response
=
RestClient
::
Request
.
execute
(
method: :post
,
url:
Runtime
::
API
::
Request
.
new
(
api_client
,
api_post_path
).
url
,
payload:
api_post_body
,
verify_ssl:
false
)
unless
response
.
code
==
HTTP_STATUS_CREATED
raise
ResourceFabricationFailedError
,
"Fabrication of
#{
self
.
class
.
name
}
using the API failed (
#{
response
.
code
}
) with `
#{
response
}
`."
...
...
This diff is collapsed.
Click to expand it.
qa/qa/resource/base.rb
View file @
4fad0ace
...
...
@@ -2,6 +2,7 @@
require
'forwardable'
require
'capybara/dsl'
require
'active_support/core_ext/array/extract_options'
module
QA
module
Resource
...
...
This diff is collapsed.
Click to expand it.
qa/qa/specs/features/browser_ui/1_manage/ee_group/group_ldap_sync_spec.rb
View file @
4fad0ace
# frozen_string_literal: true
module
QA
context
'Manage'
do
context
'Manage'
,
:orchestrated
,
:ldap_tls
,
:ldap_no_tls
do
it
'Has LDAP user synced using group cn method'
do
users
=
[
...
...
@@ -85,8 +84,6 @@ module QA
resource
.
provider
=
user
[
:provider
]
end
end
end
def
create_sandbox_group_with_user
(
user:
nil
,
group_name:
nil
)
...
...
@@ -113,5 +110,4 @@ module QA
end
end
end
end
end
This diff is collapsed.
Click to expand it.
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