1
0
Fork 0
mirror of https://github.com/fog/fog-aws.git synced 2022-11-09 13:50:52 -05:00

Copy DB Snapshot mock correct response

This commit is contained in:
Jack Thomas 2016-07-13 11:21:06 +01:00
parent a9e847d622
commit 9f8ef535d7

View file

@ -37,14 +37,14 @@ module Fog
def copy_db_snapshot(source_db_snapshot_identifier, target_db_snapshot_identifier, copy_tags = false) def copy_db_snapshot(source_db_snapshot_identifier, target_db_snapshot_identifier, copy_tags = false)
response = Excon::Response.new response = Excon::Response.new
response.status = 200 response.status = 200
snapshot_id = Fog::AWS::Mock.snapshot_id snapshot_id = Fog::AWS::Mock.snapshot_id
data = { data = self.data[:snapshots]["#{source_db_snapshot_identifier}"]
'snapshotId' => snapshot_id, data['DBSnapshotIdentifier'] = snapshot_id
}
self.data[:snapshots][snapshot_id] = data self.data[:snapshots][snapshot_id] = data
response.body = { response.body = {
'requestId' => Fog::AWS::Mock.request_id 'requestId' => Fog::AWS::Mock.request_id,
}.merge!(data) 'CopyDBSnapshotResult' => {'DBSnapshot' => data.dup}
}
response response
end end
end end