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
Léo-Paul Géneau
gitlab-ce
Commits
50893887
Commit
50893887
authored
Feb 28, 2018
by
Micaël Bergeron
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
remove the license check
parent
d59210de
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
0 additions
and
76 deletions
+0
-76
spec/models/lfs_object_spec.rb
spec/models/lfs_object_spec.rb
+0
-25
spec/uploaders/object_storage_spec.rb
spec/uploaders/object_storage_spec.rb
+0
-51
No files found.
spec/models/lfs_object_spec.rb
View file @
50893887
...
@@ -21,19 +21,6 @@ describe LfsObject do
...
@@ -21,19 +21,6 @@ describe LfsObject do
end
end
end
end
describe
'#destroy'
do
subject
{
create
(
:lfs_object
,
:with_file
)
}
context
'when running in a Geo primary node'
do
set
(
:primary
)
{
create
(
:geo_node
,
:primary
)
}
set
(
:secondary
)
{
create
(
:geo_node
)
}
it
'logs an event to the Geo event log'
do
expect
{
subject
.
destroy
}.
to
change
(
Geo
::
LfsObjectDeletedEvent
,
:count
).
by
(
1
)
end
end
end
describe
'#schedule_background_upload'
do
describe
'#schedule_background_upload'
do
before
do
before
do
stub_lfs_setting
(
enabled:
true
)
stub_lfs_setting
(
enabled:
true
)
...
@@ -80,18 +67,6 @@ describe LfsObject do
...
@@ -80,18 +67,6 @@ describe LfsObject do
lfs_object
.
save!
lfs_object
.
save!
end
end
end
end
context
'when is unlicensed'
do
before
do
stub_lfs_object_storage
(
background_upload:
true
,
licensed:
false
)
end
it
'does not schedule the migration'
do
expect
(
ObjectStorage
::
BackgroundMoveWorker
).
not_to
receive
(
:perform_async
)
subject
end
end
end
end
context
'when background upload is disabled'
do
context
'when background upload is disabled'
do
...
...
spec/uploaders/object_storage_spec.rb
View file @
50893887
...
@@ -258,16 +258,6 @@ describe ObjectStorage do
...
@@ -258,16 +258,6 @@ describe ObjectStorage do
end
end
end
end
context
'when storage is unlicensed'
do
before
do
stub_artifacts_object_storage
(
licensed:
false
)
end
it
"raises an error"
do
expect
{
subject
}.
to
raise_error
(
/Object Storage feature is missing/
)
end
end
context
'when credentials are set'
do
context
'when credentials are set'
do
before
do
before
do
stub_artifacts_object_storage
stub_artifacts_object_storage
...
@@ -333,45 +323,4 @@ describe ObjectStorage do
...
@@ -333,45 +323,4 @@ describe ObjectStorage do
it
{
is_expected
.
to
eq
(
false
)
}
it
{
is_expected
.
to
eq
(
false
)
}
end
end
describe
'#verify_license!'
do
subject
{
uploader
.
verify_license!
(
nil
)
}
context
'when using local storage'
do
before
do
expect
(
object
).
to
receive
(
:file_store
)
{
described_class
::
Store
::
LOCAL
}
end
it
"does not raise an error"
do
expect
{
subject
}.
not_to
raise_error
end
end
context
'when using remote storage'
do
before
do
uploader_class
.
storage_options
double
(
object_store:
double
(
enabled:
true
))
expect
(
object
).
to
receive
(
:file_store
)
{
described_class
::
Store
::
REMOTE
}
end
context
'feature is not available'
do
before
do
expect
(
License
).
to
receive
(
:feature_available?
).
with
(
:object_storage
).
and_return
(
false
)
end
it
"does raise an error"
do
expect
{
subject
}.
to
raise_error
(
/Object Storage feature is missing/
)
end
end
context
'feature is available'
do
before
do
expect
(
License
).
to
receive
(
:feature_available?
).
with
(
:object_storage
).
and_return
(
true
)
end
it
"does not raise an error"
do
expect
{
subject
}.
not_to
raise_error
end
end
end
end
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