Commit Graph

109 Commits

Author SHA1 Message Date
jacky06
e4c84a9428 Replace git.openstack.org URLs with opendev.org URLs
Change-Id: I5bc44524d9f3487e3c73ed427afef641d6a17969
2019-04-26 10:03:46 +08:00
Zuul
d3dc728b90 Merge "Remove image_pull_policy field" 2019-04-09 02:29:02 +00:00
Hongbin Lu
f29ba9553c Remove image_pull_policy field
We are going to limit users who have admin privilege to access
this field. This commit removes this field from tempest test.

Change-Id: I02438b18c7bf852788f6842e0889acff9cc19ed7
2019-04-07 22:03:27 +00:00
Hongbin Lu
7dba9f70c4 Test capsule with cinder volume
Depends-On: https://review.openstack.org/#/c/638999/
Change-Id: I54c7076e7b412c85a0ad377229bc726f328eaf66
2019-03-02 17:56:56 +00:00
Hongbin Lu
e1d8cb3c73 Ensure capsules is deleted
Starting from API version 1.32, the capsule deletion become asynchronized.
After issuing a delete request, we need to continuely check the status
and wait for the deletion to be completed.

Change-Id: I963ee2ded063417dbc4f25705adf39b977fc5171
2019-02-17 20:43:53 +00:00
Hongbin Lu
8a685f86b3 Minor cleanup on the TestCapsule class
Change-Id: I7d30bb9e8d1e886ce033247b2a21595dfac4d80b
2019-02-17 16:23:55 +00:00
Zuul
499783e8fd Merge "Cap capsule tests to api version 1.31" 2019-02-17 00:27:44 +00:00
Hongbin Lu
781a6d69bd Cap capsule tests to api version 1.31
As we will introduce a new API version 1.32, existing capsule test suit
needs to be updated. This commit skips the existing capsule test suit
unless the API version is 1.31 or lower. A follow-up patch will introduce
a new test suit for API version 1.32 or later.

Change-Id: I9ab335e652f396e039dc9197c51abc4130b5a3c6
2019-02-16 21:08:27 +00:00
Hongbin Lu
b231323397 Test create ipv4 port on dual net
Change-Id: I65b3ad02c450eea3f714a1fd02d60c3f395d925f
Related-Bug: #1800375
2019-01-25 03:24:31 +00:00
Hongbin Lu
24f8e847bc Test running container from dual_net
Change-Id: I5ea8147d4d348366a7af8b52cdbc96c7bde12d37
2018-12-26 20:56:31 +00:00
Hongbin Lu
2e74efcdaa Refactor port creation code
Introduce a method 'create_port' in base test class.
This allows subclass reuse the port creation logic.

Change-Id: Ib5ed02b765f22f9231d1d380152ab80478412351
2018-12-26 20:52:19 +00:00
Hongbin Lu
a3ed016af4 Use Zun's API to cleanup network after test
Starting from API version 1.27, there is an API to delete docker
network. This commit modifies the tests to use this new API.

Depends-On: https://review.openstack.org/#/c/615402/
Change-Id: Ib979d911a15818bdadce025db569c24c5dbb49e0
2018-12-09 22:14:56 +00:00
Hongbin Lu
50ec15fd93 Move docker network cleanup logic
Right now, both container and capsule tests are doing docker
network cleanup at the end of the tests. This commit moves
the cleanup logic to a common base class so that the code becomes
more DRY.

Change-Id: I9320f73f68b50954e57a1b9f0e3cc01c53ba102a
2018-12-09 21:36:51 +00:00
Hongbin Lu
3d8b64b79b Move create_subnet into base class
This consolidate the logic to create/cleanup neutron subnet.

Change-Id: I731b78eb05dfa06a1c459872cc3941a43dd80327
2018-10-31 03:50:56 +00:00
Hongbin Lu
4e732fe5e9 Move create_network logic into base class
This consolidate the logic to create/cleanup neutron network.

Change-Id: I580f16037527d0c58560e56b1428db4932790c6b
2018-10-31 03:50:49 +00:00
Hongbin Lu
0189d4148a Fix incorrect usage of assertTrue
There are several usage of assertTrue is obviously wrong.
This commit fixes it.

Change-Id: I5f9f0a3ccb354a1dedd84d5024544c0f69e393fd
2018-10-31 02:50:07 +00:00
Hongbin Lu
9988487a20 Add tempest test for legacy API version
Currently, the container test cases requires API version 1.20
or higher. This commit adds legacy test class to cover
API version 1.19 or lower.

