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
0
Merge Requests
0
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
Jérome Perrin
gitlab-ce
Commits
7ada193e
Commit
7ada193e
authored
Mar 24, 2017
by
Grzegorz Bizon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix specs for container repository destroy service
parent
dce706bf
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
2 deletions
+6
-2
spec/features/container_registry_spec.rb
spec/features/container_registry_spec.rb
+0
-1
spec/services/container_images/destroy_service_spec.rb
spec/services/container_images/destroy_service_spec.rb
+4
-0
spec/support/stub_gitlab_calls.rb
spec/support/stub_gitlab_calls.rb
+2
-1
No files found.
spec/features/container_registry_spec.rb
View file @
7ada193e
...
...
@@ -14,7 +14,6 @@ describe "Container Registry" do
stub_container_registry_config
(
enabled:
true
)
stub_container_registry_tags
(
*
tags
)
project
.
container_repositories
<<
container_repository
unless
container_repository
.
nil?
allow
(
Auth
::
ContainerRegistryAuthenticationService
).
to
receive
(
:full_access_token
).
and_return
(
'token'
)
end
describe
'GET /:project/container_registry'
do
...
...
spec/services/container_images/destroy_service_spec.rb
View file @
7ada193e
...
...
@@ -13,6 +13,10 @@ describe ContainerImages::DestroyService, '#execute', :services do
container_repositories:
[
container_repository
])
end
before
do
stub_container_registry_config
(
enabled:
true
)
end
it
{
expect
(
container_repository
).
to
be_valid
}
it
{
expect
(
project
.
container_repositories
).
not_to
be_empty
}
...
...
spec/support/stub_gitlab_calls.rb
View file @
7ada193e
...
...
@@ -27,7 +27,8 @@ module StubGitlabCalls
def
stub_container_registry_config
(
registry_settings
)
allow
(
Gitlab
.
config
.
registry
).
to
receive_messages
(
registry_settings
)
allow
(
Auth
::
ContainerRegistryAuthenticationService
).
to
receive
(
:full_access_token
).
and_return
(
'token'
)
allow
(
Auth
::
ContainerRegistryAuthenticationService
)
.
to
receive
(
:full_access_token
).
and_return
(
'token'
)
end
def
stub_container_registry_tags
(
*
tags
)
...
...
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