Commit Graph

166 Commits

Author SHA1 Message Date
Ian Wienand bf9186a37e Fallback to upstream for Fedora image
OpenDev infra only keep around the latest two Fedora releases in their
mirrors.  Probe for the image from the local test mirror, but if not
found, fallback to upstream.  This will be much less reliable, but can
avoid gate breakage until new images can be used.

Also, use endpoint_type when creating keystoneclient

Keystone admin endpoint has been removed from devstack with[1].
This would use the public endpoint by default.

Change-Id: I96ab14871ee8c5d5b83cc0cd4abc840ef0218ca8
2021-11-12 15:32:19 +05:30
Takashi Kajinami 1828df32fa Use Block Storage API v3 instead of API v2
Block Storage API v2 was deprecated during Pike cycle and is being
removed during Xena cycle, and current v3 API should be used instead.
Unused volume_client and network_client in integration test code are
also removed by this change.

Note:
granade tests is made non-voting temporally until the same issue is
fixed in stable/wallaby.

Depends-on: https://review.opendev.org/802150/
Change-Id: I6a2b5afa13480791971bbd8bba1f43b9f2db8294
2021-08-02 14:39:30 +09:00
Sam Kumar d2be2f9cfe Add test cases to check user{domain}
pattern.

Heat uses domain in user{domain} pattern to
find the user in the corresponding domain.

Change-Id: Ic01877e2524e094b087fcbddac7504356e395031
Story:2007867
Task:40234
2020-11-17 15:19:13 +00:00
Zuul 607d73ea6f Merge "Remove handling for client status races" 2020-11-16 09:20:26 +00:00
ricolin 6fe5230a34 Add more information for tests
Change-Id: Id0b1056398e1b186a336eec4244c446b5767e1a0
2020-11-13 00:48:04 +08:00
Rabi Mishra 6d697ad2f0 Fix pep8 E741 errors
Change-Id: Ibb0da11fd89876602a6da62d08834937b81c2ce6
2020-05-12 11:28:31 +05:30
Hervé Beraud 8c96a4d856 Remove six and python 2.7 full support
Six is in use to help us to keep support for python 2.7.
Since the ussuri cycle we decide to remove the python 2.7
support so we can go ahead and also remove six usage from
the python code.

Review process and help
-----------------------
Removing six introduce a lot of changes and an huge amount of modified files
To simplify reviews we decided to split changes into several patches to avoid
painful reviews and avoid mistakes.

To review this patch you can use the six documentation [1] to obtain help and
understand choices.

Additional informations
-----------------------
Changes related to 'six.b(data)' [2]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

six.b [2] encode the given datas in latin-1 in python3 so I did the same
things in this patch.

Latin-1 is equal to iso-8859-1 [3].

This encoding is the default encoding [4] of certain descriptive HTTP
headers.

I suggest to keep latin-1 for the moment and to move to another encoding
in a follow-up patch if needed to move to most powerful encoding (utf8).

HTML4 support utf8 charset and utf8 is the default charset for HTML5 [5].

Note that this commit message is autogenerated and not necesserly contains
changes related to 'six.b'

[1] https://six.readthedocs.io/
[2] https://six.readthedocs.io/#six.b
[3] https://docs.python.org/3/library/codecs.html#standard-encodings
[4] https://www.w3schools.com/charsets/ref_html_8859.asp
[5] https://www.w3schools.com/html/html_charset.asp

Patch 28 of a serie of 28 patches
six fully removed now!
Thank you six for the rendered services!

Change-Id: If44ee4b565cc9390fa0422fba4dda080b4f90b98
2020-04-23 14:49:12 +02:00
ricolin c8d1a9f901 Migrate functional test jobs to zuul v3
Something are introduced in this patch:
* As devstack-gate/devstack-vm-gate-wrap.sh is not really zuul v3
native, we move all configs in to `devstack/lib/heat` and .zuul.yaml.

