Commit Graph

105 Commits

Author SHA1 Message Date
zhulingjie ecf8effdfa Replace git.openstack.org URLs with opendev.org URLs
Thorough replacement of git.openstack.org URLs with their opendev.org counterparts.

Change-Id: Id506aad04b878ba516872ef0169664f47f6eaab0
2019-06-25 14:43:40 +08:00
zhurong 874a4c94c8 Add README for remove murano_tempest_tests from murano repo
Change-Id: I6776fce2efd60c26fdbbfdf8a0b8b6982f956846
2017-12-07 13:01:26 +08:00
zhurong 1ea1cda5d4 Remove murano_tempest_tests from murano repo
Change-Id: I5da1c660393df335f8d5e8ab17b23bb21a8e3257
2017-12-07 02:03:48 +00:00
Jenkins d16c2eda60 Merge "Added Tempest API client methods and Tempest tests for sessions and deployments" 2017-08-24 09:59:10 +00:00
Wriju Bhattacharya 88b557080e Added Tempest API client methods and Tempest tests for sessions and deployments
Added tests for following scenarios:
    * deploy session
    * list all deployments
    * list deployments (in a specific environment)
    * list a specific deployment's statuses

Added application_catalog_client methods for following functionality:
    * list all deployments
    * list deployments (in a specific environment)
    * list a specific deployment's statuses

Change-Id: I0ac1b2a6216fd1794ba06ee0b26e6c2c90118526
2017-08-23 16:55:33 -04:00
Jenkins 16c1d86c1e Merge "Added Tempest tests for publicizing a package" 2017-08-04 09:37:00 +00:00
Wriju Bhattacharya 87051a72f5 Added Tempest tests for publicizing a package
Added tests for following scenarios:
    * publicize a non-public package
    * publicize a package as non-admin user (negative test)

Change-Id: I0c2ef75535cdd894ce30d1c1404ce964ec00b248
2017-08-03 12:21:18 -04:00
Jenkins 86697ef86e Merge "Added Tempest negative tests for environments" 2017-08-03 02:49:58 +00:00
Wriju Bhattacharya 1f267f9bd6 Added Tempest negative tests for environments
Added negative tests for the scenarios:
  * Abandon environment with invalid id
  * Update environment with invalid id

Change-Id: I19d37cd0664a5faa789f79f1163c701316bf890d
2017-08-02 14:07:57 -04:00
Andrea Frittoli 90d5d47a9a Refine skip messages
Fix a few nits in skip messages.

Change-Id: Ie2da617839983f71dab459ce5afa698ad21441a9
2017-08-01 06:58:03 +01:00
Andrea Frittoli 12beb64c78 Handle available volume client versions
If Cinder is not available or Cinder v1 only is available skip
volume attachment tests. Else prefer volume v3 where available
or fallback to v2 otherwise.

This requires a Tempest patch for the snapshots v3 client.

Change-Id: If3b6a2c71498c19a0a8dfeb4c51e2c80e5a918f4
Depends-on: I21f07f7b3e8f22055e7978c0bf4aa01b80b493d9
2017-07-28 23:58:43 +01:00
Felipe Monteiro 7cc0980232 Add idempotent_id decorators to murano_tempest_tests
This commit does 2 things:
  1) Adds idempotent_id decorators to murano_tempest_tests using
     check-uuid --package murano_tempest_tests --fix

  2) Fixes the external white list error that is thrown by tox -e pep8
     (which uses bandit but which was previously not included in
      whitelist_externals)

Change-Id: I8d75601a40baf5749f12151df18a116e8fab628c
2017-07-24 20:33:49 +01:00
Jenkins 4a50a623c4 Merge "Update testtools.testcase.attr to decorators.attr" 2017-07-20 12:08:24 +00:00
Felipe Monteiro 634e0daa9a Update testtools.testcase.attr to decorators.attr
Tempest has moved their attr decorator to tempest.lib [0]. So now
that decortators.attr is a part of Tempest's stable library, we
should use it instead of testtools.testcase.attr, since it is
the standardized way of adding attributes to test cases in
Tempest.

This allows the possibility of doing:

    @decorators.attr(type=['foo', 'bar'])

Rather than:

    @testtools.testcase.attr('foo')
    @testtools.testcase.attr('bar')

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

