Commit Graph

140 Commits

Author SHA1 Message Date
Hongbin Lu 6d2529583b Temporarily disable capsule tests
Related-Bug: #1941982
Change-Id: I219042307bea53ae56515c95b380b4c4cfb03c4d
2021-08-29 17:19:30 +08:00
Zuul f34364a7bc Merge "Use tempest's ServiceClients rather than Manager" 2020-12-29 10:52:30 +00:00
Hongbin Lu 49df2e2f7d Change image in glance driver test
Use docker image 'alpine' (instead of 'cirros') to avoid conflict
with other tests.

Closes-Bug: #1909454
Change-Id: Idec49b2bef2a2b4a91b301aa1a1a64408511a36e
2020-12-28 16:54:09 +08:00
Martin Kopec 334b6139a4 Use tempest's ServiceClients rather than Manager
tempest.Manager has been deprecated for more than 4 years already
and will be removed by [1].
Tempest plugins are expected to consume
tempest.lib.services.clients.ServiceClients directly.

[1] https://review.opendev.org/c/openstack/tempest/+/767628

Change-Id: I84afb611cb994ce0ef5eaa94fd14612d00327182
2020-12-21 11:59:55 +00:00
Hongbin Lu b81e8cbad6 Increase timeout to create a container or capsule
Change-Id: I7998b30eb46552fb84dc1edf52ece1b88d72227f
2020-09-28 04:35:01 +00:00
Hongbin Lu 275d2087ef Sleep 1 second to wait for logs
After introducing the CNI network driver for docker, there are
some delay for container to print out the logs.
This commit modifies the relevant tests to accommodate such delay.

Change-Id: I9a1eddadc0e9729a385713da314ebd5285107850
2020-09-12 21:47:28 +00:00
Hongbin Lu 6db3f1eb2f Use entrypoint in test_commit_container
Move "/bin/sh -c" from command to entrypoint which aligns with
the common practice.
Since entrypoint is supported since api version 1.40, we keep
the old test for testing api version earlier than 1.39.

Change-Id: I3d85fe16f9d992efb2365ec6c78f08323d5950d1
2020-09-08 02:58:49 +00:00
Zuul f88ab90318 Merge "Add container network connectivity test" 2020-08-25 18:26:19 +00:00
Hongbin Lu 1502b7a567 Add container network connectivity test
Change-Id: I55f1d5cd209d5baa80783b05a16ae6d1d5745663
2020-08-25 01:58:28 +00:00
Hongbin Lu b5c6b0349e Remove assertion of neutron port tagging
Neutron port won't be tagging on CNI network driver.

Change-Id: I6d4f70976f74eb4167c033e1af1db6a0857fdd86
2020-08-09 05:32:40 +00:00
Zuul 4a69e89f38 Merge "Test container in subnet without gateway_ip" 2020-07-05 04:43:51 +00:00
Hongbin Lu 1e6bcd4759 Test container in subnet without gateway_ip
Related-Bug: #1881910
Change-Id: I89a25883b6341357d6d98b60445eba9d0fe69623
2020-06-07 23:38:56 +00:00
Hongbin Lu ab1fc1ab9f Verify capsule's containers status
After a capsule is successfully created, iterate each containers
of this capsule and verify its status.

Depends-On: https://review.opendev.org/#/c/730513/
Change-Id: I862ce25f0072724870462a6f5bc9633ac66cea4f
2020-05-25 13:44:52 +00:00
jacky06 5a193ab20f Update hacking for Python3
The repo is Python 3 now, so update hacking to version 3.0 which
supports Python 3.

Fix problems found.