* Remove extra configs process in devstack. Like setup tempest(which
is well covered by tempest itself.) or overlapping heat test configs setup.
Use tempest config for all heat_integration tests. Also remove
heat_integrationtests/common/configs since they're no longer required.

* copy post.yaml for grenade jobs. As we migrate to zuul v3 for
functional tests but not grenade (not yet), the post.yaml should exists
under grenade dir. since it's only required by grenade jobs.

* Use post.yaml in functional tests for cleanup test environments.

Story: #2007056
Task: #37908

Depends-On: https://review.opendev.org/701105
Change-Id: I4f531161a7222e2c2a21f8d483f9c2a1d91dc38d
2020-01-07 09:38:04 +08:00
Zane Bitter 6b7d64988c Remove handling for client status races
Now that we guarantee that resources are UPDATE_IN_PROGRESS before the
stack update call returns for legacy stacks (this was already true for
convergence stacks), there is no need to have special handling to check the
updated_time either in StackResources or in functional tests.

Change-Id: I5bf7ed6cb9ba6c77a77dd36eb173e1927065c53e
Story: #1669608
Task: 23176
2019-12-23 18:43:11 +00:00
rabi 97f2636dc7 Use keystone session with heatclient in integration tests
Change-Id: I4c66927e3dd3e1a91cfab94f26a24dbe8932bde8
Related-Bug: #1695144
2019-03-15 09:13:17 +00:00
Zane Bitter e1f4d7fca2 Fix races in conditionals tests
In convergence, resources have a tendency to appear and disappear in their
own time, not atomically with a change to the stack state. Therefore when
testing conditionals (i.e. looking for resources to appear/disappear) we
must be careful to take into account the states of the resources we find to
avoid race conditions.

Change-Id: I488921c6c4c3324912ded494db5ab9605becce9b
Closes-Bug: #1737796
2018-02-07 20:22:24 -05:00
rabi 0558b10c48 Remove use of CooldownMixin with scaling policy
Removes the multiple use of the mixin, so that we don't
set metadata for both policy and group. Setting the cooldown
metadata only for group would suffice.

Change-Id: I241a32b52e0708264c80c3eca313a97534927415
Related-Bug: #1555748
2018-01-28 09:41:20 +05:30
ricolin 76891d4a99 Remove ReloadOnSighupTest
Most jobs now run with apache+uwsgi, so the test has no significance.
Also we don't test it anymore.

Depends-On: I022077c92bc10e908c7fe549ed555ad0194e0704
Change-Id: I6d6e025f60867e5128704f54e5e793762f6c1b8a
2018-01-26 17:51:00 -05:00
ricolin aed1e6f368 Remove integration and configuration tests
This patch propose to use heat tempest plugin for Integration tests
(with no co-gating potential) and configuration tests.
Also we will remove test_autoscaling_lb from tempest plugin as well,
since it's no longer been used.
Remove senario base, since we now move all senario tests to plugin.

Change-Id: Ice6a0e1fe8ce2e1de5253c674d11949b0f8a6e31
2018-01-26 17:50:58 -05:00
ricolin ba86129965 Remove potential co-gating integration tests
This patch propose to use heat tempest plugin for potential
co-gating integration tests.
These tests are consider as potential co-gating. And we now
already maintain them in heat tempest plugin.

This also disables all except two of the gate/test jobs, to enable us to
land this series and stop the carnage. The jobs will be re-enabled once
all of the duplicated tests have been eliminated.

Change-Id: I55e204b72cd5a2876576852b10ad09f24d04beb4
2018-01-26 17:50:26 -05:00
Zuul 85a3e983ea Merge "Allow run tests for both tempest plugin and regression tests" 2018-01-23 13:27:15 +00:00
ricolin 41cc012b34 Allow run tests for both tempest plugin and regression tests
Regression tests will be maintained in-tree. See categries list:
https://etherpad.openstack.org/p/heat-integration-test-categories