Change-Id: I5e5f23ceab5438f6025beb9dc6ac1ffebd33f9a9
2018-10-15 04:24:27 +00:00
Zuul
b38210e6a4 Merge "Test dynamic-created cinder volume" 2018-10-13 16:08:21 +00:00
Hongbin Lu
94392a91d2 Test dynamic-created cinder volume
Add a test case to run a container with cinder volume dynamically
created. Assert the volume is actually created in cinder and
it is automatically removed when the container is deleted.

Depends-On: https://review.openstack.org/#/c/606613/
Change-Id: I4535da25c56d7e969b5deac7ca848790889fa661
Related-Bug: #1791469
2018-09-29 19:19:47 +00:00
Zuul
f0635205db Merge "Revert "Revert "Re-enable update container test""" 2018-09-26 02:49:18 +00:00
Zuul
2d0c7c42da Merge "Don't force delete containers" 2018-09-24 00:01:43 +00:00
Hongbin Lu
d95d761f4c Revert "Revert "Re-enable update container test""
This reverts commit d8280b83f9.

Depends-On: I8056c74c1d22dcdba2da858ed4a8784a9a3b0685
Change-Id: I272e3b19245088d20e4b67cf119352435a072a85
2018-09-21 02:31:38 +00:00
Hongbin Lu
5686ef6e1c Revert "Revert "Re-enable rename container test""
This reverts commit 4b9e5ddfc4.

Change-Id: Ie5e4c6990022f95ecb0afa0fdd32efc9664a98e5
2018-09-20 02:39:21 +00:00
Hongbin Lu
731d2e6f3f Don't force delete containers
Change-Id: Ibf458d27ce3f1d5464f00c7fd7a592628641f24c
2018-09-08 21:56:54 +00:00
Hongbin Lu
14ed11c720 Add test case for injected file
Change-Id: I350e8d8f183f1c0329f04e3dd3053de75240830f
2018-09-07 01:33:11 +00:00
Hongbin Lu
37a5de6930 Add tests for get/put_archive with encoded data
* Add decorate to skip test case based on selected api
  version.
* If the selected api version is 1.24 or lower, run the test
  case to get/put_archive without encoding
* If the selected api version is 1.25 or higher, run the test
  case to get/put_archive with encoded data.

Related-Bug: #1789777
Change-Id: I3cfc8f0bf5c94d7ed63c111773cebd0aa2811787
2018-09-07 01:06:17 +00:00
Hongbin Lu
517dad8552 Change type of command from string to list
Starting from api version 1.20, the type of parameter 'command'
changed from string to list [1]. This patch updates the tempest
test cases about that and bump the api version to 1.20.

This patch also removes test 'test_add_and_remove_sg_to_container'
because this test is not needed (the APIs for adding/removing
security groups are deprecated).

[1] https://review.openstack.org/#/c/575709/

Depends-On: Iee7d2db97eb274da7b5c6348d97475987db88b56
Change-Id: I09d578173e390e57d165aa58b2437c29b7b0273c
2018-08-31 01:11:36 +00:00
Hongbin Lu
fd84e5affd Use 'volumev3' as a service type
Tempest has removed 'api_version' [1] that was used to select
service type, so we explicitely specifies volume v3 as service type.

[1] https://review.openstack.org/#/c/590096/

Change-Id: I85e6af13a9301228abf94872b005e196a11d0ae9
2018-08-15 15:08:41 +00:00
Zuul
d2b1f1b899 Merge "Revert "Disable two container restart test cases"" 2018-07-07 15:02:20 +00:00
Hongbin Lu
46f8378395 Test full capsule template
Change-Id: Ia52750f804ce363e1082c4d67747c04ac8204ad5
2018-07-06 02:54:15 +00:00
Hongbin Lu
e5eb56d83c Test container bind-mount cinder volume
Change-Id: I69c47d25fa53f8e08efad9daa71d2f550425a5e7
2018-06-13 03:11:44 +00:00
Hongbin Lu
78fdfb8f32 Revert "Disable two container restart test cases"
This reverts commit fb75b5e3f9.

Change-Id: I5f066cf393b601fe9f3b71653d27cb52f6610683
2018-06-08 14:05:53 +00:00
Hongbin Lu
fb75b5e3f9 Disable two container restart test cases
These two tests failed the gate often. Temporarily disable it to
unblock the gate.

Change-Id: I04d1b8b0c7fdae9837e9a6866b3012862df52155
Related-Bug: #1758754
2018-06-08 01:56:58 +00:00
Hongbin Lu
d8280b83f9 Revert "Re-enable update container test"
This reverts commit 29fc7e5bd8.

