Skip to content

Commit

Permalink
Rebase packs tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Joseph Vazhappilly committed May 29, 2019
1 parent 56a23e6 commit bbc5204
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 8 deletions.
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ install:

script:
- tox
- $ST2_REPO_PATH/st2common/bin/st2-run-pack-tests -p contrib/st2/opensds

after_success:
- codecov
4 changes: 2 additions & 2 deletions contrib/st2/opensds/tests/test_action_attach_volume.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand All @@ -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'}
Expand Down
6 changes: 3 additions & 3 deletions contrib/st2/opensds/tests/test_action_create_volume.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'}
Expand Down
2 changes: 1 addition & 1 deletion contrib/st2/opensds/tests/test_action_delete_attachment.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
2 changes: 1 addition & 1 deletion contrib/st2/opensds/tests/test_action_delete_volume.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
2 changes: 1 addition & 1 deletion contrib/st2/opensds/tests/test_action_list_volume.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down

0 comments on commit bbc5204

Please sign in to comment.