We will seperate tests to tempest plugin or in-tree base on conditions
of each tests. So we need to rework on framework for integration tests.
This patch propose following changes:
* This partially reverts commit fff6518e69
* Allow running heat tempest plugin and heat regression tests.
* iniset configs to both heat_integrationtests.conf and tempest.conf

Change-Id: Ief31dc961bc108e2863119598dfb16581a38e9cf
Depends-On: I5e9325766ce166e62c731330c462c030cb1e11fc
Co-Authored-By: Zane Bitter <zbitter@redhat.com>
2018-01-19 13:26:25 -05:00
Zuul fbddba7280 Merge "Raise HTTPNotFound if not in create or adopt" 2018-01-19 05:05:10 +00:00
ricolin 64c37f3ea1 Revert "Register heat tempest plugin"
This reverts commit 00a1814d5e.

Change-Id: If0def06223164609adc3f8ce69c672cfcb93de3f
2017-12-29 14:52:33 +08:00
Zuul 121627bce7 Merge "Add functional tests for stack cancel" 2017-11-17 05:38:25 +00:00
Zuul 56efc18b2d Merge "Cleanup ROLLBACK_COMPLETE stack after the test finishes" 2017-11-17 04:42:17 +00:00
rabi 6c7d059689 Add functional tests for stack cancel
This adds tests for user initiated stack cancel operations
w/ or w/o rollback.

Change-Id: I8ff787dc02dd76f99e9ece073b2f700c1922104d
Depends-On: Ib107c82f341f4d271859ca7681d65f7ce4c5d0b1
Related-Bug: #1709041
2017-11-10 09:55:11 +05:30
rabi 92be54ca53 Fix AodhAlarmTest to use gnocchi
This changes the test to use AodhGnocchiAggregationByMetricsAlarm
and add measures using gnocchi api.

Change-Id: I0b2fe154b93d9882b703e95a0b09f139697ceb9a
Closes-Bug: #1727637
2017-10-30 11:27:37 +05:30
rabi b3aaf5cf30 Cleanup ROLLBACK_COMPLETE stack after the test finishes
Change-Id: Ia457aa7025c464a9dec78e95757d85c977307560
Closes-Bug: #1727632
2017-10-26 13:08:25 +05:30
ricolin 920d8b72cc Raise HTTPNotFound if not in create or adopt
We should raise exception when stack not found, if it's not waiting
for create or adopt (which should be the only two possible reason
that stack may not have been created yet).

Change-Id: I6c13ba8ab1b0e312a0932c40f7e9e2b7f92822c3
2017-10-18 08:00:42 +00:00
Zane Bitter dfd34a00f3 Allow convergence-specific Tempest tests
Add a "convergence_engine_enabled" configuration option to the functional
tests' Tempest plugin. The option is enabled by default, but can be
disabled by setting the DISABLE_CONVERGENCE environment variable to "true"
when running prepare_test_env.sh, so that if convergence is disabled in
devstack it will also be disabled in Tempest.

This will allow us to write functional tests for convergence-specific (or
non-convergence-specific) behaviours.

Change-Id: If3a37de75467d50af10582215e16611e59a4ad06
2017-10-05 14:19:32 -04:00
Jenkins fa6ccf2d1f Merge "Implement handle_<action>_cancel for SoftwareDeployment" 2017-08-10 17:38:48 +00:00
rabi 199e4ac322 Implement handle_<action>_cancel for SoftwareDeployment
This implements handle_<action>_cancel for SoftwareDeployment
to update the deployment to failed, when the resource fails due
to scheduler timeout or some other external reason.

Change-Id: Ibaa551d35e96f34cf950811a5b5a05e1cda6c364
Closes-Bug: #1585815
2017-08-02 06:56:41 +05:30
Botond Zoltán 5231ea2d3a Add trunk functional testcases to heat
Introducing new functional testcases for trunk support