Change-Id: Ib400b2864025a09cb076c7d3d19d7794eef7cb27
Partial-Bug: #1771640
2018-05-16 18:09:01 +00:00
Hongbin Lu
29fc7e5bd8 Re-enable update container test
The test was disabled by https://review.openstack.org/#/c/562100/
This patch re-enable it.

Depends-On: I5f586ccc73f53a5f6e6e4d341251a5288a8687f2
Change-Id: Ibb9ee2edbb2bf60ff8adf7f247383fb62674b758
Related-Bug: #1764923
2018-05-09 15:34:52 +00:00
Zuul
37a8f94360 Merge "Add test cases for capsule" 2018-04-21 16:07:30 +00:00
Hongbin Lu
6c154093b7 Skip container update test
We are going to change the format the memory field, so temporarily
disable this test case. It will be re-enabled once the change is
finished

Change-Id: Ief00d4899a9628967aa6ea875aa4195cc4f2bfc4
Related-Bug: #1764923
2018-04-18 03:10:40 +00:00
Hongbin Lu
1c08d47a3d Add test cases for capsule
Change-Id: Ic8aae6ad83414f73d67cd9d31f2a26e0f9ebbba0
2018-04-15 18:19:44 +00:00
Zuul
38e1864cf1 Merge "Tempest tests to verify shared network" 2018-04-09 02:39:46 +00:00
deepak_mourya
1c961c95fd Disable test_rename_container test
Disabling this test as it was blocking
patch.[0]. We can enable the this test after the
feature is implemented.

[0]https://review.openstack.org/#/c/557595/

Change-Id: I0aeb155bc85f1dfbd436be1d39568b0f90ccf027
2018-04-05 11:10:37 +05:30
Kien Nguyen
9b62447eac Tempest tests to verify shared network
Change-Id: I6b6d416e53471bb9cdafc6bcc4c642f127c21a1b
Closes-Bug: #1734551
2018-03-26 16:07:06 +00:00
Zuul
3f9055cdca Merge "Cleanup the created security groups" 2018-03-20 16:39:09 +00:00
deepak_mourya
37456f57eb Add tempest test for the 'nets' parameter
This patch will add the tempest test for the 'nets' parameter.
The test pre-creates a neutron port and run a container with
the pre-created neutron port. This test verifies the Zun container
will work with an existing neutron port.

Closes-bug: #1753270

Change-Id: Ie00deb46b879e7625ec83141715d9383ce961469
2018-03-17 01:05:57 +00:00
Hongbin Lu
6cae7e41ef Cleanup the created security groups
The security groups created in test needs to be cleanup after.
In addition, refactor the image cleanup code.

Change-Id: Ic088bc26bf786f2844d4fba5dbeca0a3256ad8a9
2018-03-14 04:39:49 +00:00
Zuul
3f3c74f400 Merge "Test remove security group in tempest tests" 2018-03-12 10:40:39 +00:00
Hongbin Lu
e52e7930d4 Handle python 2 and 3 compatibility
* Use six.b('') instead of '' for handling the difference
  between string and bytes in python 2 and 3.
* Use six.BytesIO instead of six.StringIO for processing
  data in bytes.

Depends-On: I3def3147aedbff56e594f4e7addc80054bd3aaa4
Change-Id: Iab8fe32def4590759433404c872a25f050f6a29e
2018-03-10 18:25:32 +00:00
deepak_mourya
73715596d6 Test remove security group in tempest tests
This test will use to remove security group  from
the container.

Depends-On: Ife757d85f0ea6920e10d45d8a07703a38ec85d1f
Change-Id: Id9accbc8139e268775be68a85b7d3892033181df
Closes-Bug: #1749351
2018-03-10 03:02:27 +00:00
Kien Nguyen
3767dc3698 Add tempest tests for get_archive/put_archive
Change-Id: I3e0e3e344892f49b2626e5234cfc1275a61959d0
Closes-Bug: #1676061
2018-03-09 13:22:15 +07:00
Zuul
3a59da8c09 Merge "Update our service definition" 2018-03-09 02:58:02 +00:00
Kien Nguyen
d9ffddc874 Fix Docker-py 3.1.0 return generator
I've tested it in my local environment & it works.

$ pip install docker==3.1.0
$ tox -eall-plugin -- \
    zun_tempest_plugin.tests.\
    tempest.api.test_containers.\
    TestContainer.\
    test_run_container_with_image_driver_glance

Change-Id: I6b283024e70ad414f993d2d042f05eb988bdb7a4
Partial-Bug: #1753080
2018-03-07 15:53:41 +07:00