Merge pull request #4655 from justinsb/cloudmock_docs

Add README to say what cloudmock is
This commit is contained in:
k8s-ci-robot 2018-03-12 08:18:23 -07:00 committed by GitHub
commit 3822992c32
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 16 additions and 0 deletions

16
cloudmock/README.md Normal file
View File

@ -0,0 +1,16 @@
cloudmock is a mock implementation of the AWS APIs.
The goal is to let us test code that interacts with the AWS APIs, without creating actual AWS resources.
While no resources are created, we maintain state so that (for example) after you call `CreateVpc`, a subsequent
call to `DescribeVpcs` will return that VPC. The end-goal is that we simulate the AWS APIs accurately,
so that we can quickly run test-cases that might otherwise require a lot of time or money to run with real
AWS resources.
In future, we can also do fault injection etc.
Note: The AWS API is very large, and most of it is not implemented. Functions that are implemented may
not be implemented correctly, particularly around edge-cases (such as error handling).
Typical use: `c := &mockec2.MockEC2{}`. `MockEC2` implements the EC2 API interface `ec2iface.EC2API`,
so can be used where otherwise you would use a real EC2 client.