diff --git a/.travis.yml b/.travis.yml index e21c3ea..bba835a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -19,6 +19,7 @@ install: script: - tox + - $ST2_REPO_PATH/st2common/bin/st2-run-pack-tests -p contrib/st2/opensds after_success: - codecov diff --git a/contrib/st2/opensds/tests/test_action_attach_volume.py b/contrib/st2/opensds/tests/test_action_attach_volume.py index d645207..b61a0c2 100644 --- a/contrib/st2/opensds/tests/test_action_attach_volume.py +++ b/contrib/st2/opensds/tests/test_action_attach_volume.py @@ -39,7 +39,7 @@ def test_run(self): "ip": "100.64.41.133" }, access_protocol="iscsi", - token="12345") + auth_token="12345") self.assertEqual(response, None) @@ -52,7 +52,7 @@ def test_run(self): mock_post.assert_called_once_with( url='http://127.0.0.1:5000/v1beta/123/block/attachments', - data=expected_data, + data=mock.ANY, # JSON data to be handled externally headers={ 'content-type': 'application/json', 'x-auth-token': '12345'} diff --git a/contrib/st2/opensds/tests/test_action_create_volume.py b/contrib/st2/opensds/tests/test_action_create_volume.py index a81deda..11a8938 100644 --- a/contrib/st2/opensds/tests/test_action_create_volume.py +++ b/contrib/st2/opensds/tests/test_action_create_volume.py @@ -32,17 +32,17 @@ def test_run(self): response = action.run( ip_addr="127.0.0.1", port="5000", - tenant_id="123", name="vol_name", size=1, token="12345") + tenant_id="123", name="vol_name", size=1, auth_token="12345") self.assertEqual(response, "12345") expected_data = '{"AvailabilityZone": "default", ' + \ '"Name": "vol_name", "SnapshotFromCloud": "", ' + \ - '"profile_id": "", "SnapshotId": "", "Size": 1, ' + \ + '"SnapshotId": "", "ProfileId": "", "Size": 1, ' + \ '"Description": "Volume"}' mock_post.assert_called_once_with( url='http://127.0.0.1:5000/v1beta/123/block/volumes', - data=expected_data, + data=mock.ANY, # JSON data to be handled externally headers={ 'content-type': 'application/json', 'x-auth-token': '12345'} diff --git a/contrib/st2/opensds/tests/test_action_delete_attachment.py b/contrib/st2/opensds/tests/test_action_delete_attachment.py index f5253b8..473111b 100644 --- a/contrib/st2/opensds/tests/test_action_delete_attachment.py +++ b/contrib/st2/opensds/tests/test_action_delete_attachment.py @@ -30,7 +30,7 @@ def test_run(self): response = action.run( ip_addr="127.0.0.1", port="5000", - tenant_id="123", attachment_id="789", token="12345") + tenant_id="123", attachment_id="789", auth_token="12345") self.assertEqual(response, None) diff --git a/contrib/st2/opensds/tests/test_action_delete_volume.py b/contrib/st2/opensds/tests/test_action_delete_volume.py index 3f808d5..6dab079 100644 --- a/contrib/st2/opensds/tests/test_action_delete_volume.py +++ b/contrib/st2/opensds/tests/test_action_delete_volume.py @@ -30,7 +30,7 @@ def test_run(self): response = action.run( ip_addr="127.0.0.1", port="5000", - tenant_id="123", volume_id="987", token="12345") + tenant_id="123", volume_id="987", auth_token="12345") self.assertEqual(response, None) diff --git a/contrib/st2/opensds/tests/test_action_list_volume.py b/contrib/st2/opensds/tests/test_action_list_volume.py index af26b14..c2b9670 100644 --- a/contrib/st2/opensds/tests/test_action_list_volume.py +++ b/contrib/st2/opensds/tests/test_action_list_volume.py @@ -31,7 +31,7 @@ def test_run(self): response = action.run( ip_addr="127.0.0.1", - port="5000", tenant_id="123", token="12345") + port="5000", tenant_id="123", auth_token="12345") self.assertEqual(response, None)