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
2bcf1ea6
Commit
2bcf1ea6
authored
Mar 28, 2019
by
GitLab Bot
Browse files
Options
Browse Files
Download
Plain Diff
Automatic merge of gitlab-org/gitlab-ce master
parents
9ad73106
7732db22
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
11 additions
and
11 deletions
+11
-11
qa/qa/runtime/api/client.rb
qa/qa/runtime/api/client.rb
+1
-1
qa/qa/runtime/env.rb
qa/qa/runtime/env.rb
+1
-1
qa/qa/tools/delete_subgroups.rb
qa/qa/tools/delete_subgroups.rb
+3
-3
qa/qa/tools/generate_perf_testdata.rb
qa/qa/tools/generate_perf_testdata.rb
+3
-3
qa/spec/runtime/env_spec.rb
qa/spec/runtime/env_spec.rb
+3
-3
No files found.
qa/qa/runtime/api/client.rb
View file @
2bcf1ea6
...
...
@@ -14,7 +14,7 @@ module QA
def
personal_access_token
@personal_access_token
||=
begin
# you can set the environment variable
PERSONAL
_ACCESS_TOKEN
# you can set the environment variable
GITLAB_QA
_ACCESS_TOKEN
# to use a specific access token rather than create one from the UI
Runtime
::
Env
.
personal_access_token
||=
create_personal_access_token
end
...
...
qa/qa/runtime/env.rb
View file @
2bcf1ea6
...
...
@@ -55,7 +55,7 @@ module QA
# specifies token that can be used for the api
def
personal_access_token
@personal_access_token
||=
ENV
[
'
PERSONAL
_ACCESS_TOKEN'
]
@personal_access_token
||=
ENV
[
'
GITLAB_QA
_ACCESS_TOKEN'
]
end
def
remote_grid
...
...
qa/qa/tools/delete_subgroups.rb
View file @
2bcf1ea6
...
...
@@ -3,7 +3,7 @@
require_relative
'../../qa'
# This script deletes all subgroups of a group specified by ENV['GROUP_NAME_OR_PATH']
# Required environment variables:
PERSONAL
_ACCESS_TOKEN and GITLAB_ADDRESS
# Required environment variables:
GITLAB_QA
_ACCESS_TOKEN and GITLAB_ADDRESS
# Optional environment variable: GROUP_NAME_OR_PATH (defaults to 'gitlab-qa-sandbox-group')
# Run `rake delete_subgroups`
...
...
@@ -14,9 +14,9 @@ module QA
def
initialize
raise
ArgumentError
,
"Please provide GITLAB_ADDRESS"
unless
ENV
[
'GITLAB_ADDRESS'
]
raise
ArgumentError
,
"Please provide
PERSONAL_ACCESS_TOKEN"
unless
ENV
[
'PERSONAL
_ACCESS_TOKEN'
]
raise
ArgumentError
,
"Please provide
GITLAB_QA_ACCESS_TOKEN"
unless
ENV
[
'GITLAB_QA
_ACCESS_TOKEN'
]
@api_client
=
Runtime
::
API
::
Client
.
new
(
ENV
[
'GITLAB_ADDRESS'
],
personal_access_token:
ENV
[
'
PERSONAL
_ACCESS_TOKEN'
])
@api_client
=
Runtime
::
API
::
Client
.
new
(
ENV
[
'GITLAB_ADDRESS'
],
personal_access_token:
ENV
[
'
GITLAB_QA
_ACCESS_TOKEN'
])
end
def
run
...
...
qa/qa/tools/generate_perf_testdata.rb
View file @
2bcf1ea6
...
...
@@ -5,7 +5,7 @@ require 'faker'
require
'yaml'
require_relative
'../../qa'
# This script generates testdata for Performance Testing.
# Required environment variables:
PERSONAL
_ACCESS_TOKEN and GITLAB_ADDRESS
# Required environment variables:
GITLAB_QA
_ACCESS_TOKEN and GITLAB_ADDRESS
# This job creates a urls.txt which contains a hash of all the URLs needed for Performance Testing
# Run `rake generate_perf_testdata`
...
...
@@ -16,9 +16,9 @@ module QA
def
initialize
raise
ArgumentError
,
"Please provide GITLAB_ADDRESS"
unless
ENV
[
'GITLAB_ADDRESS'
]
raise
ArgumentError
,
"Please provide
PERSONAL_ACCESS_TOKEN"
unless
ENV
[
'PERSONAL
_ACCESS_TOKEN'
]
raise
ArgumentError
,
"Please provide
GITLAB_QA_ACCESS_TOKEN"
unless
ENV
[
'GITLAB_QA
_ACCESS_TOKEN'
]
@api_client
=
Runtime
::
API
::
Client
.
new
(
ENV
[
'GITLAB_ADDRESS'
],
personal_access_token:
ENV
[
'
PERSONAL
_ACCESS_TOKEN'
])
@api_client
=
Runtime
::
API
::
Client
.
new
(
ENV
[
'GITLAB_ADDRESS'
],
personal_access_token:
ENV
[
'
GITLAB_QA
_ACCESS_TOKEN'
])
@group_name
=
"gitlab-qa-perf-sandbox-
#{
SecureRandom
.
hex
(
8
)
}
"
@project_name
=
"my-test-project-
#{
SecureRandom
.
hex
(
8
)
}
"
@visibility
=
"public"
...
...
qa/spec/runtime/env_spec.rb
View file @
2bcf1ea6
...
...
@@ -90,13 +90,13 @@ describe QA::Runtime::Env do
described_class
.
instance_variable_set
(
:@personal_access_token
,
nil
)
end
context
'when
PERSONAL
_ACCESS_TOKEN is set'
do
context
'when
GITLAB_QA
_ACCESS_TOKEN is set'
do
before
do
stub_env
(
'
PERSONAL_ACCESS_TOKEN'
,
'a_token
'
)
stub_env
(
'
GITLAB_QA_ACCESS_TOKEN'
,
'a_token_too
'
)
end
it
'returns specified token from env'
do
expect
(
described_class
.
personal_access_token
).
to
eq
'a_token'
expect
(
described_class
.
personal_access_token
).
to
eq
'a_token
_too
'
end
end
...
...
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