mirror of
https://github.com/actions/setup-java.git
synced 2026-10-18 17:31:34 +00:00
Reject Maven mirrors missing selectors after URL authorities
Co-authored-by: Copilot App <[email protected]> Copilot-Session: 59df028a-0d1b-49cb-8126-ab26408663e4
This commit is contained in:
co-authored by
Copilot App
parent
df4305dee7
commit
db92f3d58c
@@ -913,9 +913,28 @@ describe('auth tests', () => {
|
||||
]);
|
||||
});
|
||||
|
||||
it.each([
|
||||
'https://repo.example.com:8443',
|
||||
'https://repo.example.com:8443/maven',
|
||||
'https://[2001:db8::1]',
|
||||
'https://[2001:db8::1]/maven',
|
||||
'https://[2001:db8::1]:8443',
|
||||
'https://[2001:db8::1]:8443/maven'
|
||||
])('preserves the complete mirror URL %s with an explicit selector', url => {
|
||||
expect(
|
||||
auth.parseMavenMirrors([`private:${url}:external:http:*,!internal`])
|
||||
).toEqual([{id: 'private', url, mirrorOf: 'external:http:*,!internal'}]);
|
||||
});
|
||||
|
||||
it.each([
|
||||
'private',
|
||||
'private:https://repo.example.com',
|
||||
'private:https://repo.example.com:8443',
|
||||
'private:https://repo.example.com:8443/maven',
|
||||
'private:https://[2001:db8::1]',
|
||||
'private:https://[2001:db8::1]/maven',
|
||||
'private:https://[2001:db8::1]:8443',
|
||||
'private:https://[2001:db8::1]:8443/maven',
|
||||
':https://repo.example.com:*',
|
||||
'private::*',
|
||||
'private:https://repo.example.com:',
|
||||
|
||||
Reference in New Issue
Block a user