Skip to content

Commit

Permalink
Fix tests after merge
Browse files Browse the repository at this point in the history
  • Loading branch information
mullermp committed Oct 18, 2024
1 parent 7a5fd1b commit f1006df
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ def stub_data(_api, operation, data)
def stub_error(error_code)
resp = Seahorse::Client::Http::Response.new
resp.status_code = 400
resp.body = Cbor.encode(
resp.body = Aws::RpcV2.encode(
{
'code' => error_code,
'message' => 'stubbed-response-error-message'
Expand Down
8 changes: 4 additions & 4 deletions gems/aws-sdk-core/spec/aws/rpc_v2/error_handler_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ module RpcV2
end

let(:error_resp) do
Cbor.encode(
RpcV2.encode(
{
"__type": 'ServiceUnavailableException',
"message": 'foo',
Expand All @@ -20,7 +20,7 @@ module RpcV2
end

let(:invalid_error_resp) do
Cbor.encode(
RpcV2.encode(
{
"__type": 'ServiceUnavailableException:',
"message": 'foo',
Expand All @@ -30,7 +30,7 @@ module RpcV2
end

let(:un_modeled_error_resp) do
Cbor.encode(
RpcV2.encode(
{
"__type": 'UnModeledException',
"message": 'foo'
Expand All @@ -39,7 +39,7 @@ module RpcV2
end

let(:empty_struct_error_resp) do
Cbor.encode(
RpcV2.encode(
{
"__type": 'EmptyStructError',
"message": 'foo'
Expand Down
4 changes: 2 additions & 2 deletions gems/aws-sdk-core/spec/aws/rpc_v2/query_compatible_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ module RpcV2
'smithy-protocol' => 'rpc-v2-cbor',
'x-amzn-query-error' => 'Prefix.NonExistentQueue;Sender'
},
body: Cbor.encode(
body: RpcV2.encode(
{
"__type": 'com.amazonaws.sqs#QueueDoesNotExist',
"message": 'Some user-visible message'
Expand All @@ -66,7 +66,7 @@ module RpcV2
{
status_code: 400,
headers: { 'smithy-protocol' => 'rpc-v2-cbor' },
body: Cbor.encode(
body: RpcV2.encode(
{
"__type": "com.amazonaws.sqs#QueueDoesNotExist",
"message": "Some user-visible message"
Expand Down
4 changes: 2 additions & 2 deletions gems/aws-sdk-core/spec/aws/stubbing/protocols/rpc_v2_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ def normalize(data)
}

resp = RpcV2.new.stub_data(api, operation, data)
actual = normalize(Cbor.decode(resp.body.string))
actual = normalize(Aws::RpcV2.decode(resp.body.string))
expect(actual).to eq(normalize(JSON.parse(<<-JSON)))
{
"logGroups": [
Expand All @@ -79,7 +79,7 @@ def normalize(data)

it 'can stub errors' do
resp = RpcV2.new.stub_error('error-code')
actual = normalize(Cbor.decode(resp.body.string))
actual = normalize(Aws::RpcV2.decode(resp.body.string))
expect(actual).to eq(normalize(JSON.parse(<<-JSON)))
{
"code": "error-code",
Expand Down

0 comments on commit f1006df

Please sign in to comment.