File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed
google-apis-core/spec/google/apis/core Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change 255255 command . options . add_invocation_id_header = true
256256 result = command . execute ( client )
257257 invocation_id_header = command . header [ "X-Goog-Api-Client" ]
258-
259258 expect ( invocation_id_header ) . to include ( "gccl-invocation-id" )
260259 expect ( a_request ( :get , 'https://www.googleapis.com/zoo/animals' )
261260 . with { |req | req . headers [ 'X-Goog-Api-Client' ] == invocation_id_header } ) . to have_been_made . times ( 2 )
262261 end
262+
263+ it 'should keep same idempotency_token across retries' do
264+ command . options . add_idempotency_token_header = true
265+ result = command . execute ( client )
266+ idempotency_token_header = command . header [ 'X-Goog-Gcs-Idempotency-Token' ]
267+ expect ( command . header [ 'X-Goog-Gcs-Idempotency-Token' ] ) . to eq ( idempotency_token_header )
268+ end
263269 end
264270
265271 context ( 'with a project not linked response' ) do
You can’t perform that action at this time.
0 commit comments