-
Notifications
You must be signed in to change notification settings - Fork 110
Initial commit #367
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Initial commit #367
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great changes to bring this into pytest
, and guide readers through the different test scenarios and debug situations.
I ran into a few issues running the tests, and commented on the READMEs in those spots. Could you have a look and adjust the instructions appropriately? In some cases, its a matter of adjusting the command or even just the order of commands.
In the "local-lambda" one though, I couldn't get the tests to successfully connect to the step functions local port (I think that's the one anyway). Could you take a look to see if there's a missing command in the instructions?
Thanks for your effort!
python-test-samples/step-functions-local-mock/tests/requirements.txt
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Making great progress! One of the READMEs looks like it had some accidental content duplication.
The other open issue seems to be with step-functions-local-lambda
. I can't seem to get the right combination of local processes running and talking to each other to be able to successfully get through the tests.
Either the ports aren't talking, or one of the emulators/processes isn't running when it needs to be.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very very close now. Commands were working, and flowed nicely. Just a couple of editing tweaks, and a suggestion about using the default --network
switch.
```sh | ||
# Runing step functions docker image in the background | ||
step-functions-local-helloworld/tests$ | ||
docker run -d --network host \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm on a mac and had to run in --network bridge
mode. According to my research, on Mac (me) and Windows, --network host
doesn't provide direct host-network access.
Dropping the switch completely worked for me on my Mac (just taking the default).
> Set up the python environment | ||
|
||
``` shell | ||
step-functions-local-helloworld$ cd tests |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Directory name is incorrect here (and in following commands). Should be step-functions-local-lambda
or step-functions-local-lambda/tests
```sh | ||
# Runing step functions docker image in the background | ||
step-functions-local-helloworld/tests$ | ||
docker run -d --network host \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same issue as step-functions-local-helloworld
, Mac and Windows don't grant host network access in this mode (according to my research). I got a "Could not connect to the endpoint URL: http://localhost:8083" error.
Dropping the switch --network host
worked for me.
> unsetting variables | ||
|
||
```sh | ||
unset AWS_ACCESS_KEY_ID='DUMMYIDEXAMPLE' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
unset
commands should just be the variable name, and not include ='DUMMYIDEXAMPLE'
Issue #, if available:
Adding local serverless testing cases to the repository
Description of changes:
Adding AWS serverless testing in a local development environment.
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.