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
c467392a
Commit
c467392a
authored
Jan 21, 2021
by
Mathieu Parent
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Tidy up Debian repository specs
parent
bfe3044a
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
147 additions
and
250 deletions
+147
-250
spec/requests/api/debian_group_packages_spec.rb
spec/requests/api/debian_group_packages_spec.rb
+11
-11
spec/requests/api/debian_project_packages_spec.rb
spec/requests/api/debian_project_packages_spec.rb
+15
-15
spec/support/shared_examples/requests/api/debian_packages_shared_examples.rb
..._examples/requests/api/debian_packages_shared_examples.rb
+121
-224
No files found.
spec/requests/api/debian_group_packages_spec.rb
View file @
c467392a
...
@@ -5,35 +5,35 @@ RSpec.describe API::DebianGroupPackages do
...
@@ -5,35 +5,35 @@ RSpec.describe API::DebianGroupPackages do
include
HttpBasicAuthHelpers
include
HttpBasicAuthHelpers
include
WorkhorseHelpers
include
WorkhorseHelpers
include_context
'Debian repository shared context'
,
:group
do
include_context
'Debian repository shared context'
,
:group
,
false
do
describe
'GET groups/:id/-/packages/debian/dists/*distribution/Release.gpg'
do
describe
'GET groups/:id/-/packages/debian/dists/*distribution/Release.gpg'
do
let
(
:url
)
{
"/groups/
#{
group
.
id
}
/-/packages/debian/dists/
#{
distribution
}
/Release.gpg"
}
let
(
:url
)
{
"/groups/
#{
container
.
id
}
/-/packages/debian/dists/
#{
distribution
}
/Release.gpg"
}
it_behaves_like
'Debian
group repository GET endpoint'
,
:not_found
,
nil
it_behaves_like
'Debian
repository read endpoint'
,
'GET request'
,
:not_found
end
end
describe
'GET groups/:id/-/packages/debian/dists/*distribution/Release'
do
describe
'GET groups/:id/-/packages/debian/dists/*distribution/Release'
do
let
(
:url
)
{
"/groups/
#{
group
.
id
}
/-/packages/debian/dists/
#{
distribution
}
/Release"
}
let
(
:url
)
{
"/groups/
#{
container
.
id
}
/-/packages/debian/dists/
#{
distribution
}
/Release"
}
it_behaves_like
'Debian
group repository GET endpoin
t'
,
:success
,
'TODO Release'
it_behaves_like
'Debian
repository read endpoint'
,
'GET reques
t'
,
:success
,
'TODO Release'
end
end
describe
'GET groups/:id/-/packages/debian/dists/*distribution/InRelease'
do
describe
'GET groups/:id/-/packages/debian/dists/*distribution/InRelease'
do
let
(
:url
)
{
"/groups/
#{
group
.
id
}
/-/packages/debian/dists/
#{
distribution
}
/InRelease"
}
let
(
:url
)
{
"/groups/
#{
container
.
id
}
/-/packages/debian/dists/
#{
distribution
}
/InRelease"
}
it_behaves_like
'Debian
group repository GET endpoint'
,
:not_found
,
nil
it_behaves_like
'Debian
repository read endpoint'
,
'GET request'
,
:not_found
end
end
describe
'GET groups/:id/-/packages/debian/dists/*distribution/:component/binary-:architecture/Packages'
do
describe
'GET groups/:id/-/packages/debian/dists/*distribution/:component/binary-:architecture/Packages'
do
let
(
:url
)
{
"/groups/
#{
group
.
id
}
/-/packages/debian/dists/
#{
distribution
}
/
#{
component
}
/binary-
#{
architecture
}
/Packages"
}
let
(
:url
)
{
"/groups/
#{
container
.
id
}
/-/packages/debian/dists/
#{
distribution
}
/
#{
component
}
/binary-
#{
architecture
}
/Packages"
}
it_behaves_like
'Debian
group repository GET endpoin
t'
,
:success
,
'TODO Packages'
it_behaves_like
'Debian
repository read endpoint'
,
'GET reques
t'
,
:success
,
'TODO Packages'
end
end
describe
'GET groups/:id/-/packages/debian/pool/:component/:letter/:source_package/:file_name'
do
describe
'GET groups/:id/-/packages/debian/pool/:component/:letter/:source_package/:file_name'
do
let
(
:url
)
{
"/groups/
#{
group
.
id
}
/-/packages/debian/pool/
#{
component
}
/
#{
letter
}
/
#{
source_package
}
/
#{
package_name
}
_
#{
package_version
}
_
#{
architecture
}
.deb"
}
let
(
:url
)
{
"/groups/
#{
container
.
id
}
/-/packages/debian/pool/
#{
component
}
/
#{
letter
}
/
#{
source_package
}
/
#{
package_name
}
_
#{
package_version
}
_
#{
architecture
}
.deb"
}
it_behaves_like
'Debian
group repository GET endpoin
t'
,
:success
,
'TODO File'
it_behaves_like
'Debian
repository read endpoint'
,
'GET reques
t'
,
:success
,
'TODO File'
end
end
end
end
end
end
spec/requests/api/debian_project_packages_spec.rb
View file @
c467392a
...
@@ -5,49 +5,49 @@ RSpec.describe API::DebianProjectPackages do
...
@@ -5,49 +5,49 @@ RSpec.describe API::DebianProjectPackages do
include
HttpBasicAuthHelpers
include
HttpBasicAuthHelpers
include
WorkhorseHelpers
include
WorkhorseHelpers
include_context
'Debian repository shared context'
,
:project
do
include_context
'Debian repository shared context'
,
:project
,
true
do
describe
'GET projects/:id/packages/debian/dists/*distribution/Release.gpg'
do
describe
'GET projects/:id/packages/debian/dists/*distribution/Release.gpg'
do
let
(
:url
)
{
"/projects/
#{
project
.
id
}
/packages/debian/dists/
#{
distribution
}
/Release.gpg"
}
let
(
:url
)
{
"/projects/
#{
container
.
id
}
/packages/debian/dists/
#{
distribution
}
/Release.gpg"
}
it_behaves_like
'Debian
project repository GET endpoint'
,
:not_found
,
nil
it_behaves_like
'Debian
repository read endpoint'
,
'GET request'
,
:not_found
end
end
describe
'GET projects/:id/packages/debian/dists/*distribution/Release'
do
describe
'GET projects/:id/packages/debian/dists/*distribution/Release'
do
let
(
:url
)
{
"/projects/
#{
project
.
id
}
/packages/debian/dists/
#{
distribution
}
/Release"
}
let
(
:url
)
{
"/projects/
#{
container
.
id
}
/packages/debian/dists/
#{
distribution
}
/Release"
}
it_behaves_like
'Debian
project repository GET endpoin
t'
,
:success
,
'TODO Release'
it_behaves_like
'Debian
repository read endpoint'
,
'GET reques
t'
,
:success
,
'TODO Release'
end
end
describe
'GET projects/:id/packages/debian/dists/*distribution/InRelease'
do
describe
'GET projects/:id/packages/debian/dists/*distribution/InRelease'
do
let
(
:url
)
{
"/projects/
#{
project
.
id
}
/packages/debian/dists/
#{
distribution
}
/InRelease"
}
let
(
:url
)
{
"/projects/
#{
container
.
id
}
/packages/debian/dists/
#{
distribution
}
/InRelease"
}
it_behaves_like
'Debian
project repository GET endpoint'
,
:not_found
,
nil
it_behaves_like
'Debian
repository read endpoint'
,
'GET request'
,
:not_found
end
end
describe
'GET projects/:id/packages/debian/dists/*distribution/:component/binary-:architecture/Packages'
do
describe
'GET projects/:id/packages/debian/dists/*distribution/:component/binary-:architecture/Packages'
do
let
(
:url
)
{
"/projects/
#{
project
.
id
}
/packages/debian/dists/
#{
distribution
}
/
#{
component
}
/binary-
#{
architecture
}
/Packages"
}
let
(
:url
)
{
"/projects/
#{
container
.
id
}
/packages/debian/dists/
#{
distribution
}
/
#{
component
}
/binary-
#{
architecture
}
/Packages"
}
it_behaves_like
'Debian
project repository GET endpoin
t'
,
:success
,
'TODO Packages'
it_behaves_like
'Debian
repository read endpoint'
,
'GET reques
t'
,
:success
,
'TODO Packages'
end
end
describe
'GET projects/:id/packages/debian/pool/:component/:letter/:source_package/:file_name'
do
describe
'GET projects/:id/packages/debian/pool/:component/:letter/:source_package/:file_name'
do
let
(
:url
)
{
"/projects/
#{
project
.
id
}
/packages/debian/pool/
#{
component
}
/
#{
letter
}
/
#{
source_package
}
/
#{
package_name
}
_
#{
package_version
}
_
#{
architecture
}
.deb"
}
let
(
:url
)
{
"/projects/
#{
container
.
id
}
/packages/debian/pool/
#{
component
}
/
#{
letter
}
/
#{
source_package
}
/
#{
package_name
}
_
#{
package_version
}
_
#{
architecture
}
.deb"
}
it_behaves_like
'Debian
project repository GET endpoin
t'
,
:success
,
'TODO File'
it_behaves_like
'Debian
repository read endpoint'
,
'GET reques
t'
,
:success
,
'TODO File'
end
end
describe
'PUT projects/:id/packages/debian/:file_name'
do
describe
'PUT projects/:id/packages/debian/:file_name'
do
let
(
:method
)
{
:put
}
let
(
:method
)
{
:put
}
let
(
:url
)
{
"/projects/
#{
project
.
id
}
/packages/debian/
#{
file_name
}
"
}
let
(
:url
)
{
"/projects/
#{
container
.
id
}
/packages/debian/
#{
file_name
}
"
}
it_behaves_like
'Debian
project repository PUT endpoint'
,
:created
,
nil
it_behaves_like
'Debian
repository write endpoint'
,
'upload request'
,
:created
end
end
describe
'PUT projects/:id/packages/debian/:file_name/authorize'
do
describe
'PUT projects/:id/packages/debian/:file_name/authorize'
do
let
(
:method
)
{
:put
}
let
(
:method
)
{
:put
}
let
(
:url
)
{
"/projects/
#{
project
.
id
}
/packages/debian/
#{
file_name
}
/authorize"
}
let
(
:url
)
{
"/projects/
#{
container
.
id
}
/packages/debian/
#{
file_name
}
/authorize"
}
it_behaves_like
'Debian
project repository PUT endpoint'
,
:created
,
nil
,
is_authorize:
true
it_behaves_like
'Debian
repository write endpoint'
,
'upload authorize request'
,
:created
end
end
end
end
end
end
spec/support/shared_examples/requests/api/debian_packages_shared_examples.rb
View file @
c467392a
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