chore: remove warning (#926)

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
This commit is contained in:
Tim Finnigan
2023-12-05 16:23:55 -08:00
committed by GitHub
parent 0d2b0aeb3e
commit 6129f329e6
4 changed files with 207 additions and 246 deletions

View File

@@ -105,9 +105,6 @@ describe('Configure AWS Credentials', () => {
jest.spyOn(core, 'info').mockImplementation((string) => {
return string;
});
jest.spyOn(core, 'warning').mockImplementation((string) => {
return string;
});
(fromEnv as jest.Mock)
.mockImplementationOnce(() => () => ({
accessKeyId: FAKE_ACCESS_KEY_ID,
@@ -871,23 +868,4 @@ describe('Configure AWS Credentials', () => {
expect(core.setOutput).toHaveBeenCalledTimes(4);
});
test('prints warning for access key usage and no session token', async () => {
jest.spyOn(core, 'getInput').mockImplementation(mockGetInput(ASSUME_ROLE_INPUTS));
await run();
expect(core.warning).toHaveBeenCalledWith(
'To avoid using long-term AWS credentials, please update your workflows to authenticate using OpenID Connect.' +
' See https://docs.github.com/en/actions/deployment/security-hardening-your-deployments/configuring-openid-connect-in-amazon-web-services for more information.'
);
});
test('skips warning for access key usage with session token', async () => {
jest.spyOn(core, 'getInput').mockImplementation(mockGetInput(DEFAULT_INPUTS));
await run();
expect(core.warning).toHaveBeenCalledTimes(0);
});
});