mirror of
https://github.com/docker/login-action.git
synced 2024-12-22 18:15:41 +00:00
update generated content
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
This commit is contained in:
parent
713d7298f6
commit
dcd1f1fe0a
|
@ -7,5 +7,5 @@ test('with password and username getInputs does not throw error', async () => {
|
||||||
process.env['INPUT_LOGOUT'] = 'true';
|
process.env['INPUT_LOGOUT'] = 'true';
|
||||||
expect(() => {
|
expect(() => {
|
||||||
getInputs();
|
getInputs();
|
||||||
}).not.toThrowError();
|
}).not.toThrow();
|
||||||
});
|
});
|
||||||
|
|
|
@ -8,14 +8,14 @@ import * as stateHelper from '../src/state-helper';
|
||||||
test('errors without username and password', async () => {
|
test('errors without username and password', async () => {
|
||||||
jest.spyOn(osm, 'platform').mockImplementation(() => 'linux');
|
jest.spyOn(osm, 'platform').mockImplementation(() => 'linux');
|
||||||
process.env['INPUT_LOGOUT'] = 'true'; // default value
|
process.env['INPUT_LOGOUT'] = 'true'; // default value
|
||||||
await expect(main()).rejects.toThrowError(new Error('Username and password required'));
|
await expect(main()).rejects.toThrow(new Error('Username and password required'));
|
||||||
});
|
});
|
||||||
|
|
||||||
test('successful with username and password', async () => {
|
test('successful with username and password', async () => {
|
||||||
jest.spyOn(osm, 'platform').mockImplementation(() => 'linux');
|
jest.spyOn(osm, 'platform').mockImplementation(() => 'linux');
|
||||||
const setRegistrySpy = jest.spyOn(stateHelper, 'setRegistry');
|
const setRegistrySpy = jest.spyOn(stateHelper, 'setRegistry');
|
||||||
const setLogoutSpy = jest.spyOn(stateHelper, 'setLogout');
|
const setLogoutSpy = jest.spyOn(stateHelper, 'setLogout');
|
||||||
const dockerSpy = jest.spyOn(docker, 'login').mockImplementation(jest.fn());
|
const dockerSpy = jest.spyOn(docker, 'login').mockImplementation(() => Promise.resolve());
|
||||||
|
|
||||||
const username = 'dbowie';
|
const username = 'dbowie';
|
||||||
process.env[`INPUT_USERNAME`] = username;
|
process.env[`INPUT_USERNAME`] = username;
|
||||||
|
@ -40,8 +40,7 @@ test('calls docker login', async () => {
|
||||||
jest.spyOn(osm, 'platform').mockImplementation(() => 'linux');
|
jest.spyOn(osm, 'platform').mockImplementation(() => 'linux');
|
||||||
const setRegistrySpy = jest.spyOn(stateHelper, 'setRegistry');
|
const setRegistrySpy = jest.spyOn(stateHelper, 'setRegistry');
|
||||||
const setLogoutSpy = jest.spyOn(stateHelper, 'setLogout');
|
const setLogoutSpy = jest.spyOn(stateHelper, 'setLogout');
|
||||||
const dockerSpy = jest.spyOn(docker, 'login');
|
const dockerSpy = jest.spyOn(docker, 'login').mockImplementation(() => Promise.resolve());
|
||||||
dockerSpy.mockImplementation(jest.fn());
|
|
||||||
|
|
||||||
const username = 'dbowie';
|
const username = 'dbowie';
|
||||||
process.env[`INPUT_USERNAME`] = username;
|
process.env[`INPUT_USERNAME`] = username;
|
||||||
|
|
2
dist/index.js
generated
vendored
2
dist/index.js
generated
vendored
File diff suppressed because one or more lines are too long
2
dist/index.js.map
generated
vendored
2
dist/index.js.map
generated
vendored
File diff suppressed because one or more lines are too long
2
dist/sourcemap-register.js
generated
vendored
2
dist/sourcemap-register.js
generated
vendored
File diff suppressed because one or more lines are too long
Loading…
Reference in a new issue