Skip to content

Commit

Permalink
chg: dev: Change snapshot to snapshots
Browse files Browse the repository at this point in the history
  • Loading branch information
Rajat Venkatesh authored and Rohit Agarwal committed Jun 17, 2015
1 parent c827521 commit 779fc78
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion qds_sdk/cluster.py
Original file line number Diff line number Diff line change
Expand Up @@ -534,7 +534,7 @@ def snapshot(cls, cluster_id_label, s3_location, backup_type):
parameters['s3_location'] = s3_location
if backup_type:
parameters['backup_type'] = backup_type
return conn.post(cls.element_path(cluster_id_label) + "/snapshot", data=parameters)
return conn.post(cls.element_path(cluster_id_label) + "/snapshots", data=parameters)

@classmethod
def restore_point(cls, cluster_id_label, s3_location, backup_id, table_names, overwrite=True, automatic=True):
Expand Down
4 changes: 2 additions & 2 deletions tests/test_cluster.py
Original file line number Diff line number Diff line change
Expand Up @@ -1574,7 +1574,7 @@ def test_snapshot(self):
print_command()
Connection._api_call = Mock(return_value={})
qds.main()
Connection._api_call.assert_called_with('POST', 'clusters/1234/snapshot', {'s3_location':'myString', 'backup_type':'full'})
Connection._api_call.assert_called_with('POST', 'clusters/1234/snapshots', {'s3_location':'myString', 'backup_type':'full'})

def test_snapshot_with_no_label(self):
sys.argv = ['qds.py', 'cluster', 'snapshot', '--s3_location', 'myString', '--backup_type', 'full']
Expand All @@ -1595,7 +1595,7 @@ def test_snapshot_with_no_backup_type(self):
print_command()
Connection._api_call = Mock(return_value={})
qds.main()
Connection._api_call.assert_called_with('POST', 'clusters/1234/snapshot', {'s3_location':'myString'})
Connection._api_call.assert_called_with('POST', 'clusters/1234/snapshots', {'s3_location':'myString'})

def test_restore_point(self):
sys.argv = ['qds.py', 'cluster', 'restore_point', '--label', '1234', '--s3_location', 'myString', '--backup_id', 'abcd', '--table_names', 'tablename']
Expand Down

0 comments on commit 779fc78

Please sign in to comment.