@@ -126,29 +126,6 @@ describe('developer redirects', () => {
126126 )
127127 } )
128128
129- // TODO temprarily ensure we redirect old links using the new enterprise format
130- // for currently supported enterprise releases only
131- // EXAMPLE: /en/enterprise-server@2.20/v3/pulls/comments -> /en/enterprise-server@2.20/rest/reference/pulls#comments
132- // We can remove test after we update all the old `/v3` links to point to `/rest`
133- test ( 'temporary rest reference enterprise redirects' , async ( ) => {
134- await eachOfLimit (
135- restRedirectFixtures ,
136- MAX_CONCURRENT_REQUESTS ,
137- async ( newPath , oldPath ) => {
138- const releaseNumber = oldPath . match ( getEnterpriseVersionNumber )
139- if ( ! releaseNumber ) return
140- if ( ! enterpriseServerReleases . supported . includes ( releaseNumber [ 1 ] ) ) return
141-
142- oldPath = oldPath
143- . replace ( / \/ e n t e r p r i s e \/ ( \d .\d \d ) \/ / , '/enterprise-server@$1/' )
144- . replace ( '/user/' , '/' )
145- const res = await get ( oldPath )
146- expect ( res . statusCode , `${ oldPath } did not redirect to ${ newPath } ` ) . toBe ( 301 )
147- expect ( res . headers . location ) . toBe ( newPath )
148- }
149- )
150- } )
151-
152129 // this fixtures file includes /v4 and /enterprise/v4 paths
153130 test ( 'graphql reference redirects' , async ( ) => {
154131 await eachOfLimit (
@@ -164,28 +141,5 @@ describe('developer redirects', () => {
164141 }
165142 )
166143 } )
167-
168- // TODO temprarily ensure we redirect old links using the new enterprise format
169- // for currently supported enterprise releases only
170- // EXAMPLE: /en/enterprise-server@2.20/v4/interface/actor -> /en/enterprise-server@2.20/graphql/reference/interfaces#actor
171- // We can remove test after we update all the old `/v4` links to point to `/graphql`
172- test ( 'temporary rest reference enterprise redirects' , async ( ) => {
173- await eachOfLimit (
174- graphqlRedirectFixtures ,
175- MAX_CONCURRENT_REQUESTS ,
176- async ( newPath , oldPath ) => {
177- const releaseNumber = oldPath . match ( getEnterpriseVersionNumber )
178- if ( ! releaseNumber ) return
179- if ( ! enterpriseServerReleases . supported . includes ( releaseNumber [ 1 ] ) ) return
180-
181- oldPath = oldPath
182- . replace ( / \/ e n t e r p r i s e \/ ( \d .\d \d ) \/ / , '/enterprise-server@$1/' )
183- . replace ( '/user/' , '/' )
184- const res = await get ( oldPath )
185- expect ( res . statusCode , `${ oldPath } did not redirect to ${ newPath } ` ) . toBe ( 301 )
186- expect ( res . headers . location ) . toBe ( newPath )
187- }
188- )
189- } )
190144 } )
191145} )
0 commit comments