Change-Id: I76c23e46e57dbdbbce046f1522ed5489e5ec9d1f
2017-07-19 18:10:00 +00:00
Jenkins 5df983c181 Merge "Make cinder volume attachments available" 2017-07-19 15:03:45 +00:00
zhurong e667abdb84 Make cinder volume attachments available
This commit is revert from Ib996bf50e1b7d542b98cf9d7125b824771c143d6,

Change-Id: Ie866833d205c119254b811654426c586c338d7c8
Closes-Bug: #1703387
2017-07-19 09:21:58 +08:00
Andrea Frittoli f2f057c3f3 Init the orchestration client from config (part2)
Tempest will not be initialising the orchestration client by default
anymore since Heat is not a service hosted in Tempest (for a long time now).
The client is still available in Tempest (as long as it's not made
available by heat somewhere else), so to use it it's enough to pass it's
configuration to it.

This was partly fixed in Ic6fef4b4f260d13efd7b035bc012369f0da55602 but
the patch was not complete.

Change-Id: Iba1680276fec776a81f1e91fd591137e39bf6d07
2017-07-18 21:19:39 +01:00
Andrea Frittoli 60eb9ed60f Init the orchestration client from config
Tempest will not be initialising the orchestration client by default
anymore since Heat is not a service hosted in Tempest (for a long time now).
The client is still available in Tempest (as long as it's not made
available by heat somewhere else), so to use it it's enough to pass it's
configuration to it.

Change-Id: Ic6fef4b4f260d13efd7b035bc012369f0da55602
2017-07-17 16:19:36 +01:00
zhurong 0c42290126 Unskip test_deploy_app_with_volume_creation test
1.Unskip test_deploy_app_with_volume_creation test
2.change flavor from m1.small to m1.tiny, to reduce the
test failing chances.

Closes-Bug: #1701230

Change-Id: Ib996bf50e1b7d542b98cf9d7125b824771c143d6
2017-07-07 08:34:23 +00:00
Jenkins 0b35823605 Merge "Use default credentials if None has been passed" 2017-07-05 11:25:05 +00:00
Sofiia Andriichenko 2bee51e99a Use default credentials if None has been passed
Reason - credentials do not load  on import in tempest plugin clients.py


Change-Id: I0303d9c7c9d1b35486874ea999dc36b2430c6ac4
Closes-Bug: #1701255
2017-07-03 13:39:18 +00:00
Kirill Zaitsev 8fcf417d1c Skip cinder volume creation test
The tempest test  is currently broken and blocks the gate.
This commit adds expectedFailure decorator around it.
So when the bug is fixed we would not forget to unskip the test.

Change-Id: Id3adbf59e116e2d73c74e782a345c7ca8d6fa41e
Related-Bug: #1701230
2017-06-29 13:45:46 +00:00
Jenkins 6e3ea6cdfc Merge "Use tempest.test.BaseTestCase for murano tempest tests" 2017-06-26 13:05:06 +00:00
Felipe Monteiro fb3c5625df Remove long-ago deprecated show_categories
The API catalog endpoint `show_categories` was deprecated back
in Liberty cycle. It should be removed.

This commit removes the deprecated endpoint `show_categories`,
removes it from the API router, and removes references to it
in Tempest tests -- which now test `list_categories` instead.

Change-Id: If1bea7448c0d4aa5fdf37c8400323589d73fdb21
2017-06-22 15:58:25 +01:00
Felipe Monteiro 2e8137af5e Use tempest.test.BaseTestCase for murano tempest tests
While Tempest's own plugin documentation recommends that
plugins only consume tempest.lib [0], the BaseTestCase in
tempest.test is more feature-rich, comprehensive, and fault-tolerant
than the BaseTestCase in tempest.lib.

Many plugins like keystone_tempest_plugin already use the
BaseTestCase in tempest.test. Also, QA PTL said it would be
fine to make the transition when asked in IRC [1][2].

This commit specifically:
  - uses the base tempest class pattern specified in
    `tempest.test.BaseTestCase`: skip_checks for skipping tests based
    on environment config settings; setup_clients for instantiating
    clients and client managers; resource_setup for setting up
    class-level resources; and resource_cleanup for cleaning up
    class-level resources
  - removes unusued helpers like verify_nonempty, except in classes
    that explicitly already use it
  - removes clearing credentials in tearDown because the code isn't
    even executed due to a bug introduced by
    I51434685555c1da92401891a60285bf52571b8b5
  - separate admin clients from non-admin clients by using os_admin
    vs os_primary

