cinder/cinder/tests/functional
Brian Rosmaita 5122b14658 Default volume_type set too early
If a volume_type is not specified in a volume-create request, change
I4da0c13b5b3f8174a30b8557f968d6b9e641b091 (introduced in Train) sets a
default volume_type in the REST API layer.  This prevents the
selection logic in cinder.volume.flows.api.create_volume.
ExtractVolumeRequestTask from being able to infer the appropriate
volume_type from the source volume, snapshot, or image metadata, and
has caused a regression where the created volume is of the default
type instead of the inferred type.

This patch removes setting the default volume_type in the REST API
and modifies the selection code in ExtractVolumeRequestTask slightly
to make sure a volume_type is always assigned in that function, and
adds and revises some tests.

Change-Id: I05915f2e32b1229ad320cd1c5748de3d63183b91
Closes-bug: #1879578
(cherry picked from commit 674c8e7286)
Conflicts:
  cinder/tests/unit/volume/flows/api/test_create_volume.py
  - cinder.tests.unit.test (victoria) -> cinder.test (pre-victoria)
(cherry picked from commit c1bdb233cf)
Conflicts:
  cinder/volume/flows/api/create_volume.py
  - add six, remove collections
  cinder/tests/unit/volume/flows/api/test_create_volume.py
  - add mock, remove unittest.mock
2020-07-12 16:10:27 -04:00
..
api Default volume_type set too early 2020-07-12 16:10:27 -04:00
api_sample_tests Untyped to Default Volume Type 2019-09-20 05:37:54 +00:00
__init__.py Fix cinder functional tests job 2017-03-21 11:45:26 +02:00
api_samples_test_base.py Re-enable new pycodestyle errors 2019-06-04 14:28:09 +00:00
functional_helpers.py Default volume_type set too early 2020-07-12 16:10:27 -04:00
test_extensions.py Remove API v1 2017-09-06 07:39:10 -05:00
test_group_replication.py Fix incorrect use of assertFalse causing CI failed 2017-10-26 11:01:02 +07:00
test_group_snapshots.py Fix incorrect use of assertFalse causing CI failed 2017-10-26 11:01:02 +07:00
test_groups.py Fix incorrect use of assertFalse causing CI failed 2017-10-26 11:01:02 +07:00
test_login.py Move integrated tests to 'functional' directory 2016-02-09 23:28:27 +02:00
test_quotas.py Bump hacking version to 1.1.x 2019-05-30 15:06:02 -04:00
test_volumes.py Default volume_type set too early 2020-07-12 16:10:27 -04:00