Skip to content

Commit

Permalink
Merge pull request #470 from docker/dependabot/npm_and_yarn/docker/ac…
Browse files Browse the repository at this point in the history
…tions-toolkit-0.1.0

build(deps): bump @docker/actions-toolkit from 0.1.0-beta.14 to 0.1.0
  • Loading branch information
crazy-max committed Apr 17, 2023
2 parents 65b78e6 + dcd1f1f commit 40891eb
Show file tree
Hide file tree
Showing 7 changed files with 1,126 additions and 1,258 deletions.
2 changes: 1 addition & 1 deletion __tests__/context.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ test('with password and username getInputs does not throw error', async () => {
process.env['INPUT_LOGOUT'] = 'true';
expect(() => {
getInputs();
}).not.toThrowError();
}).not.toThrow();
});
7 changes: 3 additions & 4 deletions __tests__/main.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@ import * as stateHelper from '../src/state-helper';
test('errors without username and password', async () => {
jest.spyOn(osm, 'platform').mockImplementation(() => 'linux');
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 () => {
jest.spyOn(osm, 'platform').mockImplementation(() => 'linux');
const setRegistrySpy = jest.spyOn(stateHelper, 'setRegistry');
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';
process.env[`INPUT_USERNAME`] = username;
Expand All @@ -40,8 +40,7 @@ test('calls docker login', async () => {
jest.spyOn(osm, 'platform').mockImplementation(() => 'linux');
const setRegistrySpy = jest.spyOn(stateHelper, 'setRegistry');
const setLogoutSpy = jest.spyOn(stateHelper, 'setLogout');
const dockerSpy = jest.spyOn(docker, 'login');
dockerSpy.mockImplementation(jest.fn());
const dockerSpy = jest.spyOn(docker, 'login').mockImplementation(() => Promise.resolve());

const username = 'dbowie';
process.env[`INPUT_USERNAME`] = username;
Expand Down
2 changes: 1 addition & 1 deletion dist/index.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/sourcemap-register.js

Large diffs are not rendered by default.

28 changes: 14 additions & 14 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,23 +30,23 @@
"@actions/core": "^1.10.0",
"@aws-sdk/client-ecr": "^3.231.0",
"@aws-sdk/client-ecr-public": "^3.231.0",
"@docker/actions-toolkit": "^0.1.0-beta.14",
"@docker/actions-toolkit": "^0.1.0",
"http-proxy-agent": "^5.0.0",
"https-proxy-agent": "^5.0.1"
},
"devDependencies": {
"@types/node": "^16.11.26",
"@typescript-eslint/eslint-plugin": "^5.14.0",
"@typescript-eslint/parser": "^5.14.0",
"@vercel/ncc": "^0.33.3",
"eslint": "^8.11.0",
"eslint-config-prettier": "^8.5.0",
"eslint-plugin-jest": "^26.1.1",
"eslint-plugin-prettier": "^4.0.0",
"jest": "^27.2.5",
"prettier": "^2.3.1",
"ts-jest": "^27.1.2",
"ts-node": "^10.7.0",
"typescript": "^4.4.4"
"@types/node": "^16.18.21",
"@typescript-eslint/eslint-plugin": "^5.56.0",
"@typescript-eslint/parser": "^5.56.0",
"@vercel/ncc": "^0.36.1",
"eslint": "^8.36.0",
"eslint-config-prettier": "^8.8.0",
"eslint-plugin-jest": "^27.2.1",
"eslint-plugin-prettier": "^4.2.1",
"jest": "^29.5.0",
"prettier": "^2.8.7",
"ts-jest": "^29.0.5",
"ts-node": "^10.9.1",
"typescript": "^4.9.5"
}
}
Loading

0 comments on commit 40891eb

Please sign in to comment.