Change-Id: I16995f9237168d16c834662876683760127aabb3
2020-05-06 13:28:00 +08:00
jacky06 06439d33a5 Remove six
Change-Id: I1c9dd70d2d3319ad9012620fe8478316f6a940d2
2020-05-05 12:30:42 +08:00
Hongbin Lu a5ff9442ec Add test case for requested host
Depends-On: https://review.opendev.org/#/c/711864/
Change-Id: I78f534c6464231059806c008de278f4a13e8fc31
2020-03-15 17:28:54 +00:00
Zuul 0d639a465e Merge "Add tempest test for init containers" 2019-09-01 23:18:35 +00:00
Zuul 221ca1ad8d Merge "Skip tests if glance is not available" 2019-08-18 19:50:16 +00:00
Hongbin Lu 7103718418 Skip tests if glance is not available
There are some tests requiring glance service. If glance service
is not available, we want to skip those tests instead of failing
them. The following are the affected tests:
* test_commit_container
* test_run_container_with_image_driver_glance

Change-Id: Iee1f53c905863eb842535090a2bb67c3babf9b05
2019-08-18 15:46:46 +00:00
Hongbin Lu b889260732 Add tempest test for rebuild
Depends-On: https://review.opendev.org/#/c/654254/
Change-Id: I32a170658ed713317bb8bf713ed9ecf3642087c7
2019-07-27 21:23:47 +00:00
Hongbin Lu f3cf3fe34e Add tempest test for init containers
Depends-On: https://review.opendev.org/#/c/657280/
Change-Id: I09a52e254af8f49834c2d664a0ea364c55d6c0d6
2019-07-27 21:23:22 +00:00
Zuul fbc14c99bb Merge "Remove tests for docker container" 2019-06-30 00:09:26 +00:00
Hongbin Lu d4387a34c7 Disable SSL certificate validation
Starting from urllib3 1.25.x, it validate SSL certificate by default,
which failed our CI.

Change-Id: I7528bc4b562e0701c40c7e8b482d5a50783abcdf
2019-06-26 04:12:27 +00:00
Hongbin Lu 552948142d Remove tests for docker container
Tests for verifying docker containers is removed from tempest
test suite and re-introduce in fullstack tests.
This is because tempest tests are supposed to be a pure API tests.
Touching docker containers are beyond the scope of tempest tests
so we split them out.

Depends-On: https://review.opendev.org/#/c/658702/
Change-Id: I5eb04993f39a4098cde4293fccd07f8458a1cd5d
2019-06-09 16:37:15 +00:00
Zuul 841c7d3793 Merge "Add test for exposing container ports" 2019-05-18 16:45:05 +00:00
Zuul 0cabbb1697 Merge "Remove assertion of neutron port tags removal" 2019-05-08 06:13:37 +00:00
Hongbin Lu 64a63385e7 Remove assertion of neutron port tags removal
Change-Id: Ie3cbeeff7b45b141da9ca2853f07b82297f50850
Related-Bug: #1776035
2019-05-06 03:03:03 +00:00
Hongbin Lu 6327701485 Remove assertion of resource constraint
This assertion doesn't work well in multinode gate. This commit
removes them temporarily. Later, we will revisit this logic.
Perhaps, we can re-introduce it in a non-tempest pipeline.

Change-Id: I299ae26ba6de5ed438579dd73d59416a54b0be98
2019-05-06 02:55:47 +00:00
Hongbin Lu 3448f61a60 Add test for exposing container ports
Change-Id: Ic35e93b8b489d4fc01b5a660647cc37cb2fcf72c
2019-05-04 23:50:58 +00:00
Zuul e8d537f847 Merge "Verify container's port attributes" 2019-04-28 05:59:04 +00:00
jacky06 e4c84a9428 Replace git.openstack.org URLs with opendev.org URLs
Change-Id: I5bc44524d9f3487e3c73ed427afef641d6a17969
2019-04-26 10:03:46 +08:00
Hongbin Lu 3a03fdcc60 Verify container's port attributes
Verify several neutron port attributes when the port is created,
when the port is bound to a container, when the container is deleted.

Change-Id: Ic33cbe2b5a3259718562b510344cd1b537fedde1
2019-04-20 22:23:08 +00: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