Skip to content

Support vendor params in protocol tests #315

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

Merged
merged 5 commits into from
Jul 17, 2025
Merged

Support vendor params in protocol tests #315

merged 5 commits into from
Jul 17, 2025

Conversation

mullermp
Copy link
Contributor

@mullermp mullermp commented Jul 16, 2025

Support vendor params hook in welds for protocol tests. These are needed for additional assertions.

Usage might be like:

      def protocol_test_vendor_code
        {
          'aws.protocoltests.config#ErrorCodeParams' => ErrorCodeParams.new
        }
      end

      # Used for generating error code expectations in protocol tests.
      class ErrorCodeParams
        def error_expect_code(params)
          <<~CODE
            expect(e.code).to eq('#{params['code']}')
            # except(e.type).to eq('#{params['type']}')
          CODE
        end
      end

Copy link
Contributor

@jterapin jterapin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@mullermp mullermp merged commit 70b4af9 into decaf Jul 17, 2025
5 checks passed
@mullermp mullermp deleted the vendor_params branch July 17, 2025 15:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants