-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
29 changed files
with
52 additions
and
1,189 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,15 @@ | ||
version: 2.1 | ||
|
||
orbs: | ||
python: circleci/[email protected] | ||
coveralls: coveralls/[email protected] | ||
|
||
jobs: | ||
build-and-test: | ||
docker: | ||
- image: circleci/python:3.8-node | ||
steps: | ||
- checkout | ||
- setup_remote_docker: | ||
version: 19.03.13 | ||
- run: | ||
name: Install Dependencies | ||
command: make deps | ||
- run: | ||
name: Test | ||
command: make test lint | ||
- coveralls/upload: | ||
path_to_lcov: ./.coverage | ||
node: circleci/[email protected] | ||
|
||
workflows: | ||
main: | ||
matrix-tests: | ||
app-dir: serverless-plugin | ||
jobs: | ||
- build-and-test | ||
- node/test: | ||
version: '12' | ||
- node/test: | ||
version: '14' | ||
- node/test: | ||
version: '10' |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,3 @@ | ||
# Contributing | ||
|
||
|
||
## Troubleshooting Tests | ||
|
||
1. "I get errors while running the unit tests, like `botocore.exceptions.NoCredentialsError: Unable to locate credentials`. It seems like boto3 is attempting to access real resources instead of the moto mocks!" | ||
|
||
This typically happens when a test imports a module that imports `boto3` before the mocks have been set up. The solution is to import such modules within the test function itself. For example: | ||
|
||
```py | ||
@mock_cloudwatch | ||
def test_update_alarms(lambda_functions): | ||
os.environ["SNS_ALARMS_TOPIC"] = "TestAlarmsTopic" | ||
from alarms import update_alarms # <- This import occurs within a function decorated by a moto mock | ||
``` | ||
|
||
This issue is detailed further in the [moto README](https://github.com/spulec/moto#what-about-those-pesky-imports) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.