mirror of
https://github.com/docker/login-action.git
synced 2025-02-22 18:20:25 +00:00
pre-checkin
Signed-off-by: Fedor Dikarev <fedor.dikarev@gmail.com>
This commit is contained in:
parent
dcaf1132b0
commit
9cd6d39b18
2 changed files with 2 additions and 6 deletions
|
@ -1,5 +1,4 @@
|
||||||
import { expect, jest, test, } from '@jest/globals';
|
import { expect, jest, test, } from '@jest/globals';
|
||||||
import * as path from 'path';
|
|
||||||
|
|
||||||
// import * as dockerModule from '../src/docker';
|
// import * as dockerModule from '../src/docker';
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,4 @@
|
||||||
import { expect, jest, test, } from '@jest/globals';
|
import { expect, jest, test, } from '@jest/globals';
|
||||||
import * as path from 'path';
|
|
||||||
|
|
||||||
// import * as dockerModule from '../src/docker';
|
|
||||||
|
|
||||||
import { login } from '../src/docker';
|
import { login } from '../src/docker';
|
||||||
import { Docker } from '@docker/actions-toolkit/lib/docker/docker';
|
import { Docker } from '@docker/actions-toolkit/lib/docker/docker';
|
||||||
|
@ -38,7 +35,7 @@ test('login retries success function', async () => {
|
||||||
|
|
||||||
// stderr_strings = []
|
// stderr_strings = []
|
||||||
call_count = -1
|
call_count = -1
|
||||||
expect(async () => {
|
await expect(async () => {
|
||||||
await login(registry, username, password, 'false', ['408', '502', '400'], 5, 0.1);
|
await login(registry, username, password, 'false', ['408', '502', '400'], 5, 0.1);
|
||||||
})
|
})
|
||||||
.resolves;
|
.resolves;
|
||||||
|
@ -50,7 +47,7 @@ test('login retries success function', async () => {
|
||||||
'mock error, failed with status: 400 Request Timeout',
|
'mock error, failed with status: 400 Request Timeout',
|
||||||
]
|
]
|
||||||
call_count = -1
|
call_count = -1
|
||||||
expect(async () => {
|
await expect(async () => {
|
||||||
await login(registry, username, password, 'false', ['408', '502', '400'], 5, 0.1);
|
await login(registry, username, password, 'false', ['408', '502', '400'], 5, 0.1);
|
||||||
})
|
})
|
||||||
.resolves;
|
.resolves;
|
||||||
|
|
Loading…
Add table
Reference in a new issue