Commit Graph

107 Commits

Author SHA1 Message Date
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
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 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
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
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
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 80b8ce19f3 Don't manipulate config for admin creds
Soon this will be global tempest config, so modifying it is not an
option.

Instead the client manager can now be replaced with one which uses admin
credentials when setup_clients_for_admin is called.

blueprint tempest-plugin-support

Change-Id: I9c1b80ec2048d227cc99c06808da90745fcf516e
2016-08-13 09:51:11 +12:00
Steve Baker 395cfbd1dd Adopt tempest plugin config namespace
As a transition strategy to running heat_integrationtests as a
tempest plugin, this change puts the test config values in the
"heat_plugin" section. This will allow for either test runner
to be used during the transition.

blueprint tempest-plugin-support

Change-Id: I2eab50be92c998aeb1ee98011908a9828a7efe6c
2016-08-03 01:59:46 +00:00
rabi 3b0f8ad21f Add integration tests for admin actions
Add integration tests for super admin actions.

Change-Id: I277f23800274729cf7128fdcb4521e4b221233cf
Partial-Bug: #1466694
2016-06-14 22:39:33 +05:30
Jenkins 93ce8e1d30 Merge "Removes duplicate code autoscale_complete" 2016-05-19 11:05:48 +00:00
rabi 7c17582a4b Remove unnecessary usage of stack_name
We don't need stack_name when we've the stack_identifier.

Change-Id: I296af464301705e653b3f80442c5dcfbf43ba728
2016-05-17 19:16:38 +05:30
Rakesh H S 9561c540fa Removes duplicate code autoscale_complete
Function autoscale_complete will be required by many test
cases, hence moving it to common.

Change-Id: Ie0545ad35c6704bc86b26748ae99f9c66ca5a468
2016-04-28 15:38:09 +05:30
tyagi 96ef3fc4ca Heat integration tests failing against https endpoints
Provide ca_file option to pass the ca certificate to verify https
connection. Also pass verify parameter to the test cases which
directly call requests library methods.

Change-Id: I4a81047136d6a64b151180e95c254edea8165349
Closes-Bug: #1553898
2016-03-07 22:16:00 +05:30
Jenkins b8da6cf95e Merge "Add functional tests for update restrict" 2016-02-25 04:09:29 +00:00
Jenkins 072db49dd9 Merge "Don't resolve outputs during polling stack status" 2016-02-22 11:33:42 +00:00
Sergey Kraynev 259899166a Don't resolve outputs during polling stack status
This patch makes optimization for polling requests, which check stack
status. It doesn't require to resolve outputs, when stack object is used
only for checking status and getting stack_id.

Related-Bug: #1541323

Change-Id: Ic1f4c1f15183c957e022f36bda26fed48096502e
2016-02-20 02:39:29 -05:00
Rabi Mishra 329db1ec50 Add functional tests for update restrict
This adds functional tests for update restrict functionality.

Change-Id: I85e99b376203a48b725c6e9c1d9b5aefa8024b8e
Blueprint: stack-update-restrict
2016-02-19 17:34:35 +05:30
Jay Dobies d454caf00a Hook into environment merging on server
If environment_files is specified, look in the files dict for each
specified environment file and merge into the stack's environment. This
is the same workflow that previously occurred client-side.

Change-Id: Ibe46fd35de7988920c101a83259c06c8f8a3ed0b
Implements: blueprint multi-environments
2016-02-12 10:48:54 -05:00
Steven Hardy 4cfd9a10ac Fix update preview to handle nested stacks
Currently the update preview code has no support for previewing
the effect of an update on nested stacks, which I assume was an
oversight in the original implementation.  So this adds a show_nested
flag to the API which allows enabling recursive preview of the whole
update including nested stacks.

Closes-Bug: #1521971
Depends-On: I06f3b52d5d48dd5e6e266321e58ca8e6116d6017
Change-Id: I96af4d2f07056846aac7ae9ad9b6eb160e8bd51a
2016-02-03 12:34:33 +00:00
Thomas Herve def34d7a05 Expand test in-progress workaround
When working around bug #1450314, we changed integration tests to ignore
the lock when doing an update. Unfortunately, this issue happens for
actions other than update like delete and suspend, so let's apply the
same fix for those actions too.

Change-Id: I04c5f35a1851163bc849f5c8be0f6e865ee0088e
Closes-Bug: #1508990
Related-Bug: #1450314
2015-10-22 17:29:21 +02:00