Documentation
¶
Overview ¶
Package sdkcheck provides helpers for verifying that gopherstack service handlers cover all operations exposed by the corresponding AWS SDK v2 client.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckCompleteness ¶
func CheckCompleteness(tb testing.TB, sdkClientPtr any, supportedOps []string, notImplemented []string)
CheckCompleteness verifies that every exported method on sdkClientPtr is either listed in supportedOps (the handler's GetSupportedOperations slice) or explicitly listed in notImplemented. It also performs quality checks on the two lists themselves.
sdkClientPtr must be a non-nil pointer to an AWS SDK v2 Client struct, e.g. &s3.Client{}.
The test fails if:
- sdkClientPtr is nil or not a pointer type.
- An SDK method is not accounted for in either list (new upstream operation).
- notImplemented contains entries that are not real SDK methods (typos / SDK renames).
- notImplemented contains duplicate entries.
- supportedOps contains duplicate entries.
- supportedOps and notImplemented contain overlapping entries.
The "Options" method, which exists on every AWS SDK v2 Client but is not an API operation, is always excluded from the check.
Types ¶
This section is empty.