Related-Change: Iea12844f77abf8c254f6224d55470663eba66aab
Depends-On: Ibffe41b123b2ec065bc2551aa29800163fa57aee
Co-Authored-By: Lajos Katona <lajos.katona@ericsson.com>
Partially-Implements: blueprint support-trunk-port
Change-Id: Ie7a2f44d5bb3aca98e6c9a799116a6eec5e74926
2017-07-21 15:54:51 +02:00
rabi a8129573d2 Fix handle_restore for server and volume resources
When resource references are used for properties restore
does not work for nova server and volume resources.

This patch fixes it and adds a functional test for it.

Change-Id: I34efb3f4e0d3578d95134793f5c5d413667790e0
Closes-Bug: #1687009
2017-05-19 11:56:27 +05:30
ricolin a41b5cf5eb Change user name limit to 255 characters
Origin user name limit in heat is 64 characters. but the max acceptable
username limit should be 255 in keystone.
This patch propose to change the limit to 255
Also, this can avoid warning from heat keystone client in heat
integration tests.
Closes-Bug: #1685817

Change-Id: I7b9e7076bd700c086b07f13dadf89531579aa4a1
2017-05-17 01:32:54 +08:00
Jenkins 7dacf57a9a Merge "Wait for the policy to be done in tests" 2017-04-20 09:33:15 +00:00
rabi eed9cf85ca Add auth_version config option
Change-Id: Iba84890437a0b7ba0fa00a9bd893fe2ef7f9b797
Closes-Bug: #1683995
2017-04-19 09:32:02 +05:30
rabi f6c1203b51 Use project_name/admin_project_name config option
This deprecates the tenant_name and admin_tenant_name config option
for integration tests.

Change-Id: Iabc56ddabeeda36d27ea3c9ce04c71e13be676d7
2017-04-11 10:29:26 +05:30
Thomas Herve 7109468b2f Wait for the policy to be done in tests
As observed in the amqp job, we sometimes signal scale policy too fast,
without waiting for the medata to be set. It creates a timeout. We can
check the metadata of the policy before signaling again, to make sure
that we can move forward.

Change-Id: I9857803ef960efbd034f05985ec8fcc7272e2f70
2017-04-10 23:44:26 +02:00
Jenkins d42ce99218 Merge "Remove log translations" 2017-03-27 04:17:33 +00:00
liyi 8f10215ffd Remove log translations
Log messages are no longer being translated. This removes all use of
the _LE, _LI, and _LW translation markers to simplify logging and to
avoid confusion with new contributions.

See:
http://lists.openstack.org/pipermail/openstack-i18n/2016-November/002574.html
http://lists.openstack.org/pipermail/openstack-dev/2017-March/113365.html

Change-Id: Ieec8028305099422e1b0f8fc84bc90c9ca6c694f
2017-03-25 17:11:50 +08:00
Thomas Herve 9398dedd98 Skip integration tests when Swift is not available
Let's skip integration tests using Swift when the service is not
available. It will help turn the py3 gate green.