[0] https://docs.openstack.org/developer/tempest/plugin.html#plugin-structure
[1] http://eavesdrop.openstack.org/irclogs/%23openstack-qa/%23openstack-qa.2017-06-12.log.html#t2017-06-12T20:38:19
[2] http://eavesdrop.openstack.org/irclogs/%23openstack-qa/%23openstack-qa.2017-06-12.log.html#t2017-06-12T21:45:56

Change-Id: Ia09dbc52ba13ca822a539e509e0e517592435aec
2017-06-17 16:13:51 +01:00
Jenkins 5354a3b553 Merge "Stop using aliases for creds manager" 2017-05-10 19:50:05 +00:00
Jenkins ea4a304398 Merge "Replace six.iteritems() with .items()" 2017-05-03 20:35:15 +00:00
Jenkins 8a7febc1fb Merge "Allow users to assign a security group to an app" 2017-05-03 19:42:46 +00:00
M V P Nitesh 580677eedc Replace six.iteritems() with .items()
1.As mentioned in [1], we should avoid using six.iteritems to achieve
iterators. We can use dict.items instead, as it will return iterators
in PY3 as well. And dict.items/keys will more readable.
2.In py2, the performance about list should be negligible, see the
link [2].
[1] https://wiki.openstack.org/wiki/Python3
[2] http://lists.openstack.org/pipermail/openstack-dev/2015-June/066391.html

Change-Id: I45fa65427318e1c35bb521de46e81ea12ca7b770
2017-05-03 09:17:18 +00:00
Paul Bourke 103f67815a Allow users to assign a security group to an app
This patch allows users to supply a list* of their own security groups to
an instance, rather than using the application defined one (built via
the SecurityGroupManager).

* Note, while we can support multiple security groups, murano-dashboard
currently has no UI element to select multiple items. This means that
currently users are restricted to selecting one group. If/when the
UI is improved this change can easily support multiple groups.

Example
=======

Application authors can make this available in their apps as follows:

UI.yaml
-------
Forms:
  - instanceConfiguration:
      fields:
          ...
        - name: securityGroups
          type: securitygroup
          label: Security Group
          required: false

Class.yaml:
----------
  Application:
    ?:
       type: com.paul.HelloWorld
    instance:
      ?:
        type: io.murano.resources.LinuxMuranoInstance
      name: $.instanceConfiguration.hostname
      securityGroups: $.instanceConfiguration.securityGroups
      ...

DocImpact
Change-Id: I60d37cfe034c467e894ee93cf3718e463bf49337
Partially-Implements: blueprint app-use-existing-security-group
2017-04-27 17:37:20 +01:00
Felipe Monteiro 050be0b96a Stop using aliases for creds manager
Now that Tempest has stopped using aliases like cls.os
and cls.os_adm [0], Murano should do the same.

This patch normalizes the usage around os_admin, os_primary and
os_alt.

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

Change-Id: I40e6cb8eec8e67f4dbe4f92d7216a3b0ebcd4a59
Related-Change-Id: I5f7164f7a7ec5d4380ca22885000caa0183a0bf7
2017-04-27 02:10:35 +01:00
Chandan Kumar 4b91b82b5c Fix config type of run_service_broker_tests to Boolean
* As per the default value of run_service_broker_tests is Boolean
  but config type is defined as string, It needs to be fixed other
  wise tempest init will throw warning.

Change-Id: Ic0cd6d6cb7409c0bd4088c9eb3b743d44e9f7100
Closes-Bug: #1685767
2017-04-24 17:30:20 +05:30
Paul Bourke d4527a4f15 Add mising timeout to ApplicationCatalogClient
Requests made by tests using this client were not specifiying a timeout,
causing them to appear to hang indefinitely when there's a problem.

Change-Id: Ibcbe7a4af8566339c68265c11df9a09ebbe7f6ca
2017-04-19 16:52:57 +01:00
Jenkins 928db440f2 Merge "Make CinderVolume attachment info available" 2017-04-17 09:48:08 +00:00
Paul Bourke 107fc981be Make CinderVolume attachment info available
Make the 'attachments' attribute of OS::Cinder::Volume available in
MuranoPL.

