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
e40dd2ca
Commit
e40dd2ca
authored
Nov 16, 2021
by
David Fernandez
Committed by
Andrejs Cunskis
Nov 16, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use unique package names in QA specs
parent
43c04220
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
62 additions
and
63 deletions
+62
-63
qa/qa/fixtures/rubygems_package/mygem.gemspec
qa/qa/fixtures/rubygems_package/mygem.gemspec
+0
-39
qa/qa/specs/features/browser_ui/5_package/package_registry/conan_repository_spec.rb
...er_ui/5_package/package_registry/conan_repository_spec.rb
+1
-1
qa/qa/specs/features/browser_ui/5_package/package_registry/generic_repository_spec.rb
..._ui/5_package/package_registry/generic_repository_spec.rb
+3
-3
qa/qa/specs/features/browser_ui/5_package/package_registry/helm_registry_spec.rb
...owser_ui/5_package/package_registry/helm_registry_spec.rb
+1
-1
qa/qa/specs/features/browser_ui/5_package/package_registry/maven_gradle_repository_spec.rb
..._package/package_registry/maven_gradle_repository_spec.rb
+1
-1
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
+1
-1
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
+2
-2
qa/qa/specs/features/browser_ui/5_package/package_registry/pypi_repository_spec.rb
...ser_ui/5_package/package_registry/pypi_repository_spec.rb
+3
-3
qa/qa/specs/features/browser_ui/5_package/package_registry/rubygems_registry_spec.rb
...r_ui/5_package/package_registry/rubygems_registry_spec.rb
+50
-12
No files found.
qa/qa/fixtures/rubygems_package/mygem.gemspec
deleted
100644 → 0
View file @
43c04220
# frozen_string_literal: true
Gem
::
Specification
.
new
do
|
s
|
s
.
name
=
'mygem'
s
.
authors
=
[
'Tanuki Steve'
,
'Hal 9000'
]
s
.
author
=
'Tanuki Steve'
s
.
version
=
'0.0.1'
s
.
date
=
'2011-09-29'
s
.
summary
=
'package is the best'
s
.
files
=
[
'lib/hello_gem.rb'
]
s
.
require_paths
=
[
'lib'
]
s
.
description
=
'A test package for GitLab.'
s
.
email
=
'tanuki@not_real.com'
s
.
homepage
=
'https://gitlab.com/ruby-co/my-package'
s
.
license
=
'MIT'
s
.
metadata
=
{
'bug_tracker_uri'
=>
'https://gitlab.com/ruby-co/my-package/issues'
,
'changelog_uri'
=>
'https://gitlab.com/ruby-co/my-package/CHANGELOG.md'
,
'documentation_uri'
=>
'https://gitlab.com/ruby-co/my-package/docs'
,
'mailing_list_uri'
=>
'https://gitlab.com/ruby-co/my-package/mailme'
,
'source_code_uri'
=>
'https://gitlab.com/ruby-co/my-package'
}
s
.
bindir
=
'bin'
s
.
platform
=
Gem
::
Platform
::
RUBY
s
.
post_install_message
=
'Installed, thank you!'
s
.
rdoc_options
=
[
'--main'
]
s
.
required_ruby_version
=
'>= 2.7.0'
s
.
required_rubygems_version
=
'>= 1.8.11'
s
.
requirements
=
'A high powered server or calculator'
s
.
rubygems_version
=
'1.8.09'
s
.
add_dependency
'dependency_1'
,
'~> 1.2.3'
s
.
add_dependency
'dependency_2'
,
'3.0.0'
s
.
add_dependency
'dependency_3'
,
'>= 1.0.0'
s
.
add_dependency
'dependency_4'
end
qa/qa/specs/features/browser_ui/5_package/package_registry/conan_repository_spec.rb
View file @
e40dd2ca
...
...
@@ -17,7 +17,7 @@ module QA
let
(
:package
)
do
Resource
::
Package
.
init
do
|
package
|
package
.
name
=
'conantest'
package
.
name
=
"conantest-
#{
SecureRandom
.
hex
(
8
)
}
"
package
.
project
=
project
end
end
...
...
qa/qa/specs/features/browser_ui/5_package/package_registry/generic_repository_spec.rb
View file @
e40dd2ca
...
...
@@ -11,7 +11,7 @@ module QA
let
(
:package
)
do
Resource
::
Package
.
init
do
|
package
|
package
.
name
=
"my_package"
package
.
name
=
"my_package
-
#{
SecureRandom
.
hex
(
8
)
}
"
package
.
project
=
project
end
end
...
...
@@ -36,13 +36,13 @@ module QA
upload:
stage: upload
script:
- 'curl --header "JOB-TOKEN: $CI_JOB_TOKEN" --upload-file file.txt ${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/
my_package
/0.0.1/file.txt'
- 'curl --header "JOB-TOKEN: $CI_JOB_TOKEN" --upload-file file.txt ${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/
#{
package
.
name
}
/0.0.1/file.txt'
tags:
- "runner-for-
#{
project
.
name
}
"
download:
stage: download
script:
- 'wget --header="JOB-TOKEN: $CI_JOB_TOKEN" ${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/
my_package
/0.0.1/file.txt -O file_downloaded.txt'
- 'wget --header="JOB-TOKEN: $CI_JOB_TOKEN" ${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/
#{
package
.
name
}
/0.0.1/file.txt -O file_downloaded.txt'
tags:
- "runner-for-
#{
project
.
name
}
"
YAML
...
...
qa/qa/specs/features/browser_ui/5_package/package_registry/helm_registry_spec.rb
View file @
e40dd2ca
...
...
@@ -6,7 +6,7 @@ module QA
include
Runtime
::
Fixtures
include_context
'packages registry qa scenario'
let
(
:package_name
)
{
'gitlab_qa_helm'
}
let
(
:package_name
)
{
"gitlab_qa_helm-
#{
SecureRandom
.
hex
(
8
)
}
"
}
let
(
:package_version
)
{
'1.3.7'
}
let
(
:package_type
)
{
'helm'
}
...
...
qa/qa/specs/features/browser_ui/5_package/package_registry/maven_gradle_repository_spec.rb
View file @
e40dd2ca
...
...
@@ -8,7 +8,7 @@ module QA
include_context
'packages registry qa scenario'
let
(
:group_id
)
{
'com.gitlab.qa'
}
let
(
:artifact_id
)
{
'maven_gradle'
}
let
(
:artifact_id
)
{
"maven_gradle-
#{
SecureRandom
.
hex
(
8
)
}
"
}
let
(
:package_name
)
{
"
#{
group_id
}
/
#{
artifact_id
}
"
.
tr
(
'.'
,
'/'
)
}
let
(
:package_version
)
{
'1.3.7'
}
let
(
:package_type
)
{
'maven_gradle'
}
...
...
qa/qa/specs/features/browser_ui/5_package/package_registry/npm/npm_instance_level_spec.rb
View file @
e40dd2ca
...
...
@@ -125,7 +125,7 @@ module QA
let
(
:package
)
do
Resource
::
Package
.
init
do
|
package
|
package
.
name
=
"@
#{
registry_scope
}
/
#{
project
.
name
}
"
package
.
name
=
"@
#{
registry_scope
}
/
#{
project
.
name
}
-
#{
SecureRandom
.
hex
(
8
)
}
"
package
.
project
=
project
end
end
...
...
qa/qa/specs/features/browser_ui/5_package/package_registry/npm/npm_project_level_spec.rb
View file @
e40dd2ca
...
...
@@ -104,7 +104,7 @@ module QA
let
(
:package
)
do
Resource
::
Package
.
init
do
|
package
|
package
.
name
=
"@
#{
registry_scope
}
/mypackage"
package
.
name
=
"@
#{
registry_scope
}
/mypackage
-
#{
SecureRandom
.
hex
(
8
)
}
"
package
.
project
=
project
end
end
...
...
@@ -133,7 +133,7 @@ module QA
end
end
it
"push and pull a npm package via CI using a
#{
params
[
:token_name
]
}
"
,
quarantine:
{
issue:
'https://gitlab.com/gitlab-org/gitlab/-/issues/344537'
,
type: :investigating
}
do
it
"push and pull a npm package via CI using a
#{
params
[
:token_name
]
}
"
do
Resource
::
Repository
::
Commit
.
fabricate_via_api!
do
|
commit
|
commit
.
project
=
project
commit
.
commit_message
=
'Add .gitlab-ci.yml'
...
...
qa/qa/specs/features/browser_ui/5_package/package_registry/pypi_repository_spec.rb
View file @
e40dd2ca
...
...
@@ -12,7 +12,7 @@ module QA
let
(
:package
)
do
Resource
::
Package
.
init
do
|
package
|
package
.
name
=
'mypypipackage'
package
.
name
=
"mypypipackage-
#{
SecureRandom
.
hex
(
8
)
}
"
package
.
project
=
project
end
end
...
...
@@ -57,7 +57,7 @@ module QA
install:
stage: install
script:
- "pip install
mypypipackage
--no-deps --index-url
#{
uri
.
scheme
}
://
#{
personal_access_token
}
:
#{
personal_access_token
}
@
#{
gitlab_host_with_port
}
/api/v4/projects/${CI_PROJECT_ID}/packages/pypi/simple --trusted-host
#{
gitlab_host_with_port
}
"
- "pip install
#{
package
.
name
}
--no-deps --index-url
#{
uri
.
scheme
}
://
#{
personal_access_token
}
:
#{
personal_access_token
}
@
#{
gitlab_host_with_port
}
/api/v4/projects/${CI_PROJECT_ID}/packages/pypi/simple --trusted-host
#{
gitlab_host_with_port
}
"
tags:
- "runner-for-
#{
project
.
name
}
"
...
...
@@ -70,7 +70,7 @@ module QA
import setuptools
setuptools.setup(
name="
mypypipackage
",
name="
#{
package
.
name
}
",
version="0.0.1",
author="Example Author",
author_email="author@example.com",
...
...
qa/qa/specs/features/browser_ui/5_package/package_registry/rubygems_registry_spec.rb
View file @
e40dd2ca
...
...
@@ -13,7 +13,7 @@ module QA
let
(
:package
)
do
Resource
::
Package
.
init
do
|
package
|
package
.
name
=
'mygem'
package
.
name
=
"mygem-
#{
SecureRandom
.
hex
(
8
)
}
"
package
.
project
=
project
end
end
...
...
@@ -46,17 +46,9 @@ module QA
it
'publishes and deletes a Ruby gem'
,
testcase:
'https://gitlab.com/gitlab-org/quality/testcases/-/quality/test_cases/1906'
do
Flow
::
Login
.
sign_in
Resource
::
Repository
::
ProjectPush
.
fabricate!
do
|
push
|
push
.
project
=
project
push
.
directory
=
Pathname
.
new
(
__dir__
)
.
join
(
'../../../../../fixtures/rubygems_package'
)
push
.
commit_message
=
'RubyGems package'
end
Resource
::
Repository
::
Commit
.
fabricate_via_api!
do
|
commit
|
commit
.
project
=
project
commit
.
commit_message
=
'Add
mygem.gemspec
'
commit
.
commit_message
=
'Add
package files
'
commit
.
add_files
(
[
{
...
...
@@ -74,8 +66,8 @@ module QA
echo "
#{
gitlab_address_with_port
}
/api/v4/projects/${CI_PROJECT_ID}/packages/rubygems: '${CI_JOB_TOKEN}'" >> ~/.gem/credentials
- chmod 0600 ~/.gem/credentials
script:
- gem build
mygem
- gem push
mygem
-0.0.1.gem --host
#{
gitlab_address_with_port
}
/api/v4/projects/${CI_PROJECT_ID}/packages/rubygems
- gem build
#{
package
.
name
}
- gem push
#{
package
.
name
}
-0.0.1.gem --host
#{
gitlab_address_with_port
}
/api/v4/projects/${CI_PROJECT_ID}/packages/rubygems
tags:
- "runner-for-
#{
project
.
name
}
"
YAML
...
...
@@ -90,6 +82,52 @@ module QA
end
end
RUBY
},
{
file_path:
"
#{
package
.
name
}
.gemspec"
,
content:
<<~
RUBY
# frozen_string_literal: true
Gem::Specification.new do |s|
s.name = '
#{
package
.
name
}
'
s.authors = ['Tanuki Steve', 'Hal 9000']
s.author = 'Tanuki Steve'
s.version = '0.0.1'
s.date = '2011-09-29'
s.summary = 'this is a test package'
s.files = ['lib/hello_gem.rb']
s.require_paths = ['lib']
s.description = 'A test package for GitLab.'
s.email = 'tanuki@not_real.com'
s.homepage = 'https://gitlab.com/ruby-co/my-package'
s.license = 'MIT'
s.metadata = {
'bug_tracker_uri' => 'https://gitlab.com/ruby-co/my-package/issues',
'changelog_uri' => 'https://gitlab.com/ruby-co/my-package/CHANGELOG.md',
'documentation_uri' => 'https://gitlab.com/ruby-co/my-package/docs',
'mailing_list_uri' => 'https://gitlab.com/ruby-co/my-package/mailme',
'source_code_uri' => 'https://gitlab.com/ruby-co/my-package'
}
s.bindir = 'bin'
s.platform = Gem::Platform::RUBY
s.post_install_message = 'Installed, thank you!'
s.rdoc_options = ['--main']
s.required_ruby_version = '>= 2.7.0'
s.required_rubygems_version = '>= 1.8.11'
s.requirements = 'A high powered server or calculator'
s.rubygems_version = '1.8.09'
s.add_dependency 'dependency_1', '~> 1.2.3'
s.add_dependency 'dependency_2', '3.0.0'
s.add_dependency 'dependency_3', '>= 1.0.0'
s.add_dependency 'dependency_4'
end
RUBY
}
]
)
...
...
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