# Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the # License for the specific language governing permissions and limitations # under the License. import unittest import time from engine.log import logging from engine.tests.integrated import integrated_helpers from engine.tests.integrated.api import client from engine.volume import driver LOG = logging.getLogger('engine.tests.integrated') class VolumesTest(integrated_helpers._IntegratedTestBase): def setUp(self): super(VolumesTest, self).setUp() driver.LoggingVolumeDriver.clear_logs() def _get_flags(self): f = super(VolumesTest, self)._get_flags() f['use_local_volumes'] = False # Avoids calling local_path f['volume_driver'] = 'engine.volume.driver.LoggingVolumeDriver' return f def test_get_volumes_summary(self): """Simple check that listing volumes works."""
# # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the # License for the specific language governing permissions and limitations # under the License. import os from engine.api.x7.v2 import extensions from engine import flags from engine.log import logging from engine.tests.integrated import integrated_helpers FLAGS = flags.FLAGS LOG = logging.getLogger('engine.tests.integrated') class ExtensionsTest(integrated_helpers._IntegratedTestBase): def _get_flags(self): extensions.ExtensionManager.reset() f = super(ExtensionsTest, self)._get_flags() f['osapi_extension'] = FLAGS.osapi_extension[:] f['osapi_extension'].append('engine.tests.api.x7.v2.extensions.' 'foxinsocks.Foxinsocks') return f def test_get_foxnsocks(self): """Simple check that fox-n-socks works.""" response = self.api.api_request('/foxnsocks')