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
b045ab5d
Commit
b045ab5d
authored
Aug 07, 2021
by
Bala Kumar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix environments regex for etag restful
Changelog: fixed
parent
e8633570
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
2 deletions
+8
-2
lib/gitlab/etag_caching/router/restful.rb
lib/gitlab/etag_caching/router/restful.rb
+1
-1
spec/lib/gitlab/etag_caching/router/restful_spec.rb
spec/lib/gitlab/etag_caching/router/restful_spec.rb
+7
-1
No files found.
lib/gitlab/etag_caching/router/restful.rb
View file @
b045ab5d
...
@@ -71,7 +71,7 @@ module Gitlab
...
@@ -71,7 +71,7 @@ module Gitlab
'continuous_delivery'
'continuous_delivery'
],
],
[
[
%r(
#{
RESERVED_WORDS_PREFIX
}
/environments
\.
json
\z
)
,
%r(
#{
RESERVED_WORDS_PREFIX
}
/
-/
environments
\.
json
\z
)
,
'environments'
,
'environments'
,
'continuous_delivery'
'continuous_delivery'
],
],
...
...
spec/lib/gitlab/etag_caching/router/restful_spec.rb
View file @
b045ab5d
...
@@ -87,12 +87,18 @@ RSpec.describe Gitlab::EtagCaching::Router::Restful do
...
@@ -87,12 +87,18 @@ RSpec.describe Gitlab::EtagCaching::Router::Restful do
end
end
it
'matches the environments path'
do
it
'matches the environments path'
do
result
=
match_route
(
'/my-group/my-project/environments.json'
)
result
=
match_route
(
'/my-group/my-project/
-/
environments.json'
)
expect
(
result
).
to
be_present
expect
(
result
).
to
be_present
expect
(
result
.
name
).
to
eq
'environments'
expect
(
result
.
name
).
to
eq
'environments'
end
end
it
'does not match the operations environments list path'
do
result
=
match_route
(
'/-/operations/environments.json'
)
expect
(
result
).
not_to
be_present
end
it
'matches pipeline#show endpoint'
do
it
'matches pipeline#show endpoint'
do
result
=
match_route
(
'/my-group/my-project/-/pipelines/2.json'
)
result
=
match_route
(
'/my-group/my-project/-/pipelines/2.json'
)
...
...
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