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)
response = Excon::Response.new
response.status = 200
snapshot_id = Fog::AWS::Mock.snapshot_id
data = {
'snapshotId' => snapshot_id,
}
snapshot_id = Fog::AWS::Mock.snapshot_id
data = self.data[:snapshots]["#{source_db_snapshot_identifier}"]
data['DBSnapshotIdentifier'] = snapshot_id
self.data[:snapshots][snapshot_id] = data
response.body = {
'requestId' => Fog::AWS::Mock.request_id
}.merge!(data)
'requestId' => Fog::AWS::Mock.request_id,
'CopyDBSnapshotResult' => {'DBSnapshot' => data.dup}
}
response
end
end