Skip to content

Commit

Permalink
Cleanups from PR
Browse files Browse the repository at this point in the history
  • Loading branch information
alextwoods committed Jul 15, 2024
1 parent c63c643 commit ec5cc1b
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 13 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"metadata": {
"endpointPrefix": "svc",
"serviceId": "sensitive_svc",
"serviceId": "sample_svc",
"protocol": "rest-json"
},
"operations":{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,6 @@
SpecHelper.generate_service(['Sensitive'], multiple_files: false)
end

let(:token) { 'token' }

let(:token_provider) { Aws::StaticTokenProvider.new(token) }

let(:client) do
Sensitive::Client.new(
stub_responses: true,
Expand All @@ -21,15 +17,29 @@
describe '#kitchen_sink' do
it 'filters all sensitive members' do
resp = client.kitchen_sink_operation
puts resp
expect(resp.to_s).to eq(
(<<-OUTPUT
{:blob=>"[FILTERED]", :boolean=>"[FILTERED]", :double=>"[FILTERED]", :empty_struct=>{}, :float=>"[FILTERED]", :integer=>"[FILTERED]", :json_value=>"[FILTERED]", :list_of_strings=>"[FILTERED]", :list_of_structs=>"[FILTERED]", :long=>"[FILTERED]", :map_of_lists_of_strings=>"[FILTERED]", :map_of_maps=>"[FILTERED]", :map_of_strings=>"[FILTERED]", :map_of_structs=>"[FILTERED]", :simple_struct=>"[FILTERED]", :string=>"[FILTERED]", :struct_with_json_name=>{:value=>"[FILTERED]"}, :timestamp=>"[FILTERED]"}
OUTPUT
).strip
)
expected = {
blob: '[FILTERED]',
boolean: '[FILTERED]',
double: '[FILTERED]',
empty_struct: {},
float: '[FILTERED]',
integer: '[FILTERED]',
json_value: '[FILTERED]',
list_of_strings: '[FILTERED]',
list_of_structs: '[FILTERED]',
long: '[FILTERED]',
map_of_lists_of_strings: '[FILTERED]',
map_of_maps: '[FILTERED]',
map_of_strings: '[FILTERED]',
map_of_structs: '[FILTERED]',
simple_struct: '[FILTERED]',
string: '[FILTERED]',
struct_with_json_name: { value: '[FILTERED]' },
timestamp: '[FILTERED]'
}

expect(resp.to_s).to eq(expected.to_s)
end
end

end
end

0 comments on commit ec5cc1b

Please sign in to comment.