Skip to content
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

Add tests using moto and pyopenapi #29

Open
sverch opened this issue Mar 7, 2020 · 6 comments
Open

Add tests using moto and pyopenapi #29

sverch opened this issue Mar 7, 2020 · 6 comments

Comments

@sverch
Copy link

sverch commented Mar 7, 2020

The AWS v4 signing process makes it difficult to test that these specs actually work against the real AWS API, but moto has an option to disable authentication, and has a "standalone server" mode where it looks like the AWS API (which is why it's the basis of localstack).

I think it would be possible to get some local tests running (and even some CI) by using this, perhaps using something like pyopenapi.

@sverch
Copy link
Author

sverch commented Mar 7, 2020

https://github.com/Teebytes/TnT-Fuzzer also might combine well with moto.

@sverch
Copy link
Author

sverch commented Mar 7, 2020

Although that doesn't appear to support 3.0 yet, and I don't know if it supports XML.

@MikeRalphson
Copy link
Contributor

Thanks, good ideas!

@MikeRalphson
Copy link
Contributor

There is also https://www.npmjs.com/package/aws-sdk-mock in node.js land.

@sverch
Copy link
Author

sverch commented Mar 7, 2020

Taking another look at pyopenapi, it doesn't appear to be ready to use. See this issue about updating the README from 2018.

Unfortunately pyswagger only supports 2.0 specs.

It might still be useful to use moto though, maybe just with openapi-generator as a test setup step.

@sverch
Copy link
Author

sverch commented Mar 7, 2020

I'm not sure if the mock for node.js has this, but the main reason I brought up moto is the standalone server mode.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants