mirror of
https://github.com/docker/login-action.git
synced 2025-08-15 20:15:50 +08:00
support new <registry-id>.dkr-ecr.<aws-region>.on.aws endpoints
Signed-off-by: Timo Witte <timo_witte@agilent.com>
This commit is contained in:
@@ -10,6 +10,7 @@ describe('isECR', () => {
|
||||
['012345678901.dkr.ecr.eu-west-3.amazonaws.com', true],
|
||||
['876820548815.dkr.ecr.cn-north-1.amazonaws.com.cn', true],
|
||||
['390948362332.dkr.ecr.cn-northwest-1.amazonaws.com.cn', true],
|
||||
['012345678901.dkr-ecr.eu-north-1.on.aws', true],
|
||||
['public.ecr.aws', true]
|
||||
])('given registry %p', async (registry, expected) => {
|
||||
expect(aws.isECR(registry)).toEqual(expected);
|
||||
@@ -23,6 +24,7 @@ describe('isPubECR', () => {
|
||||
['012345678901.dkr.ecr.eu-west-3.amazonaws.com', false],
|
||||
['876820548815.dkr.ecr.cn-north-1.amazonaws.com.cn', false],
|
||||
['390948362332.dkr.ecr.cn-northwest-1.amazonaws.com.cn', false],
|
||||
['012345678901.dkr-ecr.eu-north-1.on.aws', false],
|
||||
['public.ecr.aws', true]
|
||||
])('given registry %p', async (registry, expected) => {
|
||||
expect(aws.isPubECR(registry)).toEqual(expected);
|
||||
@@ -34,6 +36,7 @@ describe('getRegion', () => {
|
||||
['012345678901.dkr.ecr.eu-west-3.amazonaws.com', 'eu-west-3'],
|
||||
['876820548815.dkr.ecr.cn-north-1.amazonaws.com.cn', 'cn-north-1'],
|
||||
['390948362332.dkr.ecr.cn-northwest-1.amazonaws.com.cn', 'cn-northwest-1'],
|
||||
['012345678901.dkr-ecr.eu-north-1.on.aws', 'eu-north-1'],
|
||||
['public.ecr.aws', 'us-east-1']
|
||||
])('given registry %p', async (registry, expected) => {
|
||||
expect(aws.getRegion(registry)).toEqual(expected);
|
||||
@@ -46,6 +49,7 @@ describe('getAccountIDs', () => {
|
||||
['012345678901.dkr.ecr.eu-west-3.amazonaws.com', '012345678910,023456789012', ['012345678901', '012345678910', '023456789012']],
|
||||
['012345678901.dkr.ecr.eu-west-3.amazonaws.com', '012345678901,012345678910,023456789012', ['012345678901', '012345678910', '023456789012']],
|
||||
['390948362332.dkr.ecr.cn-northwest-1.amazonaws.com.cn', '012345678910,023456789012', ['390948362332', '012345678910', '023456789012']],
|
||||
['876820548815.dkr-ecr.eu-north-1.on.aws', '012345678910,023456789012', ['876820548815', '012345678910', '023456789012']],
|
||||
['public.ecr.aws', undefined, []]
|
||||
])('given registry %p', async (registry, accountIDsEnv, expected) => {
|
||||
if (accountIDsEnv) {
|
||||
|
Reference in New Issue
Block a user