BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
912613c4
Commit
912613c4
authored
Jun 30, 2017
by
Michael Kozono
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Reduce 28 test runs to 4
14 to 2, but these shared examples are used twice. This was already done in another context further down the file.
parent
53c409cb
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
16 deletions
+20
-16
fs_shards_check_spec.rb
spec/lib/gitlab/health_checks/fs_shards_check_spec.rb
+20
-16
No files found.
spec/lib/gitlab/health_checks/fs_shards_check_spec.rb
View file @
912613c4
...
...
@@ -103,30 +103,34 @@ describe Gitlab::HealthChecks::FsShardsCheck do
example
.
run_with_retry
retry:
times_to_try
end
it
{
is_expected
.
to
all
(
have_attributes
(
labels:
{
shard: :default
}))
}
it
{
is_expected
.
to
include
(
an_object_having_attributes
(
name: :filesystem_accessible
,
value:
0
))
}
it
{
is_expected
.
to
include
(
an_object_having_attributes
(
name: :filesystem_readable
,
value:
0
))
}
it
{
is_expected
.
to
include
(
an_object_having_attributes
(
name: :filesystem_writable
,
value:
0
))
}
it
{
is_expected
.
to
include
(
an_object_having_attributes
(
name: :filesystem_access_latency
,
value:
be
>=
0
))
}
it
{
is_expected
.
to
include
(
an_object_having_attributes
(
name: :filesystem_read_latency
,
value:
be
>=
0
))
}
it
{
is_expected
.
to
include
(
an_object_having_attributes
(
name: :filesystem_write_latency
,
value:
be
>=
0
))
}
it
'provides metrics'
do
expect
(
subject
).
to
all
(
have_attributes
(
labels:
{
shard: :default
}))
expect
(
subject
).
to
include
(
an_object_having_attributes
(
name: :filesystem_accessible
,
value:
0
))
expect
(
subject
).
to
include
(
an_object_having_attributes
(
name: :filesystem_readable
,
value:
0
))
expect
(
subject
).
to
include
(
an_object_having_attributes
(
name: :filesystem_writable
,
value:
0
))
expect
(
subject
).
to
include
(
an_object_having_attributes
(
name: :filesystem_access_latency
,
value:
be
>=
0
))
expect
(
subject
).
to
include
(
an_object_having_attributes
(
name: :filesystem_read_latency
,
value:
be
>=
0
))
expect
(
subject
).
to
include
(
an_object_having_attributes
(
name: :filesystem_write_latency
,
value:
be
>=
0
))
end
end
context
'storage points to directory that has both read and write rights'
do
before
do
FileUtils
.
chmod_R
(
0755
,
tmp_dir
)
end
it
{
is_expected
.
to
all
(
have_attributes
(
labels:
{
shard: :default
}))
}
it
{
is_expected
.
to
include
(
an_object_having_attributes
(
name: :filesystem_accessible
,
value:
1
))
}
it
{
is_expected
.
to
include
(
an_object_having_attributes
(
name: :filesystem_readable
,
value:
1
))
}
it
{
is_expected
.
to
include
(
an_object_having_attributes
(
name: :filesystem_writable
,
value:
1
))
}
it
'provides metrics'
do
expect
(
subject
).
to
all
(
have_attributes
(
labels:
{
shard: :default
}))
it
{
is_expected
.
to
include
(
an_object_having_attributes
(
name: :filesystem_access_latency
,
value:
be
>=
0
))
}
it
{
is_expected
.
to
include
(
an_object_having_attributes
(
name: :filesystem_read_latency
,
value:
be
>=
0
))
}
it
{
is_expected
.
to
include
(
an_object_having_attributes
(
name: :filesystem_write_latency
,
value:
be
>=
0
))
}
expect
(
subject
).
to
include
(
an_object_having_attributes
(
name: :filesystem_accessible
,
value:
1
))
expect
(
subject
).
to
include
(
an_object_having_attributes
(
name: :filesystem_readable
,
value:
1
))
expect
(
subject
).
to
include
(
an_object_having_attributes
(
name: :filesystem_writable
,
value:
1
))
expect
(
subject
).
to
include
(
an_object_having_attributes
(
name: :filesystem_access_latency
,
value:
be
>=
0
))
expect
(
subject
).
to
include
(
an_object_having_attributes
(
name: :filesystem_read_latency
,
value:
be
>=
0
))
expect
(
subject
).
to
include
(
an_object_having_attributes
(
name: :filesystem_write_latency
,
value:
be
>=
0
))
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