Package Usage: go: github.com/awsdocs/aws-doc-sdk-examples/gov2/testtools
Package testtools provides a set of tools to help test code that calls AWS
services.
**AWS Middleware Stubber**
The AWS Middleware Stubber is a unit testing tool that hooks into the AWS SDK for Go
middleware (https://aws.github.io/aws-sdk-go-v2/docs/middleware/) to short-circuit
calls to AWS services, verify inputs, and return predefined outputs. This
improves unit testing because you don't have to define mocks or change the
way your code calls AWS. Tests run without calling AWS, which means tests
run faster and don't incur charges or risk impacting your resources.
To use AwsmStubber, first create an instance of AwsmStubber.
The stubber is configured to handle all calls to AWS before the Serialize middleware
step. Use the stubber config to create a service client.
Define and add all service actions that are called by your test.
During your test run, the stubber verifies that each call is made in the order that
stubs are added to the stubber. The stubber also checks actual input against expected
input. If the call is verified, either the specified output is returned or, if an
error is requested, the error is returned.
Run your test and verify the results. Use testtools helper functions to verify
errors and run exit code.
By using sub tests, you can use the same test code to test both error and non-error
paths.
The testtools.ExitTest helper verifies that all expected stubs were called during
the test, so if your test exits early and leaves uncalled stubs, the test fails.
**Framework**
The framework section of the package provides a set of helper functions that you
can use in your tests to perform common tasks, such as verifying that errors
returned from the code under test match up with the expected errors, and running
exit checks to verify all stubs were called.
**Scenarios**
The scenarios section of the package provides a set of helper functions that you
can use to run scenario tests. Scenarios typically string together several
actions in a narrative format. The scenario test functions let you define
the expected actions of your scenario as a list of stubs. Then, your test function
is called first with no errors, and subsequently with each stub set to return an error.
**Mocks**
The mocks section of the package provides mocks of components that are used in
the code examples, such as a mock of the IQuestioner interface that lets you
specify a list of expected answers. The mock questioner returns these answers
in sequence during a test to mock user input.
603 versions
Latest release: over 1 year ago
4 dependent packages
View more package details: https://packages.ecosyste.ms/registries/proxy.golang.org/packages/github.com/awsdocs/aws-doc-sdk-examples/gov2/testtools
View more repository details: http://repos.ecosyste.ms/hosts/GitHub/repositories/awsdocs%2Faws-doc-sdk-examples
Dependent Repos 55
AlexRogalskiy/aws-doc-sdk-examples Fork of awsdocs/aws-doc-sdk-examples
Welcome to the AWS Code Examples Repository. This repo contains code examples used in the AWS documentation, AWS SDK Developer Guides, and more. For more information, see the Readme.rst file below.Size: 94.8 MB - Last synced: 6 months ago - Pushed: about 2 years ago

awsdocs/aws-doc-sdk-examples
Welcome to the AWS Code Examples Repository. This repo contains code examples used in the AWS documentation, AWS SDK Developer Guides, and more. For more information, see the Readme.md file below.Size: 240 MB - Last synced: 1 day ago - Pushed: 5 days ago

TharPhil/aws-doc-sdk-examples Fork of awsdocs/aws-doc-sdk-examples
Welcome to the AWS Code Examples Repository. This repo contains code examples used in the AWS documentation, AWS SDK Developer Guides, and more. For more information, see the Readme.md file below.Size: 114 MB - Last synced: about 2 years ago - Pushed: over 2 years ago

conijnio/aws-security-posture
Keep a historic overview of your compliance scores per workloadSize: 1.31 MB - Last synced: 5 months ago - Pushed: 5 months ago

jdisanti/aws-doc-sdk-examples Fork of awsdocs/aws-doc-sdk-examples
Welcome to the AWS Code Examples Repository. This repo contains code examples used in the AWS documentation, AWS SDK Developer Guides, and more. For more information, see the Readme.rst file below.Size: 170 MB - Last synced: about 1 year ago - Pushed: over 1 year ago

AWSChris/aws-doc-sdk-examples Fork of awsdocs/aws-doc-sdk-examples
Code examples used in the official AWS SDK documentation.Size: 241 MB - Last synced: 26 days ago - Pushed: 26 days ago

cpyle0819/aws-doc-sdk-examples Fork of awsdocs/aws-doc-sdk-examples
Welcome to the AWS Code Examples Repository. This repo contains code examples used in the AWS documentation, AWS SDK Developer Guides, and more. For more information, see the Readme.rst file below.Size: 229 MB - Last synced: 7 months ago - Pushed: 7 months ago

rlhagerm/aws-doc-sdk-examples Fork of awsdocs/aws-doc-sdk-examples
Welcome to the AWS Code Examples Repository. This repo contains code examples used in the AWS documentation, AWS SDK Developer Guides, and more. For more information, see the Readme.rst file below.Size: 281 MB - Last synced: 8 days ago - Pushed: 8 days ago

irenepsmith/aws-doc-sdk-examples Fork of awsdocs/aws-doc-sdk-examples
Welcome to the AWS Code Examples Repository. This repo contains code examples used in the AWS documentation, AWS SDK Developer Guides, and more. For more information, see the Readme.rst file below.Size: 118 MB - Last synced: about 2 years ago - Pushed: about 2 years ago

DavidSouther/aws-doc-sdk-examples Fork of awsdocs/aws-doc-sdk-examples
Welcome to the AWS Code Examples Repository. This repo contains code examples used in the AWS documentation, AWS SDK Developer Guides, and more. For more information, see the Readme.rst file below.Size: 246 MB - Last synced: 2 months ago - Pushed: 2 months ago

Laren-AWS/aws-doc-sdk-examples Fork of awsdocs/aws-doc-sdk-examples
Code examples used in the official AWS SDK documentation.Size: 238 MB - Last synced: 2 months ago - Pushed: 2 months ago

Bughalla/awsdocs_aws-doc-sdk-examples Fork of awsdocs/aws-doc-sdk-examples
Welcome to the AWS Code Examples Repository. This repo contains code examples used in the AWS documentation, AWS SDK Developer Guides, and more. For more information, see the Readme.md file below.Size: 118 MB - Last synced: about 2 years ago - Pushed: about 2 years ago

meyertst-aws/aws-doc-sdk-examples Fork of awsdocs/aws-doc-sdk-examples
Welcome to the AWS Code Examples Repository. This repo contains code examples used in the AWS documentation, AWS SDK Developer Guides, and more. For more information, see the Readme.rst file below.Size: 229 MB - Last synced: 7 months ago - Pushed: 7 months ago

eduardo377/aws-doc-sdk-examples-folk
Welcome to the AWS Code Examples Repository. This repo contains code examples used in the AWS documentation, AWS SDK Developer Guides, and more. For more information, see the Readme.rst file below.Last synced: over 2 years ago
LoneNinjaEngine/AWS-GATEWAY
Size: 104 MB - Last synced: about 2 years ago - Pushed: over 2 years ago

Realmadhan/aws-doc-sdk-examples Fork of awsdocs/aws-doc-sdk-examples
Welcome to the AWS Code Examples Repository. This repo contains code examples used in the AWS documentation, AWS SDK Developer Guides, and more. For more information, see the Readme.md file below.Size: 114 MB - Last synced: almost 2 years ago - Pushed: over 2 years ago

karapish/AWS Fork of awsdocs/aws-doc-sdk-examples
Welcome to the AWS Code Examples Repository. This repo contains code examples used in the AWS documentation, AWS SDK Developer Guides, and more. For more information, see the Readme.md file below.Size: 139 MB - Last synced: over 1 year ago - Pushed: over 1 year ago

Sudhir-1609/aws-doc-sdk-examples Fork of awsdocs/aws-doc-sdk-examples
Welcome to the AWS Code Examples Repository. This repo contains code examples used in the AWS documentation, AWS SDK Developer Guides, and more. For more information, see the Readme.md file below.Size: 121 MB - Last synced: almost 2 years ago - Pushed: about 2 years ago

skynetlab1/aws-doc-sdk-examples Fork of awsdocs/aws-doc-sdk-examples
Welcome to the AWS Code Examples Repository. This repo contains code examples used in the AWS documentation, AWS SDK Developer Guides, and more. For more information, see the Readme.rst file below.Size: 105 MB - Last synced: over 1 year ago - Pushed: over 1 year ago

gigamac/aws-doc-sdk-examples Fork of awsdocs/aws-doc-sdk-examples
Welcome to the AWS Code Examples Repository. This repo contains code examples used in the AWS documentation, AWS SDK Developer Guides, and more. For more information, see the Readme.md file below.Size: 119 MB - Last synced: almost 2 years ago - Pushed: about 2 years ago

social410/aws-doc-sdk-examples Fork of awsdocs/aws-doc-sdk-examples
Welcome to the AWS Code Examples Repository. This repo contains code examples used in the AWS documentation, AWS SDK Developer Guides, and more. For more information, see the Readme.rst file below.Size: 93.4 MB - Last synced: almost 2 years ago - Pushed: almost 3 years ago

asadjamal2022skipq/aws-doc-sdk-examples Fork of awsdocs/aws-doc-sdk-examples
Welcome to the AWS Code Examples Repository. This repo contains code examples used in the AWS documentation, AWS SDK Developer Guides, and more. For more information, see the Readme.md file below.Size: 128 MB - Last synced: almost 2 years ago - Pushed: about 2 years ago
