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
9948be54
Commit
9948be54
authored
Feb 02, 2022
by
Desiree Chevalier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add test case links to some parameterized e2e specs
parent
164d66e0
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
103 additions
and
95 deletions
+103
-95
qa/qa/specs/features/browser_ui/5_package/dependency_proxy/dependency_proxy_spec.rb
...er_ui/5_package/dependency_proxy/dependency_proxy_spec.rb
+7
-4
qa/qa/specs/features/browser_ui/5_package/package_registry/helm_registry_spec.rb
...owser_ui/5_package/package_registry/helm_registry_spec.rb
+81
-76
qa/qa/specs/features/browser_ui/5_package/package_registry/npm/npm_instance_level_spec.rb
...5_package/package_registry/npm/npm_instance_level_spec.rb
+5
-5
qa/qa/specs/features/browser_ui/5_package/package_registry/npm/npm_project_level_spec.rb
.../5_package/package_registry/npm/npm_project_level_spec.rb
+5
-5
qa/qa/specs/features/browser_ui/5_package/package_registry/nuget_repository_spec.rb
...er_ui/5_package/package_registry/nuget_repository_spec.rb
+5
-5
No files found.
qa/qa/specs/features/browser_ui/5_package/dependency_proxy/dependency_proxy_spec.rb
View file @
9948be54
...
@@ -3,6 +3,8 @@
...
@@ -3,6 +3,8 @@
module
QA
module
QA
RSpec
.
describe
'Package'
,
:orchestrated
,
:registry
,
only:
{
pipeline: :main
}
do
RSpec
.
describe
'Package'
,
:orchestrated
,
:registry
,
only:
{
pipeline: :main
}
do
describe
'Dependency Proxy'
do
describe
'Dependency Proxy'
do
using
RSpec
::
Parameterized
::
TableSyntax
let
(
:project
)
do
let
(
:project
)
do
Resource
::
Project
.
fabricate_via_api!
do
|
project
|
Resource
::
Project
.
fabricate_via_api!
do
|
project
|
project
.
name
=
'dependency-proxy-project'
project
.
name
=
'dependency-proxy-project'
...
@@ -40,12 +42,13 @@ module QA
...
@@ -40,12 +42,13 @@ module QA
runner
.
remove_via_api!
runner
.
remove_via_api!
end
end
where
(
:docker_client_version
)
do
where
(
:case_name
,
:docker_client_version
,
:testcase
)
do
%w[docker:19.03.12 docker:20.10]
'using docker:19.03.12'
|
'docker:19.03.12'
|
'https://gitlab.com/gitlab-org/gitlab/-/quality/test_cases/347605'
'using docker:20.10'
|
'docker:20.10'
|
'https://gitlab.com/gitlab-org/gitlab/-/quality/test_cases/347604'
end
end
with_them
do
with_them
do
it
"pulls an image using the dependency proxy"
do
it
"pulls an image using the dependency proxy"
,
testcase:
params
[
:testcase
]
do
Support
::
Retrier
.
retry_on_exception
(
max_attempts:
3
,
sleep_interval:
2
)
do
Support
::
Retrier
.
retry_on_exception
(
max_attempts:
3
,
sleep_interval:
2
)
do
Resource
::
Repository
::
Commit
.
fabricate_via_api!
do
|
commit
|
Resource
::
Repository
::
Commit
.
fabricate_via_api!
do
|
commit
|
commit
.
project
=
project
commit
.
project
=
project
...
@@ -58,7 +61,7 @@ module QA
...
@@ -58,7 +61,7 @@ module QA
image: "
#{
docker_client_version
}
"
image: "
#{
docker_client_version
}
"
services:
services:
- name: "
#{
docker_client_version
}
-dind"
- name: "
#{
docker_client_version
}
-dind"
command: ["--insecure-registry=gitlab.test:80"]
command: ["--insecure-registry=gitlab.test:80"]
before_script:
before_script:
- apk add curl jq grep
- apk add curl jq grep
- echo $CI_DEPENDENCY_PROXY_SERVER
- echo $CI_DEPENDENCY_PROXY_SERVER
...
...
qa/qa/specs/features/browser_ui/5_package/package_registry/helm_registry_spec.rb
View file @
9948be54
...
@@ -3,6 +3,7 @@
...
@@ -3,6 +3,7 @@
module
QA
module
QA
RSpec
.
describe
'Package'
,
:orchestrated
,
:packages
,
:object_storage
do
RSpec
.
describe
'Package'
,
:orchestrated
,
:packages
,
:object_storage
do
describe
'Helm Registry'
do
describe
'Helm Registry'
do
using
RSpec
::
Parameterized
::
TableSyntax
include
Runtime
::
Fixtures
include
Runtime
::
Fixtures
include_context
'packages registry qa scenario'
include_context
'packages registry qa scenario'
...
@@ -10,101 +11,105 @@ module QA
...
@@ -10,101 +11,105 @@ module QA
let
(
:package_version
)
{
'1.3.7'
}
let
(
:package_version
)
{
'1.3.7'
}
let
(
:package_type
)
{
'helm'
}
let
(
:package_type
)
{
'helm'
}
%i[personal_access_token ci_job_token project_deploy_token]
.
each
do
|
authentication_token_type
|
where
(
:case_name
,
:authentication_token_type
,
:testcase
)
do
context
"using a
#{
authentication_token_type
}
"
do
'using personal access token'
|
:personal_access_token
|
'https://gitlab.com/gitlab-org/gitlab/-/quality/test_cases/347586'
let
(
:username
)
do
'using ci job token'
|
:ci_job_token
|
'https://gitlab.com/gitlab-org/gitlab/-/quality/test_cases/347587'
case
authentication_token_type
'using project deploy token'
|
:project_deploy_token
|
'https://gitlab.com/gitlab-org/gitlab/-/quality/test_cases/347588'
when
:personal_access_token
end
Runtime
::
User
.
username
when
:ci_job_token
with_them
do
'gitlab-ci-token'
let
(
:username
)
do
when
:project_deploy_token
case
authentication_token_type
project_deploy_token
.
username
when
:personal_access_token
end
Runtime
::
User
.
username
when
:ci_job_token
'gitlab-ci-token'
when
:project_deploy_token
project_deploy_token
.
username
end
end
end
let
(
:access_token
)
do
let
(
:access_token
)
do
case
authentication_token_type
case
authentication_token_type
when
:personal_access_token
when
:personal_access_token
personal_access_token
personal_access_token
when
:ci_job_token
when
:ci_job_token
'${CI_JOB_TOKEN}'
'${CI_JOB_TOKEN}'
when
:project_deploy_token
when
:project_deploy_token
project_deploy_token
.
token
project_deploy_token
.
token
end
end
end
end
it
"pushes and pulls a helm chart"
do
it
"pushes and pulls a helm chart"
,
testcase:
params
[
:testcase
]
do
Support
::
Retrier
.
retry_on_exception
(
max_attempts:
3
,
sleep_interval:
2
)
do
Support
::
Retrier
.
retry_on_exception
(
max_attempts:
3
,
sleep_interval:
2
)
do
Resource
::
Repository
::
Commit
.
fabricate_via_api!
do
|
commit
|
Resource
::
Repository
::
Commit
.
fabricate_via_api!
do
|
commit
|
helm_upload_yaml
=
ERB
.
new
(
read_fixture
(
'package_managers/helm'
,
'helm_upload_package.yaml.erb'
)).
result
(
binding
)
helm_upload_yaml
=
ERB
.
new
(
read_fixture
(
'package_managers/helm'
,
'helm_upload_package.yaml.erb'
)).
result
(
binding
)
helm_chart_yaml
=
ERB
.
new
(
read_fixture
(
'package_managers/helm'
,
'Chart.yaml.erb'
)).
result
(
binding
)
helm_chart_yaml
=
ERB
.
new
(
read_fixture
(
'package_managers/helm'
,
'Chart.yaml.erb'
)).
result
(
binding
)
commit
.
project
=
package_project
commit
.
project
=
package_project
commit
.
commit_message
=
'Add .gitlab-ci.yml'
commit
.
commit_message
=
'Add .gitlab-ci.yml'
commit
.
add_files
([
commit
.
add_files
([
{
{
file_path:
'.gitlab-ci.yml'
,
file_path:
'.gitlab-ci.yml'
,
content:
helm_upload_yaml
content:
helm_upload_yaml
},
},
{
{
file_path:
'Chart.yaml'
,
file_path:
'Chart.yaml'
,
content:
helm_chart_yaml
content:
helm_chart_yaml
}
}
])
])
end
end
end
end
package_project
.
visit!
package_project
.
visit!
Flow
::
Pipeline
.
visit_latest_pipeline
Flow
::
Pipeline
.
visit_latest_pipeline
Page
::
Project
::
Pipeline
::
Show
.
perform
do
|
pipeline
|
Page
::
Project
::
Pipeline
::
Show
.
perform
do
|
pipeline
|
pipeline
.
click_job
(
'deploy'
)
pipeline
.
click_job
(
'deploy'
)
end
end
Page
::
Project
::
Job
::
Show
.
perform
do
|
job
|
Page
::
Project
::
Job
::
Show
.
perform
do
|
job
|
expect
(
job
).
to
be_successful
(
timeout:
800
)
expect
(
job
).
to
be_successful
(
timeout:
800
)
end
end
Page
::
Project
::
Menu
.
perform
(
&
:click_packages_link
)
Page
::
Project
::
Menu
.
perform
(
&
:click_packages_link
)
Page
::
Project
::
Packages
::
Index
.
perform
do
|
index
|
Page
::
Project
::
Packages
::
Index
.
perform
do
|
index
|
expect
(
index
).
to
have_package
(
package_name
)
expect
(
index
).
to
have_package
(
package_name
)
index
.
click_package
(
package_name
)
index
.
click_package
(
package_name
)
end
end
Page
::
Project
::
Packages
::
Show
.
perform
do
|
show
|
Page
::
Project
::
Packages
::
Show
.
perform
do
|
show
|
expect
(
show
).
to
have_package_info
(
package_name
,
package_version
)
expect
(
show
).
to
have_package_info
(
package_name
,
package_version
)
end
end
Support
::
Retrier
.
retry_on_exception
(
max_attempts:
3
,
sleep_interval:
2
)
do
Support
::
Retrier
.
retry_on_exception
(
max_attempts:
3
,
sleep_interval:
2
)
do
Resource
::
Repository
::
Commit
.
fabricate_via_api!
do
|
commit
|
Resource
::
Repository
::
Commit
.
fabricate_via_api!
do
|
commit
|
helm_install_yaml
=
ERB
.
new
(
read_fixture
(
'package_managers/helm'
,
'helm_install_package.yaml.erb'
)).
result
(
binding
)
helm_install_yaml
=
ERB
.
new
(
read_fixture
(
'package_managers/helm'
,
'helm_install_package.yaml.erb'
)).
result
(
binding
)
commit
.
project
=
client_project
commit
.
project
=
client_project
commit
.
commit_message
=
'Add .gitlab-ci.yml'
commit
.
commit_message
=
'Add .gitlab-ci.yml'
commit
.
add_files
([
commit
.
add_files
([
{
{
file_path:
'.gitlab-ci.yml'
,
file_path:
'.gitlab-ci.yml'
,
content:
helm_install_yaml
content:
helm_install_yaml
}
}
])
])
end
end
end
end
client_project
.
visit!
client_project
.
visit!
Flow
::
Pipeline
.
visit_latest_pipeline
Flow
::
Pipeline
.
visit_latest_pipeline
Page
::
Project
::
Pipeline
::
Show
.
perform
do
|
pipeline
|
Page
::
Project
::
Pipeline
::
Show
.
perform
do
|
pipeline
|
pipeline
.
click_job
(
'pull'
)
pipeline
.
click_job
(
'pull'
)
end
end
Page
::
Project
::
Job
::
Show
.
perform
do
|
job
|
Page
::
Project
::
Job
::
Show
.
perform
do
|
job
|
expect
(
job
).
to
be_successful
(
timeout:
800
)
expect
(
job
).
to
be_successful
(
timeout:
800
)
end
end
end
end
end
end
end
...
...
qa/qa/specs/features/browser_ui/5_package/package_registry/npm/npm_instance_level_spec.rb
View file @
9948be54
...
@@ -68,10 +68,10 @@ module QA
...
@@ -68,10 +68,10 @@ module QA
another_project
.
remove_via_api!
another_project
.
remove_via_api!
end
end
where
(
:
authentication_token_type
,
:token_nam
e
)
do
where
(
:
case_name
,
:authentication_token_type
,
:token_name
,
:testcas
e
)
do
:personal_access_token
|
'Personal Access Token
'
'using personal access token'
|
:personal_access_token
|
'Personal Access Token'
|
'https://gitlab.com/gitlab-org/gitlab/-/quality/test_cases/347600
'
:ci_job_token
|
'CI Job Token
'
'using ci job token'
|
:ci_job_token
|
'CI Job Token'
|
'https://gitlab.com/gitlab-org/gitlab/-/quality/test_cases/347599
'
:project_deploy_token
|
'Deploy Token
'
'using project deploy token'
|
:project_deploy_token
|
'Deploy Token'
|
'https://gitlab.com/gitlab-org/gitlab/-/quality/test_cases/347598
'
end
end
with_them
do
with_them
do
...
@@ -86,7 +86,7 @@ module QA
...
@@ -86,7 +86,7 @@ module QA
end
end
end
end
it
"push and pull a npm package via CI using a
#{
params
[
:token_name
]
}
"
do
it
'push and pull a npm package via CI'
,
testcase:
params
[
:testcase
]
do
Support
::
Retrier
.
retry_on_exception
(
max_attempts:
3
,
sleep_interval:
2
)
do
Support
::
Retrier
.
retry_on_exception
(
max_attempts:
3
,
sleep_interval:
2
)
do
npm_upload_yaml
=
ERB
.
new
(
read_fixture
(
'package_managers/npm'
,
'npm_upload_package_instance.yaml.erb'
)).
result
(
binding
)
npm_upload_yaml
=
ERB
.
new
(
read_fixture
(
'package_managers/npm'
,
'npm_upload_package_instance.yaml.erb'
)).
result
(
binding
)
package_json
=
ERB
.
new
(
read_fixture
(
'package_managers/npm'
,
'package_instance.json.erb'
)).
result
(
binding
)
package_json
=
ERB
.
new
(
read_fixture
(
'package_managers/npm'
,
'package_instance.json.erb'
)).
result
(
binding
)
...
...
qa/qa/specs/features/browser_ui/5_package/package_registry/npm/npm_project_level_spec.rb
View file @
9948be54
...
@@ -59,10 +59,10 @@ module QA
...
@@ -59,10 +59,10 @@ module QA
project
.
remove_via_api!
project
.
remove_via_api!
end
end
where
(
:
authentication_token_type
,
:token_nam
e
)
do
where
(
:
case_name
,
:authentication_token_type
,
:token_name
,
:testcas
e
)
do
:personal_access_token
|
'Personal Access Token
'
'using personal access token'
|
:personal_access_token
|
'Personal Access Token'
|
'https://gitlab.com/gitlab-org/gitlab/-/quality/test_cases/347592
'
:ci_job_token
|
'CI Job Token
'
'using ci job token'
|
:ci_job_token
|
'CI Job Token'
|
'https://gitlab.com/gitlab-org/gitlab/-/quality/test_cases/347594
'
:project_deploy_token
|
'Deploy Token
'
'using project deploy token'
|
:project_deploy_token
|
'Deploy Token'
|
'https://gitlab.com/gitlab-org/gitlab/-/quality/test_cases/347593
'
end
end
with_them
do
with_them
do
...
@@ -77,7 +77,7 @@ module QA
...
@@ -77,7 +77,7 @@ module QA
end
end
end
end
it
"push and pull a npm package via CI using a
#{
params
[
:token_name
]
}
"
do
it
'push and pull a npm package via CI'
,
testcase:
params
[
:testcase
]
do
Resource
::
Repository
::
Commit
.
fabricate_via_api!
do
|
commit
|
Resource
::
Repository
::
Commit
.
fabricate_via_api!
do
|
commit
|
npm_upload_install_yaml
=
ERB
.
new
(
read_fixture
(
'package_managers/npm'
,
'npm_upload_install_package_project.yaml.erb'
)).
result
(
binding
)
npm_upload_install_yaml
=
ERB
.
new
(
read_fixture
(
'package_managers/npm'
,
'npm_upload_install_package_project.yaml.erb'
)).
result
(
binding
)
package_json
=
ERB
.
new
(
read_fixture
(
'package_managers/npm'
,
'package_project.json.erb'
)).
result
(
binding
)
package_json
=
ERB
.
new
(
read_fixture
(
'package_managers/npm'
,
'package_project.json.erb'
)).
result
(
binding
)
...
...
qa/qa/specs/features/browser_ui/5_package/package_registry/nuget_repository_spec.rb
View file @
9948be54
...
@@ -63,10 +63,10 @@ module QA
...
@@ -63,10 +63,10 @@ module QA
package
.
remove_via_api!
package
.
remove_via_api!
end
end
where
(
:
authentication_token_type
,
:token_nam
e
)
do
where
(
:
case_name
,
:authentication_token_type
,
:token_name
,
:testcas
e
)
do
:personal_access_token
|
'Personal Access Token
'
'using personal access token'
|
:personal_access_token
|
'Personal Access Token'
|
'https://gitlab.com/gitlab-org/gitlab/-/quality/test_cases/347597
'
:ci_job_token
|
'CI Job Token
'
'using ci job token'
|
:ci_job_token
|
'CI Job Token'
|
'https://gitlab.com/gitlab-org/gitlab/-/quality/test_cases/347595
'
:group_deploy_token
|
'Deploy Token
'
'using group deploy token'
|
:group_deploy_token
|
'Deploy Token'
|
'https://gitlab.com/gitlab-org/gitlab/-/quality/test_cases/347596
'
end
end
with_them
do
with_them
do
...
@@ -92,7 +92,7 @@ module QA
...
@@ -92,7 +92,7 @@ module QA
end
end
end
end
it
"publishes a nuget package at the project level, installs and deletes it at the group level using a
#{
params
[
:token_name
]
}
"
do
it
'publishes a nuget package at the project level, installs and deletes it at the group level'
,
testcase:
params
[
:testcase
]
do
Flow
::
Login
.
sign_in
Flow
::
Login
.
sign_in
Support
::
Retrier
.
retry_on_exception
(
max_attempts:
3
,
sleep_interval:
2
)
do
Support
::
Retrier
.
retry_on_exception
(
max_attempts:
3
,
sleep_interval:
2
)
do
...
...
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