40 Commits

Author SHA1 Message Date
Philipp Muens
8d348da0ce Merge master into PR 2017-03-23 12:29:07 +01:00
Philipp Muens
fef124e800 Restore global setTimeout to get into a clean state again 2017-03-15 12:12:38 +01:00
Ryan S. Brown
c95b40c584 Use stub on setTimeout instead 2017-03-14 18:14:05 -04:00
Ryan S. Brown
1ee36e798f Reduce test time by 50%
This commit removes a hardcoded 5 second sleep intended to help handle
rate limits. The retry interval is changed during the test to 250ms from
5 seconds, with no change to the runtime behavior of the framework.
2017-03-14 09:16:48 -04:00
Doug Moscrop
1012c351b7 add sinon-bluebird to make promises in tests a bit cleaner 2017-02-08 12:59:18 -05:00
Vlad Golubev
12ba45421c Merge branch 'master' into fix-average-functions-duration 2017-02-07 23:42:25 +02:00
Erik Erikson
5bd31687b5 Use STS getCallerIdentity instead of IAM getUser
A possible fix for https://github.com/serverless/serverless/issues/3151
Switch from using IAM `getUser` to get the account ID of the current user to calling STS `getCallerIdentity`.  It is expected that this is a less protected segment of rights and will, as a result, impact fewer users.  Of course, this is hard to guarantee.
Changes tests appropriately

Related Docs:
http://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/STS.html#getCallerIdentity-property
2017-01-26 18:14:15 -08:00
Eslam λ Hefnawy
a19fbfbbb3 Merge pull request #3125 from serverless/refactor-function-arn-for-info-plugin
BREAKING - Refactor function arn generation for info plugin
2017-01-23 21:11:59 +07:00
Philipp Muens
a3ce3edb72 Remove getStackName() method 2017-01-23 10:51:06 +01:00
Philipp Muens
116c79dbf8 Refactor function arn generation for info plugin 2017-01-20 14:45:11 +01:00
Vlad Golubev
7d7f7c7054 Refactor getting aws provider stage 2017-01-06 20:53:08 +02:00
Vlad Golubev
0fb4cf6fba Refactor getting aws provider region 2017-01-06 20:53:08 +02:00
Erik Erikson
3210aff617 Detect Successful Async Credential Loading
Check for the roleArn attribute on ini file loaded credentials.  If that exists, then asynchronous (assume role) credentials are being loaded but they may not yet be received.  Accept these as valid credentials and use the containing credentials object as the current credentials object.

Clean up the test data (fakeCredentials didn't need so much)
Create a test that verifies the async credential loading functionality
Create a test that ensures a non-existent profile one attempts to load does not load any credentials

Bump the version of the aws-sdk so that the modified aws-sdk will be demanded for proper handling of this feature.
2016-12-01 01:45:14 -08:00
Erik Erikson
0ddd4ec804 Credential Fixes Roundup
Merge fixes from both #2373 & #2695, adding editorial suggestions and future-proofing them a bit (probably)

Clean up tests to broadly clean and restore process/test environment and simplify test code.
This work uncovered that we were returning profiles when no profile credentials were loaded.  This seems inappropriate.  The tests were modified to use the temporary credential file code that @stevecaldwell77 wrote, exclusively.  This way there are actual credentials to load from the given profile.

I am not sure how to test the assume-role/asynchronous STS credential loading capability and would love some help making sure that is right
2016-11-29 03:16:47 -08:00
Erik Erikson
e317399da4 Merge remote-tracking branch 'journeyapps/fix-async-credentials' into credentials-fixes 2016-11-28 23:06:03 -08:00
Stephen Caldwell
acb3bb85c9 sandbox environment variables correctly in test 2016-11-28 09:58:29 -08:00
Stephen Caldwell
584884dc71 remove accidentally commited 'only' 2016-11-28 09:58:29 -08:00
Stephen Caldwell
a28da5c76a add test for use of AWS_SHARED_CREDENTIALS_FILE envar 2016-11-28 09:58:29 -08:00
Stephen Caldwell
4969c74a17 add support for environment variable AWS_SHARED_CREDENTIALS_FILE when loading credentials 2016-11-28 09:58:29 -08:00
Erik Erikson
6cc5d1364a Merge branch 'master' into logical-ids-missed-details 2016-11-22 13:26:28 -08:00
Eslam A. Hefnawy
0519987cb8 moved getStackName method into provider class 2016-11-21 17:48:39 +07:00
Eslam A. Hefnawy
632e86ec2e fix typo 2016-11-21 16:42:38 +07:00
Eslam A. Hefnawy
4087921e0e bring back probider.getStackName() 2016-11-21 16:33:52 +07:00
Erik Erikson
61783191ee "sdk" => "provider"
Change the legacy "sdk" moniker to "provider" in line with the (good, clarifying) class name changes in order to reduce potential future confusion.
2016-11-16 17:14:48 -08:00
Erik Erikson
749204d962 Logical IDs Centralization Missed Details
A few places where names had been hard coded were missed in #2679.  This pull request attempts to get the rest of these (although I fear a few more exist).
The hard coding of the logical ids for the role and policy were removed from the json files defining those values.
Additionally, the path and name of the default role and policy were extrapolated as were log group and api gateway names.
The new role path, role name, and policy name values were used to amend the static role and policy.
Commentary in the centralization file was re-added.

Tests were updated
No function or documentation changes occurred by these changes
2016-11-15 17:22:59 -08:00
Ralf Kistner
a78ed09773 Use AWS.SharedIniFileCredentials directly for profile credentials. 2016-11-11 11:20:25 -08:00
Ralf Kistner
7dae0e2712 Correctly clear environment variables in tests. 2016-11-11 11:16:04 -08:00
Eslam A. Hefnawy
489dd0f4b5 spacing up tests 2016-11-11 15:53:08 +07:00
Eslam A. Hefnawy
fef9b68e5a refactored naming-js method naming 2016-11-10 19:05:02 +07:00
Eslam A. Hefnawy
1a02e15d9b updated tests using name-js 2016-11-10 15:14:33 +07:00
Eslam A. Hefnawy
61efd35850 added logical id names in naming-js file 2016-11-09 19:31:08 +07:00
Maciej Winnicki
1bc13a6d65
fix broken test 2016-11-03 12:44:15 +01:00
Phillip J. Roth
a669b46a37 Updates git.io URL to aws credential setup 2016-11-02 09:46:22 -04:00
Philipp Muens
300e21be9d DRY out setProvider() usage 2016-10-31 09:55:06 +01:00
Nik Graf
8aa90be144 fix provider test 2016-10-20 16:14:42 +02:00
Eslam A. Hefnawy
f0804d244f resolved conflicts with master 2016-10-19 16:50:41 +07:00
Eslam A. Hefnawy
6beb3a802c update unit tests for overwrite bug fix 2016-10-19 16:50:41 +07:00
Eslam A. Hefnawy
402cc2c376 fixed overwrite resources bug 2016-10-19 16:50:41 +07:00
Nik Graf
360bfb814a Merge branch 'master' into ellipsis 2016-10-19 10:35:34 +02:00
Philipp Muens
c273abec68 Move AwsProvider plugin into aws directory 2016-10-19 08:32:06 +02:00