static: fix git raw file redirect
When converting this from a htaccess file to run in the virtualhost context, one instance of '^cgit' -> '^/cgit' was missed. Fix it, and add a coverage test for it to testinfra. Change-Id: Icc1dae6dce232e69c5cd1cf98b594f562c60d3f2
This commit is contained in:
parent
7dc6b7c89f
commit
d78f3fa8f3
@ -103,7 +103,7 @@ RewriteCond %{QUERY_STRING} h=([\w/]+)
|
||||
RewriteRule "^/cgit/(.*?)/(.*?)/plain/?(.*)" "https://opendev.org/$1/$2/raw/branch/%1/$3" [L,QSD]
|
||||
|
||||
# if there's no args:
|
||||
RewriteRule "^cgit/(.*?)/(.*?)/plain/?(.*)" "https://opendev.org/$1/$2/raw/branch/master/$3" [L,QSD]
|
||||
RewriteRule "^/cgit/(.*?)/(.*?)/plain/?(.*)" "https://opendev.org/$1/$2/raw/branch/master/$3" [L,QSD]
|
||||
|
||||
######################
|
||||
# commit tab (with file) -> commit screen (without file)
|
||||
|
@ -138,7 +138,9 @@ git_redirects = (
|
||||
'https://opendev.org/openstack/tripleo-ansible/commit/a6f9b1551baf5f680c05f4fa69ac926f8a0a3f81'),
|
||||
('git.starlingx.io/stx-tools', 'https://opendev.org/openstack/stx-tools'),
|
||||
('git.zuul-ci.org/zuul', 'https://opendev.org/openstack-infra/zuul'),
|
||||
('git.airshipit.org/airship-in-a-bottle', 'https://opendev.org/openstack/airship-in-a-bottle')
|
||||
('git.airshipit.org/airship-in-a-bottle', 'https://opendev.org/openstack/airship-in-a-bottle'),
|
||||
('git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt',
|
||||
'https://opendev.org/openstack/requirements/raw/branch/master/upper-constraints.txt')
|
||||
)
|
||||
@pytest.mark.parametrize("url,target", git_redirects)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user