Skip to content

Commit acb1c94

Browse files
author
Steve Martinelli
committed
Set OS_VOLUME_API_VERSION before running functional tests
For v1 functional tests, set the env. var. Change-Id: I6c554932bdb8f99438d4f2ae855eb16c5bb3a357
1 parent 149ce52 commit acb1c94

3 files changed

Lines changed: 27 additions & 4 deletions

File tree

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Licensed under the Apache License, Version 2.0 (the "License"); you may
2+
# not use this file except in compliance with the License. You may obtain
3+
# a copy of the License at
4+
#
5+
# http://www.apache.org/licenses/LICENSE-2.0
6+
#
7+
# Unless required by applicable law or agreed to in writing, software
8+
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
9+
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
10+
# License for the specific language governing permissions and limitations
11+
# under the License.
12+
13+
import os
14+
15+
from functional.common import test
16+
17+
18+
class BaseVolumeTests(test.TestCase):
19+
"""Base class for Volume functional tests. """
20+
21+
@classmethod
22+
def setUpClass(cls):
23+
os.environ['OS_VOLUME_API_VERSION'] = '1'

‎functional/tests/volume/v1/test_qos.py‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@
1212

1313
import uuid
1414

15-
from functional.common import test
15+
from functional.tests.volume.v1 import common
1616

1717

18-
class VolumeQosTests(test.TestCase):
18+
class VolumeTests(common.BaseVolumeTests):
1919
"""Functional tests for volume qos. """
2020

2121
NAME = uuid.uuid4().hex

‎functional/tests/volume/v1/test_volume.py‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@
1212

1313
import uuid
1414

15-
from functional.common import test
15+
from functional.tests.volume.v1 import common
1616

1717

18-
class VolumeTests(test.TestCase):
18+
class VolumeTests(common.BaseVolumeTests):
1919
"""Functional tests for volume. """
2020

2121
NAME = uuid.uuid4().hex

0 commit comments

Comments
 (0)