Users can do the following in their applications:

  - For: blockDevice
    In: $this.instance.blockDevices
    Do:
      - For: attachment
        In: $blockDevice.volume.attachments
        Do:
          - $reporter.report($this, attachment.device)
          - $reporter.report($this, attachment.attachment_id)
          ...

Implements: blueprint devicename-from-volume-attachment
Change-Id: I2986efde085dd8029f2520cb5744e75f6a66f282
2017-04-13 10:32:21 +01:00
ol7435 8a3ed3f833 Change cred provider to enforce dynamic config
Current tests always dynamically create accounts when running.

These tests do not run when, for example, LDAP is configured.

This change allows murano_tempest_tests to correctly interpret
use_dynamic_credentials config in the [auth] section of tempest.conf

When use_dynamic_credentials is set to True, dynamic accounts will be created.
When set to false, pre-provisioned accounts specified in
accounts.yaml Tempest config will be used.

Closes-Bug: #1677893
Change-Id: I51434685555c1da92401891a60285bf52571b8b5
2017-04-10 11:30:38 -05:00
Felipe Monteiro 10752e6bba Renames wait_for_volume_status in tempest tests for consistency.
A recent change in Tempest [0] is breaking 2 murano tempest tests;
wait_for_volume_status was changed to wait_for_volume_resource_status,
causing an AttributeError to be thrown [1].

Additionally, a recent change in Cinder [2] removed multiattach
for all drivers, causing one of the murano tempest scenario tests
involving deploying an environment using a multiattach-enabled volume
to fail.

This patch renames the function wait_for_volume_status to be compatible
with the recent Tempest change. It also uses staticmethod delete
functions provided by the Tempest API for delete_volume and
delete_snapshot. It also removes the multiattach property in the
relevant tempest test.

[0] https://review.openstack.org/#/c/394588/29/tempest/common/waiters.py
[1] http://logs.openstack.org/01/435101/2/check/gate-tempest-dsvm-murano-api-ubuntu-xenial/911be71/console.html
[2] https://review.openstack.org/#/c/428365/

Related-Bug: #1668848
Co-Authored-By: ricolin <rico.lin@easystack.cn>
Change-Id: I15ae3f9c931ba606883a22a5af719f79685093a7
2017-03-03 06:25:54 +03:00
PRAMOD KUMAR SINGH e8982db91f Make use of already registered group
service_available_group - We don't need this group in plugin
code because it is already being registered in tempest config
and since we are using the same config object from tempest,
we can make use of this group directly here instead of using a
new group with the same name.

closes-Bug: #1661213

Change-Id: Iabd4a7c356b1f454585054218bf07801e0339bde
2017-02-02 17:36:35 +05:30
zhurong 828445c555 Deleting dates from dictionaries to skip it in assert
Ref [1] test_create_and_delete_env_template and
test_get_public_private_both_env_templates tests failed, due to
the dates are not assert.
This patch will delete the dates from the dictionaries.

[1]: http://logs.openstack.org/92/408792/1/check/gate-tempest-dsvm-murano-api-ubuntu-xenial/5d02736/testr_results.html.gz



Change-Id: I571b98612c28f0638b095d80d1872b9b54b8c0c5
2016-12-12 01:29:50 +00:00
Jenkins b8044f5d39 Merge "Fix removes date_time items from dictionaries" 2016-11-29 19:36:45 +00:00
Ilya Popov 787f14baa2 Fix removes date_time items from dictionaries
Some functional tests fail because they assert dictionaries
with date/time items. For example, test_environment_template_create
checks that dictionary env_template exists in env_template_list
dicrionary list. All mentioned dictionaries have date/time items
with keys 'Created' and 'Updated'. If the system, where functional
tests are executed will be quite slow - time in these dictionaries
could differ. This behavior will result corresponding test to fail
even if all tasks will be executed successfully because time in
dictionaries for 'Created' and 'Updated' keys will differ and
assert will fail

Removing the date/time items from dictionaries will help to
successfully pass functional tests

Closes-Bug: #1626733