Change-Id: Ib3536583dbb3bbf50d9c64976e909fd352391d05
2017-03-23 11:20:14 +01:00
Zane Bitter 5392273af8 Fix missing spaces in strings
Where strings are continued across multiple lines, it's easy to miss a
space. This fixes several incorrect strings, cleans up some formatting
(don't line break inside a format specifier) and fixes typos.

Change-Id: Id781b16cad03c32973a67c02ad22ce4459c6d126
2017-03-03 03:48:14 +00:00
rabi 3188ea0f17 Use keystone v3 and session for swiftclient
Allow for using keystone v3 and session with swiftclient
in integration tests.

This also cleans up some unnecessary arguments passed to clients.

Change-Id: If68dc4840f99e852a5d2af53812661b3fc0aab55
2017-02-15 13:55:51 +05:30
rabi 6a64578abd Use os_cache in place of no_cache
python-novaclient has deprecated number of arguments. Let's use
os_cache in place of no_cache for the client intialization in
integration tests. This seems to be failing with TypeError.

Change-Id: I25f85b89a50ef4746d2dd3b27f2a066e1746c769
2017-01-20 08:07:10 +05:30
huangtianhua fbc6911322 Correct to 'heat_config_notify_script'
Change 'heat-config-notify-script' to
'heat_config_notify_script'.

Change-Id: I7f2519aebca3859bdd6af6c3696eed42445cd17f
Closes-Bug:# 1655234
2017-01-10 14:18:43 +08:00
rabi 35c6ee5ac4 Use both domain id and name
devstack has made keystone v3 the default, it seems
the env variables for domain names are not set.

Change-Id: Ief9314b81f8b7624ceb390c432d6487fce5b4a5e
Closes-Bug: #1646343
2016-12-01 12:21:45 +05:30
Thomas Herve d4a9cdb4f5 Wait for deletion_time in integration tests
When we check for DELETE_COMPLETE, we can have a window where the stack
is mark as such but without deletion_time. Let's wait for that
information.

Change-Id: Ia8c225aab8b0f118e99963fc22341d743e9182a1
Closes-Bug: #1625661
2016-09-22 15:20:07 +02:00
Oleksii Chuprykov 584efe3329 Fix cancel update for nova server with defined port
This particular patch fixes a behaviour of cancel update for
nova server with defined port, so there are no ports manageable
by nova. We have these issues while restoring ports after rollback:
1) We doesn't detach any ports from current server, because we
doesn't save them to resoruce data. (we store this data after
succesfull create of the server)
2) Detaching an interface from current server will fail, if the server
will be in building state, so we need to wait until server will be
in active or in error state.
Refresh ports list to solve problem (1).
Wait until nova moves to active/error state to solve (2).
A functional test to prove the fix was added. Note, that this test is
skipped for convergence engine tests until cancel update will work
properly in convergence mode (see bug 1533176).
Partial-Bug: #1570908
Change-Id: If6fd916068a425eea6dc795192f286cb5ffcb794
2016-09-20 12:00:54 +00:00
Rabi Mishra b76f5b6d23 Add functional test for SDG rolling_update
Adds functional test for SoftwareDeploymentGroup
rolling_update.

Change-Id: Id575765d52c84e3c29f443a18417b5f14d9331cc
2016-09-13 00:38:35 +00:00
Steven Hardy 9b302b82fd Add test for SoftwareDeploymentGroup resource
Adds an initial test which tests create/delete for this resource,
and that signalling works.

Also tests deleting an in-progress stack as this has been a repeated
source of bugs related to deleting the child stack correctly.

Change-Id: I0d5acdca50467da344388d6c262e61aaaaae22eb
Related-Bug: #1592374
2016-09-12 07:25:26 +00:00
Steve Baker fff6518e69 Run heat_integrationtests as a tempest plugin
completes blueprint tempest-plugin-support

Change-Id: I0109e68bb135cd257e2fff74e75575a7e2f91539
2016-08-13 09:53:07 +12:00
Steve Baker 2af6c6ffdc Do not use env var conf defaults
Falling back to environment variable credentials is convenient for
development but could lead to unexpected credentials being used during
tests. Also this is not a known practice for tempest tests.

This change removes the env var defaults and explicitly sets the
credentials to use in prepare_test_env.sh.

Pre and post grenade tests also get their config from the conf file
rather than the environment.

blueprint tempest-plugin-support

Change-Id: Icf9fb4c58ed11483106c2b62d1e1093223f7dc51
2016-08-13 09:52:41 +12:00
Steve Baker 6b576ffc16 Use tempest.conf when running under tempest
This change switches to a global config for heat_integrationtests, and
makes that global config the tempest config when running under
tempest.

After the transition to tempest init_conf won't be required at all.

blueprint tempest-plugin-support

Change-Id: Id22e7a03601db5adfc0b428004a75990278369a6
2016-08-13 09:51:11 +12:00