Skip to content

Commit bbc5204

Browse files
author
Joseph Vazhappilly
committed
Rebase packs tests
1 parent 56a23e6 commit bbc5204

6 files changed

+9
-8
lines changed

.travis.yml

+1
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ install:
1919

2020
script:
2121
- tox
22+
- $ST2_REPO_PATH/st2common/bin/st2-run-pack-tests -p contrib/st2/opensds
2223

2324
after_success:
2425
- codecov

contrib/st2/opensds/tests/test_action_attach_volume.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ def test_run(self):
3939
"ip": "100.64.41.133"
4040
},
4141
access_protocol="iscsi",
42-
token="12345")
42+
auth_token="12345")
4343

4444
self.assertEqual(response, None)
4545

@@ -52,7 +52,7 @@ def test_run(self):
5252

5353
mock_post.assert_called_once_with(
5454
url='http://127.0.0.1:5000/v1beta/123/block/attachments',
55-
data=expected_data,
55+
data=mock.ANY, # JSON data to be handled externally
5656
headers={
5757
'content-type': 'application/json',
5858
'x-auth-token': '12345'}

contrib/st2/opensds/tests/test_action_create_volume.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -32,17 +32,17 @@ def test_run(self):
3232

3333
response = action.run(
3434
ip_addr="127.0.0.1", port="5000",
35-
tenant_id="123", name="vol_name", size=1, token="12345")
35+
tenant_id="123", name="vol_name", size=1, auth_token="12345")
3636

3737
self.assertEqual(response, "12345")
3838
expected_data = '{"AvailabilityZone": "default", ' + \
3939
'"Name": "vol_name", "SnapshotFromCloud": "", ' + \
40-
'"profile_id": "", "SnapshotId": "", "Size": 1, ' + \
40+
'"SnapshotId": "", "ProfileId": "", "Size": 1, ' + \
4141
'"Description": "Volume"}'
4242

4343
mock_post.assert_called_once_with(
4444
url='http://127.0.0.1:5000/v1beta/123/block/volumes',
45-
data=expected_data,
45+
data=mock.ANY, # JSON data to be handled externally
4646
headers={
4747
'content-type': 'application/json',
4848
'x-auth-token': '12345'}

contrib/st2/opensds/tests/test_action_delete_attachment.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ def test_run(self):
3030

3131
response = action.run(
3232
ip_addr="127.0.0.1", port="5000",
33-
tenant_id="123", attachment_id="789", token="12345")
33+
tenant_id="123", attachment_id="789", auth_token="12345")
3434

3535
self.assertEqual(response, None)
3636

contrib/st2/opensds/tests/test_action_delete_volume.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ def test_run(self):
3030

3131
response = action.run(
3232
ip_addr="127.0.0.1", port="5000",
33-
tenant_id="123", volume_id="987", token="12345")
33+
tenant_id="123", volume_id="987", auth_token="12345")
3434

3535
self.assertEqual(response, None)
3636

contrib/st2/opensds/tests/test_action_list_volume.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ def test_run(self):
3131

3232
response = action.run(
3333
ip_addr="127.0.0.1",
34-
port="5000", tenant_id="123", token="12345")
34+
port="5000", tenant_id="123", auth_token="12345")
3535

3636
self.assertEqual(response, None)
3737

0 commit comments

Comments
 (0)