Change-Id: Ife3e157d9c3e8f0a6c1680b6134fd2c40dd62faf
2016-11-29 09:37:10 +03:00
David Moreau-Simard f0bc9476be Reduce the amount of smoke tests from 61 to 40
Smoke testing is designed around a compromise in testing quality in
order to have results in a way that consumes less resources and time.

We want to be able to have a reasonable confidence that the service
works fairly well without having to run too many tests.

As such, let's keep what still amounts to a fairly good testing of
each component tagged as smoke.
More in-depth testing can still be achieved with the right pattern
matching but smoke testing will not be as lengthy and resource
consuming now.

Change-Id: I1544fe8d0b4548e6c078310b08fc83af2c10b211
2016-11-25 19:11:52 +00:00
Stan Lagun b0c4222ff6 Don't purge random stacks
Cinder tests were deleting all the Heat stacks in their teardown.
This caused strange deployments errors when the tests were executed
cocurrently because stacks from other tests were deleted and partially
recreated in concurrent deployments which caused different consistency
errors.

Change-Id: I1670fa4613914c463328c3aa45c3a385efcc2a8c
Closes-Bug: #1643936
2016-11-22 19:01:31 +03:00
Victor Ryzhenkin 8783d53147 Move test with cinder backup creation to the IsolatedAdmin suite
- Move test_deploy_app_with_volume_creation_from_backup to the
IsolatedAdmin test suite
- Make tests using cinder v2 version due tempest defaults
- Unskip test_deploy_app_with_volume_creation_from_backup test

Closes-Bug: #1634876

Change-Id: I8b3ab7f000804f6b368d06ef877776b324774ad4
2016-10-20 16:08:04 +03:00
Alexander Tivelkov 254202b98e Unblocking the gate
Skipped test_deploy_app_with_volume_creation_from_backup test

Tempest integration test is failing for volume creation from backup
(reported as bug #1634876). To unblock the gate the appropriate test
is skipped for now while the bug is being investigated.

AgentListener unit test didn't properly override configuration, so in
some circumstances it could be executed with the disabled murano agent
which was leading to errors.

At the same time AgentListener itself contained some legacy code
leading to under-initialized state in case if the listener was
disabled in config file.

Related-bug: #1634876
Change-Id: I5642b8017c61f77afb68463ba8eb3906eeae7225
Closes-bug: #1634483
2016-10-19 15:54:31 +03:00
Victor Ryzhenkin f547dff5c4 Repair cinder integration tests
- Use image from nova scenario tests for cinder tests
- Correct environment status wait function
- Replace backup waiters with new tempest changes
- Use devstack trueorfalse common function to determine
boolean values

Closes-Bug: #1626872

Change-Id: Id2172d3d9b314eb8132d97ec8868028c714a35c3
2016-10-17 16:50:33 +03:00
Valerii Kovalchuk b3a06349c5 Add environment edit API
'/environments/<env_id>/model/<path>' endpoint added.
GET request responds with the subsection of <env_id>'s object
model located in its <path>.
PATCH request applies json-patch from request body to <end_id>'s
model. It does not contain <path> in the URL.

Change-Id: I672d43464ed7d5722cc574f1a10700b070664f34
Implements: bp environment-edit
2016-10-06 12:48:57 +00:00
Valerii Kovalchuk 945cc04806 Allow to PUT an empty object model
It was impossible to delete the last component from the env via
CLI, because it was prohibited to make put request with empty body.

APIImpact
Change-Id: I462072ad7c90eec1790b74cae958809aa316c25c
Closes-bug: #1511645
2016-10-03 18:28:53 +00:00
Alexey Deryugin 1833842b73 Make tests compose packages in temporarily directory
OpenStack Puppet CI uses packaged version of Murano,
so we don't have write permissions to test directory.
We need to compose Murano packages required for
tests in temporarily directories to fix it.

Closes-Bug: #1620706
Change-Id: I0334869237208f707b66b1e473e6044b1d3fe06f
2016-09-08 13:02:20 +00:00
zhurong 8eb7d93cbc Revert "Fix config group for SSL in tempest test"
Tempest did the revert of change config group for SSL in this commit:I91600d8fc49db670b0f78ffd0094575fbfa0ca63

So we should revert this commit too.

This reverts commit ffe85fcafe.

Closes-Bug: #1615375

Change-Id: I6af46ba2adee65c586913cdb182530ac63fab6f3
2016-08-21 22:20:31 +00:00